# Elantech touchpad: failed to read capability bits



## spartid (Oct 30, 2018)

Hello everyone,

Having freshly installed FreeBSD for the first time, I enjoy it a lot. The only problem I get is that my Elantech touchpad can't work properly. So, this is what I have:
- FreeBSD 11.2-RELEASE
- Laptop: Why! 650SZ

1) I installed x11/libsynaptics, x11-drivers/xf86-input-synaptics. devel/libevdev and x11-drivers/xf86-input-evdev are installed as well.

2) in /etc/rc.conf

```
dbus_enable="YES"
hald_enable="YES"
moused_enable="NO"
```

2) in /boot/loader.conf

```
hw.psm.elantech_support="1"
debug.psm.loglevel="2"
```

But this is the output of `dmesg -a`:

```
... snipped...
psm: status 45 0f 02
Elantech touchpad hardware v.3 firmware v.0x450f02
psm: SEND_AUX_DEV_STATUS return code: 00fa
psm: status 00 01 14
 Failed to read capability bits
... snipped...
psm: status 00 02 64
psm: <PS/2 Mouse>  flags 0x2000 irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Generic PS/2 Mouse, device ID 0-00, 3 buttons
psm0: config: 00002000, flags 00000008, packet size: 3
psm0: syncmask: c0, syncbits: 00
```

It seems that my touchpad is recognised, but because the capability bits can't be read, Xorg falls back to the Generic PS/2 Mouse model.
So I searched through the Web about that. I found the psm(4) driver source code, which says the following about the Elantech touchpad:

```
}      
 
    /* Get the Touchpad model information. */      
    elanhw.hwversion = hwversion;      
    elanhw.issemimt = hwversion == 2;      
    elanhw.isclickpad = (resp[1] & 0x10) != 0;      
    elanhw.hascrc = (resp[1] & 0x40) != 0;      
    elanhw.haspressure = elanhw.fwversion >= 0x020800;      
 
    /* Read the capability bits. */      
 
    if (elantech_cmd(kbdc, hwversion, ELANTECH_CAPABILITIES, resp) != 0) {      
        printf("  Failed to read capability bits\n");      
        return (FALSE);      
     }
```

I'm not really sure what else to provide...
I'm sorry but I'm not (yet) able to program in C. What I understand is the following: if the values passed in the function `elantech_cmd` are different from 0, then the capability bits can't be read, which is the case for me. So, there comes my questions : what do I have to do if I want the capability bits to be read ? What did I do wrong whith my configuration ?

Cheers,
spartid


----------



## SirDice (Oct 30, 2018)

Don't enable moused(8).


----------



## spartid (Nov 1, 2018)

Hello,

Thank you very much for your reply and your advice. moused(8) wasn't and isn't enabled, but I'll keep it disabled, then ! Perhaps it would give me better results if I installed devel/libudev-devd, loaded evdev(4) at boot time, and installed x11/libinput and x11-drivers/xf86-input-libinput...

I'll test it on sunday when I have time.


----------



## SirDice (Nov 2, 2018)

The last time I used a Syntaptics touchpad I had to make sure moused(8) didn't interfere and configure Xorg to use the correct driver. But that was years ago, I'm not sure if the automatic detection finds the right driver for the touchpad.

If you can, please post a recent /var/log/Xorg.0.log so we can have a look at what's being detected and what not.


----------



## spartid (Nov 5, 2018)

That's what I intented to do, having read about problems with Synaptics and Elantech touchpad on this forum before posting... So here comes my /var/log/Xorg.0.log:


