Bug 89783 - Segmentation fault in libinput 0.13.0 when using Razer Blackwidow keyboard
Summary: Segmentation fault in libinput 0.13.0 when using Razer Blackwidow keyboard
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-26 22:51 UTC by kmaeder
Modified: 2015-04-09 04:31 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg log on x86_64 installation (3.73 KB, text/plain)
2015-03-26 22:51 UTC, kmaeder
Details
Xorg log showing crash: Razer Deathadder Chroma (15.52 KB, text/plain)
2015-03-28 22:26 UTC, Brandon
Details
Xorg log of crash when plugging in Razer Black Widow ultimate (19.61 KB, text/plain)
2015-03-31 14:57 UTC, Max Bruckner
Details
evemu-describe output for Razer Blackwidow 2013 (6.67 KB, text/plain)
2015-04-07 07:53 UTC, kmaeder
Details
evemu-describe output Razer Blackwidow - secode device (14.05 KB, text/plain)
2015-04-07 08:22 UTC, kmaeder
Details
evemu-describe output Razer Blackwidow 2013 if02 event mouse (1.63 KB, text/plain)
2015-04-08 07:28 UTC, kmaeder
Details

Description kmaeder 2015-03-26 22:51:41 UTC
Created attachment 114654 [details]
Xorg log on x86_64 installation

Xorg crashes when a Razer Blackwidow keyboard is plugged in (part of Xorg log is appended).

Arch Linux x86_64
Linux 3.19.2
libinput 0.13.0
Xorg server 1.17.1

The problem occurred after updating libinput from 0.12.0 to 0.13.0 and is only present when the named keyboard is plugged in.

I tested the same setup(same software version and keyboard) on a x86 installation and it worked fine there.
Comment 1 Brandon 2015-03-28 22:23:41 UTC
I also have the same problem with libinput 0.13.0 but with my razer deathadder chroma mouse.
Comment 2 Brandon 2015-03-28 22:26:57 UTC
Created attachment 114689 [details]
Xorg log showing crash: Razer Deathadder Chroma
Comment 3 rabcor 2015-03-30 10:19:14 UTC
This is happening to me as-well with a Razer Blackwidow keyboard on version 0.8.0, so it is not exclusive to 0.13.0.

Wonder if this actually extends to Wayland as well or not.
Comment 4 rabcor 2015-03-30 10:21:38 UTC
Also I added the relevant part of a log to pastebin.

http://pastebin.com/vdLLLLsJ
Comment 5 Max Bruckner 2015-03-31 14:56:34 UTC
Same problem here. After updating from 0.12 to 0.13, xorg crashes when plugging in a Razer Black Widow Ultimate.
Comment 6 Max Bruckner 2015-03-31 14:57:43 UTC
Created attachment 114767 [details]
Xorg log of crash when plugging in Razer Black Widow ultimate
Comment 7 Max Bruckner 2015-04-01 15:50:40 UTC
The crash is reproducible with wayland ( weston and GNOME ).
Comment 8 Max Bruckner 2015-04-02 07:55:43 UTC
I bisected the issue down to commit 1e4116beb9863ecb69253b159af1f6909354600a 'evdev: refactor fake resolution setting'
Comment 9 rabcor 2015-04-02 15:45:41 UTC
(In reply to rabcor from comment #3)
> This is happening to me as-well with a Razer Blackwidow keyboard on version
> 0.8.0, so it is not exclusive to 0.13.0.
> 
> Wonder if this actually extends to Wayland as well or not.

I made a mistake earlier, it was xf86-input-libinput that was version 0.8.0 libinput itself is 0.13.0. Nevermind.
Comment 10 Peter Hutterer 2015-04-07 05:13:55 UTC
Please attach an evemu-describe of this device, thanks.
Comment 11 kmaeder 2015-04-07 07:53:14 UTC
Created attachment 114909 [details]
evemu-describe output for Razer Blackwidow 2013

attached an evemu-describe of a Razer Blackwidow 2013
Comment 12 Peter Hutterer 2015-04-07 07:58:01 UTC
Is there a second device? this one doesn't have any axes, so it's unlikely to even trigger the code that changed with the commit listed above.
Comment 13 kmaeder 2015-04-07 08:22:31 UTC
Created attachment 114910 [details]
evemu-describe output Razer Blackwidow - secode device

There are 4 devices in total: three event and 1 mouse.
names as listed under /dev/input/by-id:
usb-Razer_Razer_BlackWidow_2013-event-kbd (evemu-desc I posted before)
usb-Razer_Razer_BlackWidow_2013-if01-event-kbd (this comments evemu-desc)
usb-Razer_Razer_BlackWidow_2013-if02-event-mouse
usb-Razer_Razer_BlackWidow_2013-if02-mouse

Are you interested in evemu-desc of the other two devices as well?
Comment 14 Peter Hutterer 2015-04-07 22:17:53 UTC
attach them here anyway, it's good for me to have them for future reference. The second one you attached is the one triggering the bug - fix for that is coming up.
Comment 15 Peter Hutterer 2015-04-07 23:55:39 UTC
http://lists.freedesktop.org/archives/wayland-devel/2015-April/021111.html
First two patches, the rest are related but not required
Comment 16 kmaeder 2015-04-08 07:28:38 UTC
Created attachment 114949 [details]
evemu-describe output Razer Blackwidow 2013 if02 event mouse

I added the evemu-describe for the third event device. For the fourth device (usb-Razer_Razer_BlackWidow_2013-if02-mouse) no evemu-describe can be generated (device is mouse device linked to /dev/input/mouse1).

I applied your patches and 0.13.0 now works for me with the keyboard plugged in. Thanks!

For anybody using Arch: I uploaded a modified libinput package here:

https://kevin-maeder.de/libinput/
Comment 17 Peter Hutterer 2015-04-09 04:31:42 UTC
commit 67208c0b1acd7b6db8a853994f7e7c9be94e0178
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 8 09:54:29 2015 +1000

    evdev: fix crash for missing ABS_X/Y


commit e2b13e602220a906584b21d51bc5472577be4372
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 8 09:54:30 2015 +1000

    evdev: fix handling of fake MT devices without ABS_X/Y


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.