Welcome! Log In Create A New Profile

Advanced

HOWTO : HP T5325 X11 Gui (LXDE / XFCE)

Posted by Gravelrash 
HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
March 14, 2016 01:39PM
Prerequisites : rootfs prepared on usb key following the instructions here link

Enable screen console output from working rootfs
fw_setenv set_bootargs 'setenv bootargs console=tty0 console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params'

Alternatively

Enable screen console output from serial console
setenv set_bootargs 'setenv bootargs console=tty0 console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params'
saveenv
reset


Install LXDE, this will take a while so hold on
apt-get update ; apt-get upgrade; apt-get install keyboard-configuration locales tzdata console-data  task-lxde-desktop --install-recommends -f -y


Install XFCE, this will take a while so hold on
apt-get update ; apt-get upgrade; apt-get install keyboard-configuration locales tzdata console-data  task-xfce-desktop --install-recommends -f -y


copy the following file to your /etc/X11/ directory link Optional file with additional resolutions and screen colour depths link contains 48 possible screen settings

edit /etc/initramfs-tools/modules and write the following into it. Save and exit
xgifb
fbcon

update initramfs from the console issue the following command
update-initramfs -u


update uInitrd (check the name of your initramfs and use the proper one)
cd /boot
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.4.0-kirkwood-tld-1 -d initrd.img-4.4.0-kirkwood-tld-1 uInitrd

edit /etc/inittab and uncomment the entries about tty1 to tty6 so getty is started on them, save and exit

reboot the unit and you should be presented with an X11 desktop on boot, wait for it it can take a little while to load

If you get a message about "No session for PID..." perform the following from the terminal as root
chmod o+x /usr/lib/dbus-1.0/dbus-daemon-launch-helper"

Reconfigure your keyboard in X and some other stuff
dpkg-reconfigure locales
dpkg-reconfigure tzdata
dpkg-reconfigure console-data
dpkg-reconfigure keyboard-configuration

Image of desktop X11 desktop

Shameless plageurism by me from the investigation posts
http://forum.doozan.com/read.php?9,26555 &
http://forum.doozan.com/read.php?2,25473
Credit to everyone involved

Get a working web browser

You will find our pretty quickly that iceweasel doesn' t work and wont load. This is due to a bug in glib2 libraries so lets change the web browser to one that does work. netsurf weblink

Perform the following
apt-get install netsurf --install-recommends -f -y

once that has finished its task do the following to set netsurf as default. from a console type

update-alternatives --config x-www-browser

You should be then presented with the following options, its self explanatory so i will leave it as is for you to read
root@debian:/etc/apt# update-alternatives --config x-www-browser 
There are 4 choices for the alternative x-www-browser (providing /usr/bin/x-www-browser).

  Selection    Path                       Priority   Status
------------------------------------------------------------
* 0            /usr/bin/netsurf            100       auto mode
  1            /usr/bin/epiphany-browser   85        manual mode
  2            /usr/bin/iceweasel          70        manual mode
  3            /usr/bin/netsurf            100       manual mode
  4            /usr/bin/surf               30        manual mode

Press enter to keep the current choice[*], or type selection number: 0

Should you want to go the "whole hog" and add an email client, the following one is one i have managed to get working
CLAWS MAIL weblink
apt-get install claws-mail --install-recommends -f -y

Time fo clean up the letover packages and tidy up the system now
apt-get autoclean; apt-get autoremove; sync;

There you have it a nice current Debian desktop with up to date supported packages.

CONFIGURE SOUND

ensure you have the latest dtb for the device as of the time of writing this use the following link, for kernels and rootfs beyond 4.5 the relevant dtb should be included in the downloaded rootfs

Change /usr/share/alsa/alsa.conf as following:
#pcm.front cards.pcm.front
pcm.front cards.pcm.default


Turn up the sound using alsamixer, select the onboard sound card and use the m key to toggle mute:
Speaker Mix DAC2SPK
HP Mix DAC2HP
Left Headphone Mux [HP Left Mix]
Right Headphone Mux [HP Right Mix]
Sliders:(up/down key) 
Headphone
Speaker
PCM
issue alsactl store when configuration complete


Theres only the accelerated graphics to sort out. but as of now. its a functioning desktop suitable for light web browsing / image manipulation / Office work and Email and audio output.



