Bug 1314955

Summary: libinput 1.2.1-2.fc23.x86_64 causes segmentation fault with Huion model 580 pen tablet
Product: [Fedora] Fedora Reporter: paul59584
Component: libinputAssignee: Peter Hutterer <peter.hutterer>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: bperkins, paul59584, peter.hutterer
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libinput-1.2.1-3.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-05 13:51:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
journalctl -b -1 output for failed boot with seg fault
none
Xorg.0.log from failed boot
none
evemu-describe output attached as evemu-huion.txt
none
huion device info (text file) none

Description paul59584 2016-03-05 02:10:58 UTC
Created attachment 1133275 [details]
journalctl -b -1 output for failed boot with seg fault

Description of problem:
Upgrading libinput from 1.1.8-1.fc23.x86_64 to 1.2.1-2.fc23.x86_64 leaves system unable to boot into graphical environment.
Logs show seg fault in xorg.
Unplugging Huion tablet before boot -> OK
Downgrading libinput to version 1.1.8-1.fc23.x86_64 -> OK


Version-Release number of selected component (if applicable):
libinput 1.2.1-2.fc23.x86_64

How reproducible:
always.

Steps to Reproduce:
1. upgrade libinput to version 1.2.1-2.fc23.x86_64
2. boot computer with Huion 580 pen tablet plugged in.
3. aarrrgggh.

Actual results:
Computer won't boot with Huion 580 pen tablet plugged in.

Expected results:
Computer boots with Huion 580 pen tablet plugged in.

Additional info:
adding output of 'journalctl -b -1' as log-b-1.txt
adding Xorg.0.log
both of above are for a failed boot.

Comment 1 paul59584 2016-03-05 02:11:56 UTC
Created attachment 1133276 [details]
Xorg.0.log from failed boot

Comment 2 Peter Hutterer 2016-03-06 22:06:29 UTC
attach an evemu-describe of your tablet please. we have a Huion test device, but yours must look different somehow.

Comment 3 paul59584 2016-03-06 22:39:22 UTC
Created attachment 1133566 [details]
evemu-describe output attached as evemu-huion.txt

Used command
for i in `ls /dev/input/by-id/usb-HUION_580-*` ;do sudo evemu-describe $i >> evemu-huion.txt; done; 
because wasn't sure which one to choose.

Comment 4 Fedora Update System 2016-03-07 00:38:52 UTC
libinput-1.2.1-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9ca0993b8b

Comment 5 Peter Hutterer 2016-03-07 00:59:27 UTC
Note that this only fixes the crasher, the reason for it was that libwacom's ruleset mislabels the "consumer controls" device as tablet. This fix simply rejects the device because it's not a tablet (so it won't work right now), the second part would have to go into libwacom so that event node is just labeled as keyboard, not as tablet.

Comment 6 paul59584 2016-03-07 01:41:17 UTC
Wow, thanks. libinput-1.2.1-3.fc23.x86_64 has fixed the crash and my tablet seems to be working as well. You had me worried with comment 5!

I seem to have the same number of devices (I think with the same naming) related to the pen tablet as with version 1.1.8-1.fc23.x86_64 from following commands

$ ll /dev/input/by-id/usb-HUION_580-*
lrwxrwxrwx. 1 root root 9 Mar  7 14:21 /dev/input/by-id/usb-HUION_580-event-if02 -> ../event5
lrwxrwxrwx. 1 root root 9 Mar  7 14:21 /dev/input/by-id/usb-HUION_580-event-mouse -> ../event2
lrwxrwxrwx. 1 root root 9 Mar  7 14:21 /dev/input/by-id/usb-HUION_580-if01-event-mouse -> ../event3
lrwxrwxrwx. 1 root root 9 Mar  7 14:21 /dev/input/by-id/usb-HUION_580-if01-mouse -> ../mouse1
lrwxrwxrwx. 1 root root 9 Mar  7 14:21 /dev/input/by-id/usb-HUION_580-if02-event-kbd -> ../event4
lrwxrwxrwx. 1 root root 9 Mar  7 14:21 /dev/input/by-id/usb-HUION_580-mouse -> ../mouse0

$ cat /proc/bus/input/devices | grep "HUION"
N: Name="HUION 580 Pen"
N: Name="HUION 580 Mouse"
N: Name="HUION 580 Keyboard"
N: Name="HUION 580 Consumer Control"
N: Name="HUION 580 System Control"

$ for i in `ls /dev/input/by-id/usb-HUION_580-*` ;do sudo evemu-describe $i | grep "N: "; done;

N: HUION 580 Consumer Control
N: HUION 580 Pen
N: HUION 580 Mouse
error: could not describe device
N: HUION 580 Keyboard
error: could not describe device

The two errors to std err were there before but not directed to the saved file.

Comment 7 Peter Hutterer 2016-03-07 04:05:23 UTC
You still have the same kernel devices, libinput doesn't affect them. What does change is that the "consumer control" device just won't be recognised by libinput, so any events from that won't show up in your desktop session. That's what we need to fix by labeling it as keyboard rather than a tablet.

Comment 8 Fedora Update System 2016-03-09 22:57:46 UTC
libinput-1.2.1-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9ca0993b8b

Comment 9 Fedora Update System 2016-03-11 13:26:10 UTC
libinput-1.2.1-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Peter Hutterer 2016-04-01 00:39:27 UTC
Can you give this one a test please?
http://koji.fedoraproject.org/koji/taskinfo?taskID=13522864

This is the fix for libwacom, but it'd like confirmation it works correctly on the physical device, not just on my emulated ones.

The difference you'll see is that if you run 
sudo udevadm info /sys/class/input/eventX (replace with the event node) the ID_INPUT_TABLET tag is not set anymore after the update. libinput thus doesn't need to ignore the device anymore and it should be picked up as keyboard and shown in libinput-list-devices.

Comment 11 paul59584 2016-04-01 01:38:10 UTC
Created attachment 1142439 [details]
huion device info (text file)

More devices now in output of: 
$ xinput list

Have one less occurrence of ID_INPUT_TABLET=1 after updating to libwacom-0.18-2.fc23.x86_64 in output of: 
$ for nuM in {0..6}; do sudo udevadm info /sys/class/input/event$nuM; done;

It is no longer set for input/by-id/usb-HUION_580-event-if02

Have attached file with output of following commands before and then after updating
$ xinput list
$ ll /dev/input/by-id/usb-H*
$ for nuM in {0..6}; do sudo udevadm info /sys/class/input/event$nuM; done;

Comment 12 Peter Hutterer 2016-04-01 02:21:14 UTC
excellent, thanks. A bit hard to associate the udev and the xorg output (different numbers) but from the xinput list output everything looks correct now too. I'll push this out as an update ASAP.

Comment 13 Fedora Update System 2016-04-01 02:45:05 UTC
libwacom-0.18-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-7748c05af9

Comment 14 Fedora Update System 2016-04-01 02:45:37 UTC
libwacom-0.18-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-79a2ffd871

Comment 15 Fedora Update System 2016-04-02 05:25:22 UTC
libwacom-0.18-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-79a2ffd871

Comment 16 Fedora Update System 2016-04-02 05:26:13 UTC
libwacom-0.18-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-7748c05af9

Comment 17 Fedora Update System 2016-04-05 13:51:19 UTC
libwacom-0.18-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2016-04-05 16:19:10 UTC
libwacom-0.18-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2016-04-06 14:08:17 UTC
libwacom-0.18-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.