User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

[SOLVED]update seems to have broken X11 for me (3.5" Tontec)

Wed Dec 21, 2016 12:06 pm

I have one Pi 3 running Jessie with a 3.5" Tontec display attached via the GPIO header. It's set up with nodm which logs in a local user and starts a single Tkinter fullscreen script via that user's .xsession. This has worked without problems for a bit over 6 months now.

After yesterday's update of (amongst others) raspberrypi-kernel to 1.20161215-1, I rebooted the Pi. This morning, I found that it didn't display my UI script but a single blinking cursor in the top left corner. However, via ps/pstree, all processes (Xorg, nodm, my script) seemed to be running. I tried to make a screenshot via 'DISPLAY=:0 scrot' and it did indeed show my UI. I thought that somehow the Pi might have been switched to the wrong VT, so I checked with 'fgconsole' which returned 7, the tty Xorg is running on. Changing that with 'chvt 1' makes the screen show the boot messages and a login prompt identifying the console as tty1. 'fgconsole' also returns 1. Changing back with 'chvt 7' results in 'fgconsole' reporting 7. The display, however, stays unchanged, still displaying the tty1 login prompt.

I had a look at Xorg.0.log and saw nothing strange there. Unfortunately, I don't have a version of the log file from when it was still working. I've put up the current version at http://paste.debian.net/903676/. To me it looks like X11 is running alright but for some reason not displayed on the Tontec screen.

I only noticed this today but it's quite possible that the problem has existed for a while now. I don't look at that screen every day and it's also possible that the problem only showed itself after a reboot.

Yesterday's upgrade was:

Code: Select all

Start-Date: 2016-12-20  13:16:06
Commandline: apt-get upgrade
Upgrade: libraspberrypi-doc:armhf (1.20161125-1, 1.20161215-1), raspberrypi-kernel:armhf (1.20161125-1, 1.20161215-1), samba-common:armhf (4.2.10+dfsg-0+deb8u3, 4.2.14+dfsg-0+deb8u2), libtevent0:armhf (0.9.25-0+deb8u1, 0.9.28-0+deb8u1), libraspberrypi-bin:armhf (1.20161125-1, 1.20161215-1), libsmbclient:armhf (4.2.10+dfsg-0+deb8u3, 4.2.14+dfsg-0+deb8u2), raspberrypi-bootloader:armhf (1.20161125-1, 1.20161215-1), samba-libs:armhf (4.2.10+dfsg-0+deb8u3, 4.2.14+dfsg-0+deb8u2), libraspberrypi0:armhf (1.20161125-1, 1.20161215-1), libwbclient0:armhf (4.2.10+dfsg-0+deb8u3, 4.2.14+dfsg-0+deb8u2), libraspberrypi-dev:armhf (1.20161125-1, 1.20161215-1)
End-Date: 2016-12-20  13:20:25
The last upgrades that touched xorg were on December 10:

Code: Select all

Start-Date: 2016-12-10  13:37:51
Commandline: apt-get upgrade
Upgrade: xserver-xorg-input-synaptics:armhf (1.8.2-1~bpo8+1, 1.8.3-2), raspberrypi-sys-mods:armhf (20161205, 20161208+1), libdrm-freedreno1:armhf (2.4.65-3~bpo8+1, 2.4.71-1+rpi1), libglapi-mesa:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1), libwayland-client0:armhf (1.6.0-2, 1.11.0-2), libva1:armhf (1.4.1-1, 1.7.2-1), xserver-xorg-core:armhf (1.17.2-1+rpi1, 1.18.4-2+rpi1), libgles1-mesa:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1), libegl1-mesa:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1), libgbm1:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1), libdrm-radeon1:armhf (2.4.65-3~bpo8+1, 2.4.71-1+rpi1), libxfont1:armhf (1.5.1-1, 1.5.2-1), xserver-common:armhf (1.17.2-1+rpi1, 1.18.4-2+rpi1), libobrender29:armhf (3.5.2-8+rpi2, 3.5.2-8+rpi3), libdrm2:armhf (2.4.65-3~bpo8+1, 2.4.71-1+rpi1), libobt2:armhf (3.5.2-8+rpi2, 3.5.2-8+rpi3), libgles2-mesa:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1), libdrm-nouveau2:armhf (2.4.65-3~bpo8+1, 2.4.71-1+rpi1), raspi-config:armhf (20161114, 20161207), xserver-xorg-video-fbdev:armhf (0.4.4-1+rpi1, 0.4.4-1+rpi2), libdrm-amdgpu1:armhf (2.4.65-3~bpo8+1, 2.4.71-1+rpi1), xserver-xorg-input-evdev:armhf (2.9.2-1~bpo8+1, 2.10.3-1), xserver-xorg-video-fbturbo:armhf (1.20150305~205709, 1.20161111~122359), openbox:armhf (3.5.2-8+rpi2, 3.5.2-8+rpi3), xserver-xorg:armhf (7.7+7+b1, 7.7+16), libwayland-egl1-mesa:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1), pcmanfm:armhf (1.2.3-1.1+rpi5, 1.2.3-1.1+rpi6), libgl1-mesa-glx:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1)
End-Date: 2016-12-10  13:46:05

Start-Date: 2016-12-10  13:47:30
Commandline: apt-get dist-upgrade
Install: libllvm3.9:armhf (3.9-4, automatic)
Upgrade: libgl1-mesa-dri:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1)
End-Date: 2016-12-10  13:47:43
Any help in debugging this is greatly appreciated, I don't really have any good ideas how to proceed. I can provide any needed logs and configuration files.
Last edited by dasmanul on Fri Dec 23, 2016 6:34 am, edited 1 time in total.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: recent update seems to have broken X11 for me (3.5" Tont

Wed Dec 21, 2016 4:43 pm

Perhaps this may help: viewtopic.php?f=66&t=168739
(changing access rights of tty devices)
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: recent update seems to have broken X11 for me (3.5" Tont

Wed Dec 21, 2016 10:56 pm

Unfortunately not, but thanks for the suggestion.

If I understand the referenced thread correctly, changing the rights was necessary for X to start at all. In my case, X starts successfully to the point where I can even make screenshots - it just fails to show up on the physical display. I tried your solution anyway, unfortunately with no change in the observed behaviour.

I'd still be grateful for any help with this, I'm completely stumped at the moment.

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: recent update seems to have broken X11 for me (3.5" Tont

Wed Dec 21, 2016 11:29 pm

I have a suspicion that my problems might be related to the latest xserver-xorg-core changes after which the Xorg server is no longer setuid root:
xorg-server (2:1.17.3-1) unstable; urgency=medium

The Xorg server is no longer setuid root by default. This change reduces the
risk of privilege escalation due to X server bugs, but has some side effects:

* it relies on logind and libpam-systemd
* it relies on a kernel video driver (so the userspace component doesn't
touch the hardware directly)
* it needs X to run on the virtual console (VT) it was started from
* it changes the location for storing the Xorg log from /var/log/ to
~/.local/share/xorg/

On systems where those are not available, the new xserver-xorg-legacy package
is needed to allow X to run with elevated privileges. See the
Xwrapper.config(5) manual page for configuration details.
I tried to install xserver-xorg-legacy to test this out but failed due to dependency problems. I'll open a separate thread for this.

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: recent update seems to have broken X11 for me (3.5" Tont

Thu Dec 22, 2016 8:06 am

With help from the forum, I managed to install xserver-xorg-legacy. Unfortunately, this did not fix my problem, behaviour is still exactly as in the first post.

Anybody else out there with an idea?

Is there a painless way to downgrade Xorg?

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: recent update seems to have broken X11 for me (3.5" Tont

Thu Dec 22, 2016 1:47 pm

I guess I found the problem: The recent upgrade of xserver-xorg-video-fbturbo has apparently overwritten /usr/share/X11/xorg.conf.d/99-fbturbo.conf, changing the "fbdev" option back to /dev/fb0 instead of the /dev/fb1 needed for the Tontec display. I've changed it back and restarted X. I can only check whether that helped when I'm back home, but I'm fairly confident.

I'm actually used to apt issuing a warning before it overwrites locally modified config files and offering the option to keep the local version. Any ideas why that didn't happen in this case?

User avatar
ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6382
Joined: Fri Jul 29, 2011 5:36 pm

Re: recent update seems to have broken X11 for me (3.5" Tont

Thu Dec 22, 2016 10:24 pm

Unless otherwise specified, only /etc files are marked as conffiles.

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

[SOLVED] recent update seems to have broken X11 for me

Fri Dec 23, 2016 6:34 am

Thanks for that information. I definitely think anything that lives in a conf.d directory should be marked as a config file as well. Would https://github.com/RPi-Distro be the right place to file a bug report for this or is there a more specific place?

For the record, this was indeed the issue, X11 is displayed correctly again.

Return to “Raspberry Pi OS”