```
...snipped...
[   164.674] (II) LoadModule: "synaptics"
...snipped...
[   165.216] (**) kbdmux: Applying InputClass "Touchpad0"
[   165.216] (**) kbdmux: Applying InputClass "Keyboard0"
[   165.216] (II) LoadModule: "kbd"
[   165.217] (II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
[   165.217] (II) Module kbd: vendor="X.Org Foundation"
[   165.217]     compiled for 1.18.4, module version = 1.9.0
[   165.217]     Module class: X.Org XInput Driver
[   165.217]     ABI class: X.Org XInput driver, version 22.1
[   165.217] (II) Using input driver 'kbd' for 'kbdmux'
[   165.217] (**) kbdmux: always reports core events
[   165.217] (**) kbdmux: always reports core events
[   165.217] (**) Option "Protocol" "psm"
[   165.217] (EE) "psm" is not a valid keyboard protocol name
[   165.217] (EE) PreInit returned 8 for "kbdmux"
[   165.217] (II) UnloadModule: "kbd"
[   165.218] (II) config/devd: kbdmux is enabled, ignoring device atkbd0
[   165.218] (II) config/devd: adding input device (null) (/dev/sysmouse)
[   165.218] (**) sysmouse: Applying InputClass "Touchpad0"
[   165.218] (II) Using input driver 'synaptics' for 'sysmouse'
[   165.218] (**) sysmouse: always reports core events
[   165.218] (**) Option "Protocol" "psm"
[   165.218] (**) Option "Device" "/dev/psm0"
[   165.239] (--) synaptics: sysmouse: invalid x-axis range.  defaulting to 1615 - 5685
[   165.239] (--) synaptics: sysmouse: invalid y-axis range.  defaulting to 1729 - 4171
[   165.239] (--) synaptics: sysmouse: invalid pressure range.  defaulting to 0 - 255
[   165.239] (--) synaptics: sysmouse: invalid finger width range.  defaulting to 0 - 15
[   165.239] (**) Option "VertTwoFingerScroll" "on"
[   165.239] (**) Option "TapButton1" "0"
[   165.240] (**) Option "TapButton2" "0"
[   165.240] (**) Option "TapButton3" "0"
[   165.240] (EE) synaptics: sysmouse: sysmouse Found no Synaptics, found Mouse model 0 instead
[   165.240] (--) synaptics: sysmouse: no supported touchpad found
[   165.240] (EE) synaptics: sysmouse: Unable to query/initialize Synaptics hardware.
[   165.278] (EE) PreInit returned 11 for "sysmouse"
[   165.278] (II) UnloadModule: "synaptics"
[   165.341] (II) config/devd: adding input device Mouse (/dev/psm0)
[   165.341] (**) Mouse: Applying InputClass "Touchpad0"
[   165.341] (II) Using input driver 'synaptics' for 'Mouse'
[   165.341] (**) Mouse: always reports core events
[   165.341] (**) Option "Protocol" "psm"
[   165.341] (**) Option "Device" "/dev/psm0"
[   165.360] (--) synaptics: Mouse: invalid x-axis range.  defaulting to 1615 - 5685
[   165.360] (--) synaptics: Mouse: invalid y-axis range.  defaulting to 1729 - 4171
[   165.360] (--) synaptics: Mouse: invalid pressure range.  defaulting to 0 - 255
[   165.360] (--) synaptics: Mouse: invalid finger width range.  defaulting to 0 - 15
[   165.360] (**) Option "VertTwoFingerScroll" "on"
[   165.360] (**) Option "TapButton1" "0"
[   165.361] (**) Option "TapButton2" "0"
[   165.361] (**) Option "TapButton3" "0"
[   165.361] (EE) synaptics: Mouse Found no Synaptics, found Mouse model 0 instead
[   165.361] (--) synaptics: Mouse: no supported touchpad found
[   165.361] (EE) synaptics: Mouse: Unable to query/initialize Synaptics hardware.
[   165.401] (EE) PreInit returned 11 for "Mouse"
[   165.401] (II) UnloadModule: "synaptics"
```