Edited 15 time(s). Last edit at 07/04/2016 06:26AM by Gravelrash.
Re: HOWTO : HP T5325 X11 Gui (LXDE)
March 14, 2016 02:58PM
@bodhi

Would you add this to your "wiki"
Re: HOWTO : HP T5325 X11 Gui (LXDE)
March 14, 2016 11:04PM
Gravelrash,

> Would you add this to your "wiki"

Already done :)

You might want to include the picture you've uploaded a few days ago, too.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: HOWTO : HP T5325 X11 Gui (LXDE)
March 16, 2016 08:38AM
Gravelrash,

I followed your instructions verbatim and they worked fine on a fresh rootfs running 3.17. Good job!

Couple things I experienced.

When I did the fw_setenv I got an error about writing to mtd0. Evidently this wasn't a problem however.

For /etc/x11, there was no existing xorg.conf file in the main directory or the subs so all I had to do was copy over the file you posted.

And for whatever reason, iceweasel does not work in the desktop. I'll have to investigate.

But as I said, everything worked for me so kudos :)

LeggoMyEggo's Google Plus Profile
Re: HOWTO : HP T5325 X11 Gui (LXDE)
March 16, 2016 09:14AM
@LeggoMyEggo

Thanks for testing this on a 3.17 i presume you are going to have a go with the infamous xgi xorg driver? I would be interested in your feedback if you do.

I have tested the above on the 4.4.0 kernel with jessie and i get the same issue with iceweasel, trying to work through whats wrong here, so would be intererested to hear what you discover too.

Thanks again

GR

EDITED THE INSTRUCTIONS TO INCLUDE setenv from console



Edited 1 time(s). Last edit at 03/16/2016 09:16AM by Gravelrash.
Re: HOWTO : HP T5325 X11 Gui (LXDE)
March 16, 2016 11:24AM
@Leggo

Found that the reason we cant use iceweasel or for that matter icedove is due to the following reason

"iceweasel: GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed"

which breaks down to a call to libglib2.... so no iceweasel fo us then!

https://bugs.debian.org/cgi-bin/pkgreport.cgi?package=libglib2.0-0



Edited 2 time(s). Last edit at 03/17/2016 07:03AM by Gravelrash.
Re: HOWTO : HP T5325 X11 Gui (LXDE)
March 16, 2016 12:12PM
LeggoMyEggo Wrote:
-------------------------------------------------------
> When I did the fw_setenv I got an error about
> writing to mtd0. Evidently this wasn't a problem
> however.

Now that I think about this more, when I had the T5325 open and on serial console (and before I performed your operation), I may have executed a setenv bodhi or you had posted earlier that enabled the display at boot. I don't know which one of the instruction I issued as there were a couple bandied about. What I am trying to say is that I can't confirm that the fw_setenv you posted above actually wrote to the env's as I enabled display earlier through serial console.

LeggoMyEggo's Google Plus Profile
Re: HOWTO : HP T5325 X11 Gui (LXDE)
March 17, 2016 07:50AM
With web browsing and the LXDE desktop with the framebuffer driver. the following web browser(s) have been seen to work

netsurf : loads and accesses most pages
surf : loads and then closes does nothing

Instructions in first post updated to include web browser instructions



Edited 1 time(s). Last edit at 03/17/2016 07:59AM by Gravelrash.
Re: HOWTO : HP T5325 X11 Gui (LXDE)
March 17, 2016 08:04AM
next post will be about local email clients

First post updated to include claws mail client



Edited 1 time(s). Last edit at 03/17/2016 11:35AM by Gravelrash.
Re: HOWTO : HP T5325 X11 Gui (LXDE)
March 19, 2016 01:20AM
additional xorg.conf file now added with the following possible screen resolutions

"1600x1200"
"1280x1024"
"1280x960"
"1280×720"
"1152x864"
"1024x768"
"800x600"
"800x480"
"768x576"
"720x480"
"640x480"
"320x200"

should cover most monitors and screen requirements. Highlighted ones above can be set as default console boot option under
Section "Monitor"
	Identifier       "Primary Monitor"
	Option          "DPMS" 	"true"
	HorizSync    1-10000
	VertRefresh 1-10000
	Option          "NonDDCDefaultMode"      "1800x600@60"
	Option          "PreferredMode"                "800x600"
CV
Re: HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
March 20, 2016 11:16AM
Hi Gravelrash,

I do not remember every step I did,
but I managed to get a graphical login started automatically upon boot using lightdm.
(First I had tried gdm3, but did not get it to work)

