Bug 58804

Summary: xinput --map-to-output 10 (keyboard related id) VGA1 (any display) - X segmentation fault
Product: xorg Reporter: Matthew Schultz <mattsch>
Component: Server/DDX/XorgAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: critical    
Priority: medium CC: kensington, pocek
Version: unspecified   
Hardware: All   
OS: Linux (All)   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=448098
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
xinput_x_crash_backtrace.txt none

Description Matthew Schultz 2012-12-27 13:43:38 UTC
Created attachment 72182 [details]
xinput_x_crash_backtrace.txt

If you specify a keyboard device as the device to map the input to with xinput instead of a pointer device, then X will segfault.

where 10 is a keyboard device and VGA1 is a crtc device name from xrandr:

xinput --map-to-output 10 VGA1

I think the expected behavior would be to show an error message saying you can only map pointer devices and not keyboard devices to a crtc.

Tested with xorg 1.13.1 and xinput 1.6.0.
Comment 1 Matthew Schultz 2017-03-05 05:23:53 UTC
It appears that X no longer segfaults when you specify the wrong device to map to (tested with xorg-server 1.18.4 and xinput 1.6.2):

xinput --map-to-output 12 eDP1
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  131 (XInputExtension)
  Minor opcode of failed request:  57 ()
  Serial number of failed request:  28
  Current serial number in output stream:  29

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.