It sounds a lot like this thread to me, but I here the touchpad was properly detected (and, odd enough, the poster solved his problem by enabling moused(8). I most probably made a mistake somewhere and/or missed something important, but what or where ? Anyway, I have an other (possibly stupid) question, but I'd like to understand as much as I can. The kernel "meets" the hardware before Xorg is to be loaded, doesn't it ? Because if yes, how can a modification of my Xorg config alter the fact that my touchpad's capability bits can't be read ?


----------



## SirDice (Nov 6, 2018)

I'm a little worried as it's still picking up /dev/sysmouse, it should only exist if moused(8) is running. Are you sure it's PS/2? Most modern laptops use USB for their keyboard and mouse. USB mice automatically load moused(8) through devd(8).


----------



## spartid (Nov 7, 2018)

That's a very good question. It seems so, because `dmesg` returns it as PS/2, in FreeBSD...

```
dmesg | grep -i mouse

psm0: <PS/2 Mouse> flags 0x2000  irq12 on atkbdc0
psm0: model Generic PS/2 Mouse, device ID 0-00, 3 buttons
```
... and in Linux (a live USB of the last Ubuntu version) as well:

```
[    7.531005] psmouse serio2: elantech: assuming hardware version 3 (with firmware version 0x450f02)
[    7.632243] psmouse serio2: elantech: Synaptics capabilities query result 0x79, 0x17, 0x0c.
[    7.731482] psmouse serio2: elantech: Elan sample query result 03, 4d, 85
[    8.058523] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio2/input/input10
```
/proc/bus/input/devices/ in Ubuntu lists it as a PS/2 mouse as well:

```
I: Bus=0011 Vendor=0002 Product=000e Version=0000
N: Name="ETPS/2 Elantech Touchpad"
P: Phys=isa0060/serio2/input0
S: Sysfs=/devices/platform/i8042/serio2/input/input10
U: Uniq=
H: Handlers=mouse0 event6 
B: PROP=9
B: EV=b
B: KEY=6420 30000 0 0 0 0
B: ABS=260800011000003
```
And for the keyboard:

```
I: Bus=0011 Vendor=0001 Product=0001 Version=ab83
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input4
U: Uniq=
H: Handlers=sysrq kbd event4 leds 
B: PROP=0
B: EV=120013
B: KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7
```
So the keyboard is an AT keyboard, hence its handling by atkbdc(4), I think... 
Neither my touchpad nor my keybord run over I2C, otherwise Ubuntu would have told me so by loading the corresponding driver, but `lsmod` doesn't list anything about the mouse but `psmouse`. Do you think I could change things by disabling hald(8) and write everything by hand ?


----------



## SirDice (Nov 7, 2018)

spartid said:


> That's a very good question. It seems so, because  dmesg returns it as PS/2, in FreeBSD...


Yep, that clearly shows PS/2. 



spartid said:


> Do you think I could change things by disabling hald(8) and write everything by hand ?


HAL doesn't have anything to do with it. So it doesn't matter if it's running or not, for X at least. The xorg-server was changed to rely on devd(8) instead of HAL quite some time ago.


----------



## spartid (Nov 26, 2018)

Hello,

Sorry for the long delay. In the meantime I tried the following:
- I compiled my own kernel with evdev support
- I installed x11/libinput and x11-drivers/xf86-input-libinput

So this is what I did in my /usr/local/etc/X11/xorg.conf:

```
...snipped...
Section "InputDevice"
    Identifier      "Keyboard0"
    Driver          "kbd"
    Option        "CoreKeyboard"
    Option        "XkbRules"    "evdev"
    Option        "XkbModel"    "pc105"
    Option        "XkbLayout"    "ch"
    Option        "XkbVariant"    "fr"
    Option        "XkbOptions"    "terminate:ctrl_alt_bksp"
EndSection

Section "InputDevice"
    Identifier    "Mouse0"
    Driver        "libinput"
    Option        "Device"    "/dev/input/event3"
EndSection

Section "InputDevice"
    Identifier      "Mouse0"
    Driver          "mouse"
#    Option            "Protocol" "auto"
#    Option            "Device" "/dev/sysmouse"
#    Option            "ZAxisMapping" "4 5 6 7"
    Option        "Ignore"    "on"
EndSection

Section "InputClass"
    Identifier    "Keyboard0"
    Driver        "keyboard"
    MatchIsKeyboard    "on"
    Option        "XkbModel"    "pc105"
    Option        "XKbLayout"    "ch"
    Option        "XkbVariant"    "fr"
EndSection

Section "InputClass"
    Identifier    "Mouse0"
    Driver        "libinput"
    Option        "Device"    "/dev/input/event3"
    Option        "ScrollMethod"    "button"
    Option        "Tapping"    "off"
EndSection
...snipped...
```

And this is what I got in /var/log/Xorg.0.log:

```
...snipped...

[  2203.402] 
X.Org X Server 1.18.4
Release Date: 2016-07-19
[  2203.403] X Protocol Version 11, Revision 0
[  2203.403] Build Operating System: FreeBSD 11.2-SYNTH amd64 
[  2203.403] Current Operating System: FreeBSD oroshi.org 11.2-RELEASE FreeBSD 11.2-RELEASE #0: Wed Nov  7 18:47:48 CET 2018     root@oroshi.org:/usr/obj/usr/src/sys/OROSHI amd64
[  2203.403] Build Date: 21 October 2018  01:30:12PM
[  2203.403]  
[  2203.403] Current version of pixman: 0.34.0
[  2203.403]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[  2203.403] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  2203.404] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Nov 26 09:49:34 2018
[  2203.404] (==) Using config file: "/usr/local/etc/X11/xorg.conf"
[  2203.404] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[  2203.404] (==) ServerLayout "X.org Configured"
[  2203.404] (**) |-->Screen "Screen0" (0)
[  2203.404] (**) |   |-->Monitor "Monitor0"
[  2203.405] (**) |   |-->Device "Card0"
[  2203.405] (**) |-->Input Device "Mouse0"
[  2203.405] (**) |-->Input Device "Keyboard0"
[  2203.405] (==) Automatically adding devices
[  2203.405] (==) Automatically enabling devices
[  2203.405] (==) Not automatically adding GPU devices

...snipped...

[  2203.896] (II) Using input driver 'libinput' for 'Mouse0'
[  2203.896] (**) Option "CorePointer"
[  2203.896] (**) Mouse0: always reports core events
[  2203.896] (**) Option "Device" "/dev/input/event3"
[  2204.035] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is tagged by udev as: Mouse
[  2204.035] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is a pointer caps
[  2204.075] (II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE, id 6)
[  2204.075] (**) Option "AccelerationScheme" "none"
[  2204.075] (**) Mouse0: (accel) selected scheme none/0
[  2204.075] (**) Mouse0: (accel) acceleration factor: 2.000
[  2204.075] (**) Mouse0: (accel) acceleration threshold: 4
[  2204.220] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is tagged by udev as: Mouse
[  2204.220] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is a pointer caps
[  2204.220] (II) config/devd: probing input devices...
[  2204.220] (II) config/devd: adding input device (null) (/dev/kbdmux)
[  2204.220] (**) kbdmux: Applying InputClass "Keyboard0"
[  2204.220] (**) kbdmux: Applying InputClass "Mouse0"
[  2204.220] (II) Using input driver 'libinput' for 'kbdmux'
[  2204.220] (**) kbdmux: always reports core events
[  2204.220] (**) Option "Device" "/dev/input/event3"
[  2204.220] (**) Option "_source" "server/devd"
[  2204.221] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is tagged by udev as: Mouse
[  2204.221] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is a pointer caps
[  2204.221] (**) Option "ScrollMethod" "button"
[  2204.221] (**) Option "config_info" "devd:kbdmux"
[  2204.221] (II) XINPUT: Adding extended input device "kbdmux" (type: MOUSE, id 7)
[  2204.222] (**) Option "AccelerationScheme" "none"
[  2204.222] (**) kbdmux: (accel) selected scheme none/0
[  2204.222] (**) kbdmux: (accel) acceleration factor: 2.000
[  2204.222] (**) kbdmux: (accel) acceleration threshold: 4
[  2204.223] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is tagged by udev as: Mouse
[  2204.223] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is a pointer caps
[  2204.223] (II) config/devd: kbdmux is enabled, ignoring device atkbd0
[  2204.223] (II) config/devd: adding input device (null) (/dev/sysmouse)
[  2204.223] (**) sysmouse: Applying InputClass "Mouse0"
[  2204.223] (II) Using input driver 'libinput' for 'sysmouse'
[  2204.223] (**) sysmouse: always reports core events
[  2204.223] (**) Option "Device" "/dev/input/event3"
[  2204.223] (**) Option "_source" "server/devd"
[  2204.224] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is tagged by udev as: Mouse
[  2204.224] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is a pointer caps
[  2204.224] (**) Option "ScrollMethod" "button"
[  2204.224] (**) Option "config_info" "devd:sysmouse"
[  2204.225] (II) XINPUT: Adding extended input device "sysmouse" (type: MOUSE, id 8)
[  2204.225] (**) Option "AccelerationScheme" "none"
[  2204.225] (**) sysmouse: (accel) selected scheme none/0
[  2204.225] (**) sysmouse: (accel) acceleration factor: 2.000
[  2204.225] (**) sysmouse: (accel) acceleration threshold: 4
[  2204.226] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is tagged by udev as: Mouse
[  2204.226] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is a pointer caps
[  2204.226] (II) config/devd: adding input device Mouse (/dev/psm0)
[  2204.226] (**) Mouse: Applying InputClass "Mouse0"
[  2204.226] (II) Using input driver 'libinput' for 'Mouse'
[  2204.226] (**) Mouse: always reports core events
[  2204.226] (**) Option "Device" "/dev/input/event3"
[  2204.226] (**) Option "_source" "server/devd"
[  2204.227] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is tagged by udev as: Mouse
[  2204.227] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is a pointer caps
[  2204.227] (**) Option "ScrollMethod" "button"
[  2204.227] (**) Option "config_info" "devd:psm0"
[  2204.227] (II) XINPUT: Adding extended input device "Mouse" (type: MOUSE, id 9)
[  2204.227] (**) Option "AccelerationScheme" "none"
[  2204.228] (**) Mouse: (accel) selected scheme none/0
[  2204.228] (**) Mouse: (accel) acceleration factor: 2.000
[  2204.228] (**) Mouse: (accel) acceleration threshold: 4
[  2204.229] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is tagged by udev as: Mouse
[  2204.229] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is a pointer caps
[  2204.353] (II) intel(0): EDID vendor "LGD", prod id 803
[  2204.353] (II) intel(0): Printing DDC gathered Modelines:
[  2204.353] (II) intel(0): Modeline "1920x1080"x0.0  138.00  1920 1952 1988 2088  1080 1085 1090 1102 -hsync -vsync (66.1 kHz eP)
[  2204.397] (II) intel(0): EDID vendor "LGD", prod id 803
[  2204.397] (II) intel(0): Printing DDC gathered Modelines:
[  2204.397] (II) intel(0): Modeline "1920x1080"x0.0  138.00  1920 1952 1988 2088  1080 1085 1090 1102 -hsync -vsync (66.1 kHz eP)
[  2208.135] (II) AIGLX: Suspending AIGLX clients for VT switch
```

It seems to me that there's a conflict between two mouses, the one detected by libinput and sysmouse, though I thought it would be ignored by X. /var/log/Xorg.0.log doesn't display any error, but still, I can't use my keyboard nor my touchpad with this configuration. Looks like I didn't do it properly... is there anything more you need me to provide or to do to help ?


----------



## tingo (Nov 26, 2018)

You can't have several things named the same and expect it to work (="Mouse0" in this case). Leave the first instance as Mouse0, change the other to have an unique identifier (Mouse1, Mouse2 and so on).


----------



## spartid (Dec 2, 2018)

Of course, how could I be so stupid, thanks for pointing this... Anyway, I did some changes to my /usr/local/etc/X11/xorg.conf and this is how it looks like:


```
Section "ServerLayout"
    Identifier         "X.org Configured"
    Screen          0  "Screen0" 0 0
    InputDevice        "Mouse0"         "CorePointer"
    InputDevice        "Keyboard0"         "CoreKeyboard"
EndSection

Section "ServerFlags"
    Option        "AutoAddDevices"    "off"
EndSection

Section "Files"
    ModulePath       "/usr/local/lib/xorg/modules"
    FontPath         "/usr/local/share/fonts/misc/"
    FontPath         "/usr/local/share/fonts/TTF/"
    FontPath         "/usr/local/share/fonts/OTF/"
    FontPath         "/usr/local/share/fonts/Type1/"
    FontPath         "/usr/local/share/fonts/100dpi/"
    FontPath         "/usr/local/share/fonts/75dpi/"
    FontPath    "/usr/local/share/fonts/Liberation/"
    FontPath    "/usr/local/share/fonts/Caladea/"
    FontPath    "/usr/local/share/fonts/Carlito/"
    FontPath    "/usr/local/share/fonts/LinLibertineG/"
    FontPath    "/usr/local/share/fonts/dejavu/"
    FontPath    "/usr/local/share/fonts/GentiumBasic/"
    FontPath    "/usr/local/share/fonts/twemoji-color-font-ttf/"
EndSection

Section "Module"
    Load      "glx"
    Load    "libinput"
    #Load    "kbd"
    Load    "dri"
EndSection

Section "InputDevice"
    Identifier      "Keyboard0"
    Driver          "libinput"
    #Driver        "kbd"
    Option        "Device"    "/dev/input/event2"
    Option        "CoreKeyboard"
    Option        "XkbRules"    "evdev"
EndSection

Section "InputDevice"
    Identifier    "Mouse0"
    Driver        "libinput"
    #Driver        "mouse"
    Option        "Device"    "/dev/input/event3"
    #Option        "Device"    "/dev/sysmouse"
EndSection

#Section "InputClass"
#    Identifier    "System keyboard multiplexer"
#    MatchDevicePath    "/dev/input/event1"
#    Option        "Ignore"    "on"
#EndSection

Section "InputClass"
    Identifier    "Keyboard0"
    Driver        "libinput"
    #Driver        "keyboard"
    Option        "Device"    "/dev/input/event2"
    MatchIsKeyboard    "on"
    Option        "XkbModel"    "pc105"
    Option        "XKbLayout"    "ch"
    Option        "XkbVariant"    "fr"
EndSection

Section "InputClass"
    Identifier    "Mouse0"
    Driver        "libinput"
    Option        "Device"        "/dev/input/event3"
    Option        "DisableWhileTyping"    "on"
    Option        "MiddleEmulation"    "on"
    Option        "ScrollMethod"        "button"
    Option        "ScrollButton"        "1"
EndSection

...snipped...
```

I finally understood SirDice's advice and disabled AutoAddDevices, so /dev/sysmouse won't appear in the game. But it still doesn't work yet, because this is what my /var/log/Xorg.0.log says:


```
3987.657] (II) Using input driver 'libinput' for 'Mouse0'
[  3987.657] (**) Option "CorePointer"
[  3987.657] (**) Mouse0: always reports core events
[  3987.657] (**) Option "Device" "/dev/input/event3"
[  3987.801] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is tagged by udev as: Mouse
[  3987.801] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is a pointer caps
[  3987.840] (II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE, id 6)
[  3987.841] (**) Option "AccelerationScheme" "none"
[  3987.841] (**) Mouse0: (accel) selected scheme none/0
[  3987.841] (**) Mouse0: (accel) acceleration factor: 2.000
[  3987.841] (**) Mouse0: (accel) acceleration threshold: 4
[  3987.983] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is tagged by udev as: Mouse
[  3987.983] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is a pointer caps
[  3987.983] (II) Using input driver 'libinput' for 'Keyboard0'
[  3987.983] (**) Option "CoreKeyboard"
[  3987.983] (**) Keyboard0: always reports core events
[  3987.983] (**) Option "Device" "/dev/input/event2"
[  3987.984] (II) input device 'AT keyboard', /dev/input/event2 is tagged by udev as: Keyboard
[  3987.984] (II) input device 'AT keyboard', /dev/input/event2 is a keyboard
[  3987.984] (II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD, id 7)
[  3987.984] (**) Option "xkb_rules" "evdev"
[  3988.064] (II) input device 'AT keyboard', /dev/input/event2 is tagged by udev as: Keyboard
[  3988.064] (II) input device 'AT keyboard', /dev/input/event2 is a keyboard
[  3988.064] (II) config/devd: probing input devices...
[  3988.064] (II) config/devd: adding input device (null) (/dev/kbdmux)
[  3988.064] (II) AutoAddDevices is off - not adding device.
[  3988.065] (II) config/devd: kbdmux is enabled, ignoring device atkbd0
[  3988.065] (II) config/devd: adding input device (null) (/dev/sysmouse)
[  3988.065] (II) AutoAddDevices is off - not adding device.
[  3988.065] (II) config/devd: adding input device Mouse (/dev/psm0)
[  3988.065] (II) AutoAddDevices is off - not adding device.
[  3988.184] (II) intel(0): EDID vendor "LGD", prod id 803
[  3988.184] (II) intel(0): Printing DDC gathered Modelines:
[  3988.184] (II) intel(0): Modeline "1920x1080"x0.0  138.00  1920 1952 1988 2088  1080 1085 1090 1102 -hsync -vsync (66.1 kHz eP)
[  3988.318] (II) intel(0): EDID vendor "LGD", prod id 803
[  3988.318] (II) intel(0): Printing DDC gathered Modelines:
[  3988.318] (II) intel(0): Modeline "1920x1080"x0.0  138.00  1920 1952 1988 2088  1080 1085 1090 1102 -hsync -vsync (66.1 kHz eP)
[  3991.323] (II) AIGLX: Suspending AIGLX clients for VT switch
```

So my keyboard and touchpad are recognised and accepted as they are, but then none of my options are applied and neither the touchpad nor the keyboard work. Can you see what I'm missing ?


----------



## tingo (Dec 3, 2018)

You still have things named the same. You need to decide if you want to use InputClass or InputDevice for your keyboard for example. If all you want to do with a keyboard (any keyboard) is to set language and layout, this is enough:

```
tingo@kg-core1$ more /usr/local/etc/X11/xorg.conf.d/keyboard-no.conf
Section "InputClass"
        Identifier "keyboard defaults"
        MatchIsKeyboard "on"
        Option      "XkbLayout" "no"
EndSection
```
changed to fit your preferences, naturally.


----------



## spartid (Dec 3, 2018)

Okay, thanks for the hint ! So I went the InputDevice way, getting a file like that:

```
Section "ServerLayout"
    Identifier         "X.org Configured"
    Screen          0  "Screen0" 0 0
    InputDevice        "Mouse0"         "CorePointer"
    InputDevice        "Keyboard0"         "CoreKeyboard"
EndSection

Section "ServerFlags"
    Option        "AutoAddDevices"    "off"
EndSection

Section "Files"
    ModulePath       "/usr/local/lib/xorg/modules"
    FontPath         "/usr/local/share/fonts/misc/"
    FontPath         "/usr/local/share/fonts/TTF/"
    FontPath         "/usr/local/share/fonts/OTF/"
    FontPath         "/usr/local/share/fonts/Type1/"
    FontPath         "/usr/local/share/fonts/100dpi/"
    FontPath         "/usr/local/share/fonts/75dpi/"
    FontPath    "/usr/local/share/fonts/Liberation/"
    FontPath    "/usr/local/share/fonts/Caladea/"
    FontPath    "/usr/local/share/fonts/Carlito/"
    FontPath    "/usr/local/share/fonts/LinLibertineG/"
    FontPath    "/usr/local/share/fonts/dejavu/"
    FontPath    "/usr/local/share/fonts/GentiumBasic/"
    FontPath    "/usr/local/share/fonts/twemoji-color-font-ttf/"
EndSection

Section "Module"
    Load      "glx"
    Load    "libinput"
    Load    "kbd"
    Load    "dri"
EndSection

Section "InputDevice"
    Identifier      "Keyboard0"
    #Driver          "libinput"
    Driver        "kbd"
    Option        "Device"        "/dev/input/event2"
    Option        "CoreKeyboard"
    Option        "XkbRules"        "evdev"
    Option        "XkbModel"        "pc105"
    Option        "XkbLayout"        "ch"
    Option        "XkbVariant"        "fr"
EndSection

Section "InputDevice"
    Identifier    "Mouse0"
    Driver        "libinput"
    #Driver        "mouse"
    Option        "Device"        "/dev/input/event3"
    #Option       "Device"        "/dev/sysmouse"
    Option        "DisableWhileTyping"    "on"
    Option        "MiddleEmulation"    "on"
    Option        "ScrollMethod"        "button"
    Option        "ScrollButton"        "1"
EndSection
..snipped...
```
And that are the logs Xorg returned to me:

```
[  1165.854] (II) Using input driver 'libinput' for 'Mouse0'
[  1165.854] (**) Option "CorePointer"
[  1165.854] (**) Mouse0: always reports core events
[  1165.854] (**) Option "Device" "/dev/input/event3"
[  1165.997] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is tagged by udev as: Mouse
[  1165.997] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is a pointer caps
[  1166.037] (**) Option "ScrollMethod" "button"
[  1166.037] (**) Option "ScrollButton" "1"
[  1166.037] (**) Option "MiddleEmulation" "on"
[  1166.037] (II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE, id 6)
[  1166.038] (**) Option "AccelerationScheme" "none"
[  1166.038] (**) Mouse0: (accel) selected scheme none/0
[  1166.038] (**) Mouse0: (accel) acceleration factor: 2.000
[  1166.038] (**) Mouse0: (accel) acceleration threshold: 4
[  1166.182] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is tagged by udev as: Mouse
[  1166.182] (II) input device 'Generic PS/2 mouse', /dev/input/event3 is a pointer caps
[  1166.182] (II) Using input driver 'kbd' for 'Keyboard0'
[  1166.182] (**) Option "CoreKeyboard"
[  1166.182] (**) Keyboard0: always reports core events
[  1166.182] (**) Keyboard0: always reports core events
[  1166.182] (**) Option "Protocol" "standard"
[  1166.182] (**) Option "Device" "/dev/input/event2"
[  1166.182] (**) Option "XkbRules" "evdev"
[  1166.182] (**) Option "XkbModel" "pc105"
[  1166.182] (**) Option "XkbLayout" "ch"
[  1166.182] (**) Option "XkbVariant" "fr"
[  1166.182] (II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD, id 7)
[  1166.251] (II) config/devd: probing input devices...
[  1166.251] (II) config/devd: adding input device (null) (/dev/kbdmux)
[  1166.251] (II) AutoAddDevices is off - not adding device.
[  1166.251] (II) config/devd: kbdmux is enabled, ignoring device atkbd0
[  1166.252] (II) config/devd: adding input device (null) (/dev/sysmouse)
[  1166.252] (II) AutoAddDevices is off - not adding device.
[  1166.252] (II) config/devd: adding input device Mouse (/dev/psm0)
[  1166.252] (II) AutoAddDevices is off - not adding device.
[  1166.365] (II) intel(0): EDID vendor "LGD", prod id 803
[  1166.365] (II) intel(0): Printing DDC gathered Modelines:
[  1166.365] (II) intel(0): Modeline "1920x1080"x0.0  138.00  1920 1952 1988 2088  1080 1085 1090 1102 -hsync -vsync (66.1 kHz eP)
[  1166.498] (II) intel(0): EDID vendor "LGD", prod id 803
[  1166.498] (II) intel(0): Printing DDC gathered Modelines:
[  1166.498] (II) intel(0): Modeline "1920x1080"x0.0  138.00  1920 1952 1988 2088  1080 1085 1090 1102 -hsync -vsync (66.1 kHz eP)
[  1193.514] (II) AIGLX: Suspending AIGLX clients for VT switch
```
But still, neither my keyboard nor my touchpad would work. So I think I'll ask a mailing list about that, and try to disable the 'tap-to-click' behaviour in the meantime, at least. This is the biggest pain in the arse, I can live without two-finger scroll and other things, even if they are very nice.


----------