-I (re-)installed packages systemd, systemd-sysv, lightdm
-at one point I had a error message concerning D-Bus not being able to start something, I made "chmod o+x /usr/lib/dbus-1.0/dbus-daemon-launch-helper"

Perhaps you want to try this.

Cheers,
CV

EDIT: Now also this funny window "No session for PID..." (it's also in your screenshot) does not appear any longer.



Edited 3 time(s). Last edit at 03/20/2016 11:26AM by CV.
Re: HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
March 21, 2016 04:09PM
@CV
Thanks for this, if i get a minimum GUI loaded i will add the instructions to the first post of this page.

So far I have included instructions for LXDE and XFCE full desktop environments. if anyone has any requests for what other environments either console or graphical, i am happy to oblige with a HOWTO*


* usual caveats around getting it working first and time to do it.
Kamal
Re: HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
October 04, 2017 04:49AM
Gravelrash Wrote:
-------------------------------------------------------
> CONFIGURE SOUND
>
> ensure you have the latest dtb for the device as
> of the time of writing this use the following
> link,
> for kernels and rootfs beyond 4.5 the relevant dtb
> should be included in the downloaded rootfs
>

I am running Debian 9 official release on stock version of U-BOOT. Kernel is 4.9.0-3-marvell.

/dev/mtd* devices get detected correctly if the dtb file included in the official kernal package is used (/usr/lib/linux-image-4.9.0-3-marvell/kirkwood-t5325.dtb). But the above dtb file fixed two remaining problems. First issue was the poweroff command not powering off the device - even though the device came to near poweroff. The second issue was with the sound card detection. Both problems disappeared when the above dtb file was used. It appears to include a fix to an LED issue as well - which I am not clear about. Thank you very much for the fine work!

Could you please consider sending the fixes to Debian so that the dtb file included in the kernel package would have the fixes?

Thank you.

Kamal
Re: HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
October 04, 2017 04:57PM
Hi Kamal,

That was my work-in-progress copy of the DTB on this HP T5325 working thread:
https://forum.doozan.com/read.php?2,25473

And I've released the kernel package in this kernel/rootfs thead:
https://forum.doozan.com/read.php?2,12096

The DTB is in the released rootfs /boot/dts. But the source code is only in the kernel package. So you can download the kernel tarball linux-4.12.8-kirkwood-tld-1-bodhi.tar.bz2, and extract the DTS source and the DTB for your onw use. You should use the latest DTB. The working DTB that Gravelrash refererred to in this thread might or might not be the latest. We worked on this box quite a long time ago so it is hard to say.


This kernel tarball has everything that you need to install or build. Build your own kernel: download the mainline source tree, copy the config file into it, apply the patch, and build):

Quote

Updated 21 Aug 2017:

Kernel linux-4.12.8-kirkwood-tld-1 package has been uploaded.

New/update in this version:

- Pick up security patches from mainline.
- Update the Linksys EA4500 to correctly activate the DSA switch (use the kirkwood-ea4500.dtb for booting)
- Update the Qizitong 501mv2 to correctly activate the DSA switch (please see this post for the updated Qizitong DTB which was not included in the tarball).
- Turn off the lirc_rpi in this version. Please use previous kernel version if you need lirc_rpi.

Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

Download at Dropbox:

linux-4.12.8-kirkwood-tld-1-bodhi.tar.bz2

md5:
1c7ad19acb36a9a77a813e7c27b908e6
sha256:
4d59aa4ad925d2e99bfafd5552bae486fcd5e3c2fc6c8e50fb749589972d58c3

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 10/04/2017 05:02PM by bodhi.
Re: HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
October 05, 2017 03:26AM
@all

The dtb file referenced in the HOWTO was the latest at the time of writing... this doesn't make it the latest one the "Mr. Bodhi" has supplied.
Kamal
Re: HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
October 05, 2017 04:37AM
bodhi Wrote:
-------------------------------------------------------
> So
> you can download the kernel tarball
> linux-4.12.8-kirkwood-tld-1-bodhi.tar.bz2, and
> extract the DTS source and the DTB for your onw
> use.


Hi bodhi,

I am not sure if you wrote the above purposely to mean that the code modifications should not be redistributed freely. As per my understanding, one cannot attach constraints like "for your own use" to the modifications made to the GPL code when such is distributed - if ever such text is used to mean contradictory use of the GPL licensed code. I myself or anyone else should be able to redistribute your modifications to the GPL code with or without further modifications freely (as per GPL).

