You are not logged in.

#1 2020-04-09 05:10:39

MrLinuxFish
Member
Registered: 2016-11-23
Posts: 23

[SOLVED] xorg / libinput configuration for trackball

I'm trying to put the settings for my trackball into /etc/X11/xorg.conf.d/40-trackball.conf so they automatically load when the trackball is plugged in, but I cant seem to get the settings to load. I have tried putting the settings block in various files and changing the number at the beginning because I know smaller numbers load first. After applying changes I have been logging out of xorg and running `startx` to reload the xorg configuration. I can't seem to figure out what I'm doing wrong.

Here's the configuration I put in /etc/X11/xorg.conf.d/40-trackball.conf

Section "InputClass"
    Identifier    "Elecom TrackBall"
    MatchVendor    "ELECOM"
    MatchProduct    "DEFT"
    Driver        "libinput"
    Option        "ScrollMethod"        "button"
    Option        "ScrollButton"        "3"
    Option        "MiddleEmulation"    "true"
EndSection

This is the output from xinput list

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ ELECOM ELECOM TrackBall Mouse           	id=9	[slave  pointer  (2)]
⎜   ↳ jackhumbert Planck                      	id=12	[slave  pointer  (2)]
⎜   ↳ jackhumbert Planck Consumer Control     	id=14	[slave  pointer  (2)]
⎜   ↳ ELECOM TrackBall Mouse DEFT Pro TrackBall Mouse	id=16	[slave  pointer  (2)]
⎜   ↳ ELECOM TrackBall Mouse DEFT Pro TrackBall Consumer Control	id=18	[slave  pointer  (2)]
⎜   ↳ HUION 420 Pad                           	id=21	[slave  pointer  (2)]
⎜   ↳ HUION 420 Consumer Control              	id=22	[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)]
    ↳ Power Button                            	id=8	[slave  keyboard (3)]
    ↳ HD Webcam C525                          	id=10	[slave  keyboard (3)]
    ↳ jackhumbert Planck                      	id=11	[slave  keyboard (3)]
    ↳ jackhumbert Planck System Control       	id=13	[slave  keyboard (3)]
    ↳ jackhumbert Planck                      	id=15	[slave  keyboard (3)]
    ↳ ELECOM TrackBall Mouse DEFT Pro TrackBall System Control	id=17	[slave  keyboard (3)]
    ↳ ELECOM TrackBall Mouse DEFT Pro TrackBall	id=19	[slave  keyboard (3)]
    ↳ HUION 420 Pen                           	id=20	[slave  keyboard (3)]
    ↳ ELECOM ELECOM TrackBall Mouse           	id=23	[slave  keyboard (3)]
    ↳ jackhumbert Planck Consumer Control     	id=24	[slave  keyboard (3)]
    ↳ ELECOM TrackBall Mouse DEFT Pro TrackBall Consumer Control	id=25	[slave  keyboard (3)]
    ↳ HUION 420 Consumer Control              	id=26	[slave  keyboard (3)]

Edit: I have the config working minus the fact that the scroll button sets itself to button 3 instead of button 2. I've posted the new config file and would still like help.

Last edited by MrLinuxFish (2020-04-16 06:34:34)

Offline

#2 2020-04-09 08:40:11

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] xorg / libinput configuration for trackball

You can check in the Xorg log file to see what Xorg tries to do with your config. Look for the line where the device gets found and then the following lines. Your device will show up more than once in the log file because it seems to show up as many different devices at the same time.

You can also look through the log and try to find the "Identifier" you used in your config file. Maybe change the identifier to something that's easier to find in the log file, like for example "my trackball settings".

Things I'm wondering about is, maybe MatchVendor isn't doing what you think it should. I'd try just using MatchProduct and removing the MatchVendor line. The xorg.conf man-page says that it's matching for a sub-string in the device name, so using the word "DEFT" should work fine.

The other thing I'm wondering about is, there's also a keyboard device. Maybe add a line so that it only applies to the mouse part of the device:

MatchIsPointer "yes"

Last edited by Ropid (2020-04-09 08:40:26)

Offline

#3 2020-04-09 19:08:42

MrLinuxFish
Member
Registered: 2016-11-23
Posts: 23

Re: [SOLVED] xorg / libinput configuration for trackball

I found out what most of my problem was. I had a few extra modules which were attempting to disable middle emulation and such. Also, using a larger number should make the module load later and overwrite any settings previously applied. I've got rid of those, but now I can't seem to get the scroll button to be button 2. I've changed it in the config file, but when I do a list-props on the device, I see it has scroll button 3.

Section "InputClass"
    Identifier "Elecom TrackBall"
    MatchProduct "DEFT"
    MatchIsPointer "yes"
    Driver "libinput"
    Option "ScrollMethod" "button"
    Option "ScrollButton" "2"
    Option "MiddleEmulation" "true"
EndSection

Offline

#4 2020-04-16 02:12:46

MrLinuxFish
Member
Registered: 2016-11-23
Posts: 23

Re: [SOLVED] xorg / libinput configuration for trackball

I'm still having a problem where it won't change the ScrollButton to button 2 even though I set that as the button in the 99-elecom.conf file.

Edit: I'm blind. The 40-libinput.conf file was overriding the settings from 99-elecom.conf.

Last edited by MrLinuxFish (2020-04-16 06:37:15)

Offline

Board footer

Powered by FluxBB