×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    A Quick guide to setting up additional devices on Linux This guide was written on a desktop running Debian 8.0 it uses systemD the below will probably only work on that OS and its descendants


    General xinput[edit]

    List all input devices[edit]

    # xinput list [--long]
    
    

    e.g.

    xinput list
     Virtual core pointer                    	id=2	[master pointer  (3)]
       ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
       ↳ Kensington Kensington Slimblade Trackball	id=11	[slave  pointer  (2)]
       ↳ SynPS/2 Synaptics TouchPad              	id=14	[slave  pointer  (2)]
       ↳ TPPS/2 IBM TrackPoint                   	id=15	[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)]
        ↳ Video Bus                               	id=8	[slave  keyboard (3)]
        ↳ Sleep Button                            	id=9	[slave  keyboard (3)]
        ↳ Integrated Camera                       	id=10	[slave  keyboard (3)]
        ↳ Sun USB Keyboard                        	id=12	[slave  keyboard (3)]
        ↳ AT Translated Set 2 keyboard            	id=13	[slave  keyboard (3)]
        ↳ ThinkPad Extra Buttons                  	id=16	[slave  keyboard (3)]
    

    Get details of an input device[edit]

     # xinput list-props [device id] "[device name]"
     
     
    

    e.g.

     # xinput list-props "Kensington Kensington Slimblade Trackball" Or # xinput list-props 11
    Device 'Kensington Kensington Slimblade Trackball':
    	Device Enabled (138):	1
    	Coordinate Transformation Matrix (140):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    	Device Accel Profile (264):	0
    	Device Accel Constant Deceleration (265):	1.000000
    	Device Accel Adaptive Deceleration (266):	1.000000
    	Device Accel Velocity Scaling (267):	10.000000
    	Device Product ID (258):	1149, 8257
    	Device Node (259):	"/dev/input/event8"
    	Evdev Axis Inversion (268):	0, 0
    	Evdev Axes Swap (270):	0
    	Axis Labels (271):	"Rel X" (148), "Rel Y" (149), "Rel Vert Wheel" (263)
    	Button Labels (272):	"Button Left" (141), "Button Middle" (142), "Button Right" (143), "Button Wheel Up" (144), "Button Wheel Down" (145), "Button Horiz Wheel Left" (146), "Button Horiz Wheel Right" (147), "Button Side" (262), "Button Unknown" (261), "Button Unknown" (261), "Button Unknown" (261), "Button Unknown" (261)
    	Evdev Scrolling Distance (273):	1, 1, 1
    	Evdev Middle Button Emulation (274):	0
    	Evdev Middle Button Timeout (275):	50
    	Evdev Third Button Emulation (276):	0
    	Evdev Third Button Emulation Timeout (277):	1000
    	Evdev Third Button Emulation Button (278):	3
    	Evdev Third Button Emulation Threshold (279):	20
    	Evdev Wheel Emulation (280):	1
    	Evdev Wheel Emulation Axes (281):	6, 7, 4, 5
    	Evdev Wheel Emulation Inertia (282):	10
    	Evdev Wheel Emulation Timeout (283):	200
    	Evdev Wheel Emulation Button (284):	8
    	Evdev Drag Lock Buttons (285):	0
    

    Another example output from a more modded system

      # xinput list-props 16
    Device 'Kensington Kensington Slimblade Trackball':
    	Device Enabled (145):	1
    	Coordinate Transformation Matrix (147):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    	libinput Natural Scrolling Enabled (290):	0
    	libinput Natural Scrolling Enabled Default (291):	0
    	libinput Scroll Methods Available (294):	0, 0, 1
    	libinput Scroll Method Enabled (295):	0, 0, 1
    	libinput Scroll Method Enabled Default (296):	0, 0, 0
    	libinput Button Scrolling Button (308):	8
    	libinput Button Scrolling Button Default (309):	2
    	libinput Middle Emulation Enabled (300):	0
    	libinput Middle Emulation Enabled Default (301):	0
    	libinput Rotation Angle (669):	0.000000
    	libinput Rotation Angle Default (670):	0.000000
    	libinput Accel Speed (302):	0.000000
    	libinput Accel Speed Default (303):	0.000000
    	libinput Accel Profiles Available (310):	1, 1
    	libinput Accel Profile Enabled (311):	1, 0
    	libinput Accel Profile Enabled Default (312):	1, 0
    	libinput Left Handed Enabled (304):	0
    	libinput Left Handed Enabled Default (305):	0
     	libinput Send Events Modes Available (267):	1, 0
    	libinput Send Events Mode Enabled (268):	0, 0
    	libinput Send Events Mode Enabled Default (269):	0, 0
    	Device Node (270):	"/dev/input/event22"
    	Device Product ID (271):	1149, 8257
    	libinput Drag Lock Buttons (306):	<no items>
    	libinput Horizontal Scroll Enabled (307):	1
    


    Setting up "Kensington Kensington Slimblade Trackball"[edit]

    xinput version 1.6.2[edit]

    It seems in newer versions of xinput (used in Debian Stretch) use the options ScrollButton and ScrollMethod. Looking at the man page: [1] for inspiration I believe the below config will work.

    Set up via xinput[edit]

    xinput set-prop "Kensington Kensington Slimblade Trackball" "libinput Button Scrolling Button" 8
    xinput set-prop "Kensington Kensington Slimblade Trackball" "libinput Scroll Method Enabled" 0, 0, 1
    

    The first line is telling the xinput system use the upper-right button (Button 8 ) to trigger the navigation mode. The second line is to set the ScrollMethod method to button

    I don't think this is quite the right way to do it but it works for me!


    Via xorg.conf.d[edit]

    Create a file called "23-Kensington_Slimblade_Trackball.conf" in your xorg.conf.d (on Debian Stretch /usr/share/X11/xorg.conf.d/23-Kensington_Slimblade_Trackball.conf) with the below content

    Section "InputClass"
            Identifier      "Trackpoint Wheel Emulation"
            MatchProduct    "Kensington Kensington Slimblade Trackball"
            MatchDevicePath "/dev/input/event*"
            Option          "ScrollButton"          "8"
            Option          "ScrollMethod"          "button"
            Option          "XAxisMapping"          "6 7"
            Option          "YAxisMapping"          "4 5"
    EndSection
    

    Reload the udev rules

    # udevadm control --reload-rules
    


    xinput version ($OLDER)[edit]

    Set up via xinput[edit]

    xinput set-prop "Kensington Kensington Slimblade Trackball" "Evdev Wheel Emulation" 1
    xinput set-prop "Kensington Kensington Slimblade Trackball" "Evdev Wheel Emulation Button" 8
    xinput set-prop "Kensington Kensington Slimblade Trackball" "Evdev Wheel Emulation Axes" 6 7 4 5
    


    The first line is telling the xinput system to enable the mouse wheel emulation (similar to the navigation mode) The second line is to use the upper-right button (Button 8 ) to trigger the navigation mode. The third line make it work for both vertical and horizontal scroll.


    Deprecated method for the same[edit]

    # xinput set-int-prop "Kensington Kensington Slimblade Trackball" "Evdev Wheel Emulation" 8 1
    # xinput set-int-prop "Kensington Kensington Slimblade Trackball" "Evdev Wheel Emulation Button" 8 8
    # xinput set-int-prop "Kensington Kensington Slimblade Trackball" "Evdev Wheel Emulation Axes" 8 6, 7, 4, 5
    


    Via xorg.conf.d[edit]

    a very much work in progress but this seems to be working


    Some distributions now support the new Xorg hotplug configuration method via xorg.conf.d directories (in Ubuntu 10.04 Lucid Lynx) instead of hal. In contrast to the udev method below, it should be around for some time, so it might be the best way to “statically” configure scrolling.

    Create the file /usr/share/X11/xorg.conf.d/23-Kensington_Slimblade_Trackball.conf as root with the following content:

     Some systems use /usr/lib/X11/xorg.conf.d instead
    
    Section "InputClass"
    	Identifier	"Trackpoint Wheel Emulation"
    	MatchProduct	"Kensington Kensington Slimblade Trackball"
    	MatchDevicePath	"/dev/input/event*"
    	Option		"EmulateWheel"		"true"
    	Option		"EmulateWheelButton"	"8"
    	Option		"XAxisMapping"		"6 7"
    	Option		"YAxisMapping"		"4 5"
    EndSection
    


    Reload the udev rules

    # udevadm control --reload-rules
    



    Additional reading and notes taken from


    [2] [3] [4] [5]

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.