FS#56804 - [xorg-server] startx freezes

Attached to Project: Arch Linux
Opened by Håvard Pettersson (haavard) - Thursday, 21 December 2017, 13:34 GMT
Last edited by Laurent Carlier (lordheavy) - Saturday, 30 December 2017, 10:32 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Jan de Groot (JGC)
Andreas Radke (AndyRTR)
Laurent Carlier (lordheavy)
Architecture All
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

On my Dell XPS 13 (9343), running startx freezes the entire machine. After running startx I can no longer switch to an alternate tty; the machine only responds to the power button.


Additional info:
* xorg-server / xorg-server-common 1.19.6
* Xorg.0.log attached.


Steps to reproduce:
* Upgrade xorg-server and xorg-server-common to 1.19.6
* Reboot and run startx
This task depends upon

Closed by  Laurent Carlier (lordheavy)
Saturday, 30 December 2017, 10:32 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed for now, with xorg-server-1.19.6-2
Comment by Doug Newgard (Scimmia) - Thursday, 21 December 2017, 16:26 GMT
Any xorg configs?
Comment by Håvard Pettersson (haavard) - Thursday, 21 December 2017, 16:30 GMT
Attached is /etc/X11/xorg.conf.d/50-synaptics.conf, can't recall having any other custom configuration. Let me know if there are specific files you'd like me to post.
Comment by Laurent Carlier (lordheavy) - Thursday, 21 December 2017, 17:31 GMT
Can you try without xf86-video-intel driver?
Comment by Håvard Pettersson (haavard) - Thursday, 21 December 2017, 17:37 GMT
No change in behaviour without xf86-video-intel.
Comment by Petar (koretic) - Friday, 22 December 2017, 09:26 GMT
I can confirm that freshly installing latest arch linux also has the same issue.
Using nvidia/nouveau or intel driver (laptop has both).
Comment by AK (Andreaskem) - Friday, 22 December 2017, 09:50 GMT
The following lines seem like a problem?

[ 22.002] (II) config/udev: Adding input device (unnamed) (/dev/ttyS0)
[ 22.002] (**) (unnamed): Applying InputClass "touchpad"
[ 22.002] (II) Using input driver 'libinput' for '(unnamed)'
[ 22.002] (EE) systemd-logind: failed to take device /dev/ttyS0: No such device
[ 22.002] (**) (unnamed): always reports core events
[ 22.002] (**) Option "Device" "/dev/ttyS0"
[ 22.002] (**) Option "_source" "server/udev"
[ 22.002] (II) ttyS0 - failed to create input device '/dev/ttyS0'.
[ 22.002] (EE) libinput: (unnamed): Failed to create a device for /dev/ttyS0
[ 22.002] (EE) PreInit returned 2 for "(unnamed)"
[ 22.002] (II) UnloadModule: "libinput"

X seems to think that /dev/ttyS0 is a touchpad? Maybe add the following line to your 50-synaptics.conf?

MatchIsTouchpad "yes"

edit: It seems to assume *everything* is a touchpad which I would expect to cause all sorts of havoc:

[ 43.389] (EE) systemd-logind: failed to take device /dev/tty: Connection was disconnected before a reply was received
...
[ 43.389] (EE) systemd-logind: failed to take device /dev/tty0: Connection is closed
...
[ 43.390] (EE) xf86OpenSerial: Cannot open device /dev/tty0
Permission denied
Comment by Håvard Pettersson (haavard) - Friday, 22 December 2017, 10:18 GMT
MatchIsTouchpad "yes" did the trick -- thanks! All good on my end. If the same works for Petar, I guess it's a wrap.

I checked the wiki and MatchIsTouchpad is present in examples there, so I guess my config was just outdated.
Comment by AK (Andreaskem) - Friday, 22 December 2017, 10:36 GMT
The fact that your configuration worked previously could still mean that a problem was introduced in 1.19.6. The following change might be related?

https://patchwork.freedesktop.org/patch/178833/

Might still be worth it to follow up on this issue.
Comment by AK (Andreaskem) - Friday, 22 December 2017, 11:04 GMT
In fact, I think there really is an issue here.

$ udevadm info --name=/dev/ttyS0
P: /devices/platform/serial8250/tty/ttyS0
N: ttyS0
E: DEVNAME=/dev/ttyS0
E: DEVPATH=/devices/platform/serial8250/tty/ttyS0
E: ID_MM_CANDIDATE=1
E: MAJOR=4
E: MINOR=64
E: SUBSYSTEM=tty
E: TAGS=:systemd:
E: USEC_INITIALIZED=11004582

$ grep ttyS0 /var/log/Xorg.0.log | grep Adding
[ 18.325] (II) config/udev: Adding input device (unnamed) (/dev/ttyS0)

This is weird. From the code in
https://cgit.freedesktop.org/xorg/xserver/tree/config/udev.c?h=server-1.19-branch
I would not expect this to happen, because there is this block in device_added:

value = udev_device_get_property_value(udev_device, "ID_INPUT");
if (value && !strcmp(value, "0")) {
LogMessageVerb(X_INFO, 10,
"config/udev: ignoring device %s without "
"property ID_INPUT set\n", path);
return;
}
...

LogMessage(X_INFO, "config/udev: Adding input device %s (%s)\n",
name, path);

It is not supposed to reach this line if ID_INPUT is unset. I think it should return for value==NULL as well, not just for (value && ...)!
Comment by Jan de Groot (JGC) - Friday, 22 December 2017, 11:22 GMT
Old code checks for !udev_device_get_property_value(..)
New code checks value is not null and value is 0.

It should be if (value == NULL || strcmp(value, "0") == 0) instead.

Comment by AK (Andreaskem) - Friday, 22 December 2017, 11:27 GMT
Is somebody going to take this upstream?
Comment by Eli Schwartz (eschwartz) - Sunday, 24 December 2017, 01:11 GMT
Why don't you take it upstream, as you're the one who spotted it? :)
Comment by AK (Andreaskem) - Sunday, 24 December 2017, 11:04 GMT Comment by Andreas Radke (AndyRTR) - Monday, 25 December 2017, 13:11 GMT
For now I've reverted the upstream udev changes in 1.19.6-2 until we have a proper fix.

Loading...