Created attachment 67691 [details]
acpid 2.0.17 includes a new "video/tabletmode TBLT (on|off)" event, which is emitted through /var/run/acpid.socket. An strace revealed that as soon as the Xorg server reads this line, it crashes. This event is fired when Lenovo convertible tablet PCs, and perhaps those of other vendors, are rotated between tablet and laptop mode.
Reproduces 100% of the time.
Tested with Arch Linux, latest everything, Xorg server 1.12.4, acpid 2.0.16 and 2.0.17.
Source file hints:
Though downgrading fixes the issue for me, the fact that acpid can crash the X server simply by sending it a message the Xorg server does not know how to handle indicates a bug in Xorg.
strace output attached.
Apparently bugzilla didn't realize that my log file was gzipped. The attachment in my original post remains readable if you gunzip it.
I can confirm on a lenovo x201 tablet that Xserver does crash when rotated. Also using Archlinux.
I can also confirm with a Lenovo X201 Tablet, and a friend of mine sees the bug on his Lenovo X230 Tablet. We use Debian unstable, for which the current acpid version is 2.0.17-1. Downgrading acpid to 2.0.16-1 while leaving everything else unchanged also fixes it for me; he hasn't tried this yet.
in my acpi handler script i added
when video/tabletmode is fired. And this seems to have fixed the crashes.
(X220t core i5-2520)
Putting "exit 1" in a video/tabletmode handler in the handler.sh script, like suggested by Jonas Jelten, did not affect my setup. The Xorg server on my X220t with i7-2620M CPU still crashes when going into tablet mode. I am on Arch linux with Xorg 1.13.0 and acpid 2.0.17.
Add "-S" to your ACPID_ARGS in /etc/conf.d/acpid
This fixed the problem for me. By adding -S the acpi-events get filtered by your acpid-Handlers
I don't think this issue is resolved, -S disables the acpi socket...
Any dev looking into this?
I can confirm this bug on my Thinkpad X61 Tablet. I first reported this bug in Debian some days ago: http://bugs.debian.org/696110
You can find a simple patch against xorg-server 1.12.4 that fixes the issue for me there: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=10_Dont-segfault-on-short-ACPI-strings.diff;att=3;bug=696110
Author: Ted Felix <firstname.lastname@example.org>
Date: Tue Jan 29 16:36:48 2013 +1000
xfree86: bail on misformed acpi strings (#73227)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.