Kamal
Re: HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
October 05, 2017 04:49AM
Kamal,

> I am not sure if you wrote the above purposely to
> mean that the code modifications should not be
> redistributed freely.

Not my intention!

> As per my understanding, one
> cannot attach constraints like "for your own use"
> to the modifications made to the GPL code when
> such is distributed - if ever such text is used to
> mean contradictory use of the GPL licensed code. I
> myself or anyone else should be able to
> redistribute your modifications to the GPL code
> with or without further modifications freely (as
> per GPL).

Please feel free to use, distribute, sell ... anyway you'd like to :) that's what for your own use means. Absolutely free per GPL.

I've only mentioned it to indicate that you want to get the latest version. It might be a little bit better than the DTB file that Gravelrash pointed to. And since I have not had the time to submit patch to kernel mailing list (it is a time consuming process, unfortunately), the only way you will get the latest DTS/DTB is to download that package, and use the DTS and DTB from it.

You could use the DTC compiler to compile the DTS, and put the output DTB on your rootfs. No need to install the kernel.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 10/05/2017 04:51AM by bodhi.
Kamal
Re: HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
October 05, 2017 08:06AM
Hi bodhi,

Thank you very much for the clarification. If the upstream kernel code can be patched, that has advantages. But I do understand that there could be many situations where it may take a long time, and certain types of change may not be accepted at all. I don't have experience in sending patches to the kernel, but I'll try later on.

BTW, here's something that forum members might find useful (if ever I am not doing something like reinventing the wheel):

Getting fw_setenv and flashcp to work on Debian 9 Stretch

I assume you are using the stock version of U-BOOT and Debian 9 official release. You may have to adjust the below steps to match with you environment - if ever such modifications are needed. For example, if you use a newer version of U-BOOT, you may not want to configure the system to get the dtb file appended to the kernel, but let U-BOOT handle the related task.

To get the dtb file appended to the kernel during kernel upgrades:
echo -e "HP t5325 Thin Client" > /etc/flash-kernel/machine

You may want to manually trigger appending the dtb file for the first time after the above command (apt-get upgrade would automatically trigger the process during kernel upgrades):

update-initramfs -u -k all

Now if you reboot, /dev/mtd* devices can be found:

root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00010000 "u-boot"
mtd1: 00040000 00010000 "SSD firmware"
mtd2: 00010000 00010000 "u-boot env"
mtd3: 00010000 00010000 "permanent u-boot env"
mtd4: 00010000 00010000 "permanent u-boot env"
root@debian:~# ls -l /dev/mtd*
crw------- 1 root root 90, 0 Oct  5 12:26 /dev/mtd0
crw------- 1 root root 90, 1 Oct  5 12:26 /dev/mtd0ro
crw------- 1 root root 90, 2 Oct  5 12:26 /dev/mtd1
crw------- 1 root root 90, 3 Oct  5 12:26 /dev/mtd1ro
crw------- 1 root root 90, 4 Oct  5 12:26 /dev/mtd2
crw------- 1 root root 90, 5 Oct  5 12:26 /dev/mtd2ro
crw------- 1 root root 90, 6 Oct  5 12:26 /dev/mtd3
crw------- 1 root root 90, 7 Oct  5 12:26 /dev/mtd3ro
crw------- 1 root root 90, 8 Oct  5 12:26 /dev/mtd4
crw------- 1 root root 90, 9 Oct  5 12:26 /dev/mtd4ro
brw-rw---- 1 root disk 31, 0 Oct  5 12:26 /dev/mtdblock0
brw-rw---- 1 root disk 31, 1 Oct  5 12:26 /dev/mtdblock1
brw-rw---- 1 root disk 31, 2 Oct  5 12:26 /dev/mtdblock2
brw-rw---- 1 root disk 31, 3 Oct  5 12:26 /dev/mtdblock3
brw-rw---- 1 root disk 31, 4 Oct  5 12:26 /dev/mtdblock4
root@debian:~#

But if you want a custom dtb file used (like the one mentioned in this thread which has some other fixes), put it under /etc/flash-kernel/dtbs, and then run "update-initramfs -u -k all" again, reboot.

root@debian:/etc/flash-kernel# tree dtbs/
dtbs/
├── kirkwood-t5325.dtb
└── README.dtbs

