Summary: | libinput: Xserver crash with suspend/resume | ||
---|---|---|---|
Product: | Wayland | Reporter: | Olivier Fourdan <fourdan> |
Component: | libinput | Assignee: | Wayland bug list <wayland-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | fourdan, peter.hutterer |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Reproducer |
Description
Olivier Fourdan
2015-02-24 08:40:33 UTC
Note that xfce settings daemon uses the left handed property to determine if a device is from libinput, so this is most likely related: #ifdef HAVE_LIBINPUT static gboolean xfce_pointers_is_libinput (Display *xdisplay, XDevice *device) { Atom prop, type; gulong n_items, bytes_after; gint rc, format; guchar *data; prop = XInternAtom (xdisplay, LIBINPUT_PROP_LEFT_HANDED, False); gdk_error_trap_push (); rc = XGetDeviceProperty (xdisplay, device, prop, 0, 1, False, XA_INTEGER, &type, &format, &n_items, &bytes_after, &data); gdk_error_trap_pop (); if (rc == Success) { XFree (data); return (n_items > 0); } return FALSE; } #endif /* HAVE_LIBINPUT */ Created attachment 113792 [details]
Reproducer
Simple reproducer, build and run this test program would crash the X server here.
Corresponding backtrace in Xorg: Program received signal SIGSEGV, Segmentation fault. libinput_device_config_left_handed_is_available (device=0x0) at libinput.c:1685 1685 if (!device->config.left_handed) (gdb) p device $1 = (struct libinput_device *) 0x0 (gdb) bt #0 libinput_device_config_left_handed_is_available (device=0x0) at libinput.c:1685 #1 0x00007f4b2c658e05 in LibinputSetPropertyLeftHanded ( checkonly=<optimized out>, val=<optimized out>, atom=<optimized out>, dev=<optimized out>) at libinput.c:1473 #2 LibinputSetProperty (dev=<optimized out>, atom=<optimized out>, val=<optimized out>, checkonly=<optimized out>) at libinput.c:1574 #3 0x0000000000530d4f in XIChangeDeviceProperty (dev=0x2211bd0, property=property@entry=275, type=<optimized out>, format=<optimized out>, mode=<optimized out>, len=<optimized out>, value=0x21b46f4, sendevent=1) at xiproperty.c:772 #4 0x0000000000531428 in change_property (client=0x2420060, data=0x21b46f4, len=<optimized out>, mode=<optimized out>, format=<optimized out>, type=<optimized out>, property=275, dev=<optimized out>) at xiproperty.c:353 #5 ProcXChangeDeviceProperty (client=0x2420060) at xiproperty.c:911 #6 0x0000000000439137 in Dispatch () at dispatch.c:432 #7 0x000000000043d2d6 in dix_main (argc=16, argv=0x7fff251f1bd8, envp=<optimized out>) at main.c:296 #8 0x00007f4b33adcfe0 in __libc_start_main (main=0x4276c0 <main>, argc=16, argv=0x7fff251f1bd8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff251f1bc8) at libc-start.c:289 #9 0x00000000004276ee in _start () Crash occurs while accessing a specific device "HID 04d9:1400" which is listed as both a keyboard and a pointer device: 15:16 $ xinput ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Logitech USB-PS/2 Optical Mouse id=11 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=14 [slave pointer (2)] ⎜ ↳ TPPS/2 IBM TrackPoint id=15 [slave pointer (2)] ⎜ ↳ HID 04d9:1400 id=10 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Sleep Button id=8 [slave keyboard (3)] ↳ HID 04d9:1400 id=9 [slave keyboard (3)] ↳ Integrated Camera id=12 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)] ↳ ThinkPad Extra Buttons id=16 [slave keyboard (3)] lsusb gives: Bus 001 Device 025: ID 04d9:1400 Holtek Semiconductor, Inc. PS/2 keyboard + mouse controller Possible fix http://patchwork.freedesktop.org/patch/43211/ (works for me, but there might be a better fix) Do you have a full Xorg.log? if the libinput device ends up null, you should see an error message. Updated patch: http://patchwork.freedesktop.org/patch/43317/ commit 98ae01b9ae8616d3c2047f5510205aa4e3bc52b5 Author: Olivier Fourdan <ofourdan@redhat.com> Date: Wed Feb 25 11:49:19 2015 +0100 Ignore property changes if the device is disabled |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.