You are not logged in.

#1 2019-08-09 01:25:19

ThinkPad
Member
Registered: 2019-01-29
Posts: 125

[SOLVED] xorg.conf: How to enter a two-column value for InputClass opt

I am adjusting the Accel Speed and Accel Profile of my ThinkPad X390's TrackPoint using libinput and an xorg.conf file:

/etc/X11/xorg.conf.d/20-thinkpad.conf
----
Section "InputClass"
        Identifier "TrackPoint"
        Driver "libinput"
        MatchIsPointer "true"
        Option "Accel Speed" "1"
        Option "Accel Profile Enabled" "0, 1"
EndSection

The Accel Speed option and value register. The Accel Profile value does not, and the default value persists ('0, 1' enables the 'flat' Accel Profile). I have tried entering it as "0 1", "0, 1", "{0, 1}", "{0 1}" and "0" "1" with and without quotes. Without quotes gives an error (specified in xorg.conf manual).

The xinput commands that work:

#  xinput set-prop "Elan TrackPoint" "libinput Accel Profile Enabled" 0 1
#  xinput set-prop "Elan TrackPoint" "libinput Accel Profile Enabled" 0, 1

In short, how can I enter this two-column value?


SOLUTION:
See #2 and #5.

Last edited by ThinkPad (2019-08-09 17:48:19)

Offline

#2 2019-08-09 01:36:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] xorg.conf: How to enter a two-column value for InputClass opt

Have you seen this?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2019-08-09 03:43:51

ThinkPad
Member
Registered: 2019-01-29
Posts: 125

Re: [SOLVED] xorg.conf: How to enter a two-column value for InputClass opt

I didn't catch that. Just tested and it works, thank you. I still would like to know if there's a way to enter a two-column value.

Offline

#4 2019-08-09 11:18:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] xorg.conf: How to enter a two-column value for InputClass opt

There is no concept of columns there, just keys and values.  The value may be a list but it must be what that parameter requires.  In this case, it just seems that the key value pairs are different for Xorg.conf and xinput set-prop.  Why they are different is a good question - for which I have no answer.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2019-08-09 14:13:31

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

Re: [SOLVED] xorg.conf: How to enter a two-column value for InputClass opt

The options for the xorg.conf file are explained in "man 4 libinput". The names you see in the output of "xinput list-props ..." cannot be used in an xorg.conf file. You need to translate things and use the names documented in the libinput man-page.

For example, in your config you are currently using a name "Accel Profile Enabled", but it has to be "AccelProfile". You use "Accel Speed", but that has to be "AccelSpeed".

The man-page also explains what values you have to use for the options. You currently use a value "0, 1", but the value has to be either "adaptive" or "flat".

Offline

#6 2019-08-09 17:45:02

ThinkPad
Member
Registered: 2019-01-29
Posts: 125

Re: [SOLVED] xorg.conf: How to enter a two-column value for InputClass opt

Thank you. I had a feeling they differed but I couldn't find info in the libinput manual. That's because I was defaulting to the libinput(1) manual. This clears that up. Marking as solved.

The reason Accel Speed works is because xorg.conf is not white space or case sensitive. From the xorg.conf manual:

Config  file  keywords  are case-insensitive, and “_” characters are ignored.  Most strings (including Option names) are also case-insensitive, and insensitive to white space and “_” characters.

Offline

Board footer

Powered by FluxBB