As you see from the output of "cat /proc/mtd", /dev/mtd2 holds the u-boot env. So, for fw_printenv and fw_setenv to work correctly, create the /etc/fw_env.config file like this:

echo "/dev/mtd2 0x0 0x1000 0x10000" > /etc/fw_env.config

Under Debian 8, above command with "/dev/mtd0" worked for me.

After creating the /etc/fw_env.config, fw_printenv will work correctly. But fw_setenv will not save the envs. The reason for fw_setenv failure is that the hardware chip holding the envs having an unlock/lock write protection feature but the kernel driver not triggering them. Debian 8 driver however was found to issue lock commands but not unlock commands.

As a remedy, make sure "protect off all" U-BOOT command gets executed during boot. You may set it using a serial connection. A hardware serial connection could be avoided if the system is running ThinPro. Below is an example script that one may run - with adjustments if required - while in ThinPro (note the usage of "protect off all" - found in the last line):

#!/bin/sh

fw_setenv mainlineLinux 'no'
fw_setenv arcNumber 2846
fw_setenv machid b1e

fw_setenv bootdelay 3


# For booting Debian 8/9 from USB
# Assumes /boot configured to reside in the first partition and the type is ext2, / in another partition and labelled USB_ROOT

fw_setenv debianusb 'usb start;ext2load usb 0:1 0x800000 /uImage;setenv bootargs $(debianusb_bootargs);bootm 0x800000'
fw_setenv debianusb_bootargs 'console=ttyS0,115200n8 console=tty0 video=xgifb root=LABEL=USB_ROOT rw'


# For booting Debian 8/9 from internal storage device
# Assumes /boot configured to reside in the first partition and the type is ext2, / in another partition and labelled IDE_ROOT

fw_setenv debianide 'ide reset;ext2load ide 0:1 0x800000 /uImage;setenv bootargs $(debianide_bootargs);bootm 0x800000'
fw_setenv debianide_bootargs 'console=ttyS0,115200n8 console=tty0 video=xgifb root=LABEL=IDE_ROOT rw'


# Boot command (to boot from USB, or from internal storage device, or ThinPro)
fw_setenv bootcmd 'setenv mainlineLinux yes;protect off all;run debianusb;run debianide;setenv mainlineLinux no;run thinpro'

With the correct content in /etc/fw_env.config and "protect off all" getting executed during boot, fw_setenv will work correctly. Here's a Debian 9 example:

root@debian:~# fw_printenv x
## Error: "x" not defined
root@debian:~# fw_setenv x y
root@debian:~# fw_printenv x
x=y
root@debian:~# fw_setenv x z
root@debian:~# fw_printenv x
x=z
root@debian:~# fw_setenv x
root@debian:~# fw_printenv x
## Error: "x" not defined
root@debian:~#

Note that under Debain 8, fw_setenv triggers the flash write lock. So the effect of "protect off all" during boot disappears. So if you want fw_setenv to do it's job again, you can reboot. Reboot multiple times and run fw_setenv per boot if you want to set multiple envs :(

I also found flashcp command to run without errors under Debian 9 - to flash u-boot and env images. However, my tests of this were limited.
Re: HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
October 06, 2017 01:07AM
> BTW, here's something that forum members might
> find useful (if ever I am not doing something like
> reinventing the wheel):

Of course it will be useful. But you probably did "reinvent the wheel" so to speak :)

flashcp and flash unlock were discussed somewhere in the 14 pages of this thread:
https://forum.doozan.com/read.php?2,25473

And in the u-boot installation instruction:
https://forum.doozan.com/read.php?3,26562

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Kamal
Re: HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
October 06, 2017 08:08AM
Let's wait and see if the dtb in the Debian official release gets fixed:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877869

Kamal
Re: HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
October 07, 2017 02:54AM
Kamal
Re: HOWTO : HP T5325 X11 Gui (LXDE / XFCE)
October 07, 2017 05:45AM
bodhi Wrote:
-------------------------------------------------------
> Kamal,
>
> I would prefer that you will not try to upstream
> the T53525 patch, at this time..


Hi bodhi,

I am not sure, but I guess that the upstream could get fixed when a bug is submitted to Debian.

On the other hand, why would you not prefer it at this time? If bugs get fixed early, the technical debt would stop accumulating - so that the wasteful future efforts needed to live with the bugs disappear.

Kamal
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: