# Elantech touchpad is not wirking

## oxensepp

hello, 

i have troubles with my Elantech touchpad. 

I did a fresh install as described in "sakakis efi install guide", using openRC, but left out the plymouth/gnome stuff.(fvwm instead)

the system works, but nothing happens when moving my fingers on the touchpad or cklicking the"mouse" buttons. 

An USB mouse however works fine. Because I can use the touchpad on Windows on the same computer, the hardware is basically working.

I saw that several other users have also problems with that piece of hardware and I tried drawing hints for a solution of my problem, i.e. I tried some variants of /usr/share/X11/xorg.conf/* and recompiled several times my kernel, but without any success. I must admit that I am not really familiar with that X11/wayland stuff, and my doing is just only try and error. 

So any hints are welcome. 

Let me give some information about my system:

```
liszt ~ # uname -a

Linux liszt 5.4.28-gentoo-x86_64 #12 SMP Fri May 1 19:20:03 CEST 2020 x86_64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz GenuineIntel GNU/Linux

```

```
liszt ~ # dmesg | grep -i elan 

[   25.369654] psmouse serio2: elantech: assuming hardware version 4 (with firmware version 0x5d0f02)

[   25.398613] psmouse serio2: elantech: Synaptics capabilities query result 0x51, 0x16, 0x0d.

[   25.426986] psmouse serio2: elantech: Elan sample query result 02, 85, 86

[   25.591358] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio2/input/input11

```

```
liszt ~ # libinput list-devices 

[stuff omitted]

Device:           ETPS/2 Elantech Touchpad

Kernel:           /dev/input/event10

Group:            8

Seat:             seat0, default

Size:             95x56mm

Capabilities:     pointer gesture

Tap-to-click:     disabled

Tap-and-drag:     enabled

Tap drag lock:    disabled

Left-handed:      disabled

Nat.scrolling:    disabled

Middle emulation: n/a

Calibration:      n/a

Scroll methods:   *two-finger edge 

Click methods:    none

Disable-w-typing: enabled

Accel profiles:   none

Rotation:         n/a
```

```

liszt ~ # grep -i elan /usr/src/linux/.config 

CONFIG_MOUSE_PS2_ELANTECH=y

CONFIG_MOUSE_PS2_ELANTECH_SMBUS=y

CONFIG_MOUSE_ELAN_I2C=m

CONFIG_MOUSE_ELAN_I2C_I2C=y

CONFIG_MOUSE_ELAN_I2C_SMBUS=y

CONFIG_HID_ELAN=m

CONFIG_USB_FTDI_ELAN=m

# CONFIG_NLS_MAC_ICELAND is not set

liszt ~ # grep -i ps2 /usr/src/linux/.config 

CONFIG_MOUSE_PS2=m

CONFIG_MOUSE_PS2_ALPS=y

CONFIG_MOUSE_PS2_BYD=y

CONFIG_MOUSE_PS2_LOGIPS2PP=y

CONFIG_MOUSE_PS2_SYNAPTICS=y

CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y

CONFIG_MOUSE_PS2_CYPRESS=y

CONFIG_MOUSE_PS2_LIFEBOOK=y

CONFIG_MOUSE_PS2_TRACKPOINT=y

CONFIG_MOUSE_PS2_ELANTECH=y

CONFIG_MOUSE_PS2_ELANTECH_SMBUS=y

CONFIG_MOUSE_PS2_SENTELIC=y

CONFIG_MOUSE_PS2_TOUCHKIT=y

CONFIG_MOUSE_PS2_FOCALTECH=y

CONFIG_MOUSE_PS2_VMMOUSE=y

CONFIG_MOUSE_PS2_SMBUS=y

CONFIG_SERIO_PCIPS2=m

CONFIG_SERIO_LIBPS2=y

CONFIG_SERIO_ALTERA_PS2=m

# CONFIG_SERIO_PS2MULT is not set

# CONFIG_SERIO_ARC_PS2 is not set

CONFIG_SERIO_GPIO_PS2=m

liszt ~ # grep -i mouse /usr/src/linux/.config 

CONFIG_MAC_EMUMOUSEBTN=y

CONFIG_INPUT_MOUSEDEV=y

CONFIG_INPUT_MOUSEDEV_PSAUX=y

CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024

CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768

CONFIG_INPUT_MOUSE=y

CONFIG_MOUSE_PS2=m

CONFIG_MOUSE_PS2_ALPS=y

CONFIG_MOUSE_PS2_BYD=y

CONFIG_MOUSE_PS2_LOGIPS2PP=y

CONFIG_MOUSE_PS2_SYNAPTICS=y

CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y

CONFIG_MOUSE_PS2_CYPRESS=y

CONFIG_MOUSE_PS2_LIFEBOOK=y

CONFIG_MOUSE_PS2_TRACKPOINT=y

CONFIG_MOUSE_PS2_ELANTECH=y

CONFIG_MOUSE_PS2_ELANTECH_SMBUS=y

CONFIG_MOUSE_PS2_SENTELIC=y

CONFIG_MOUSE_PS2_TOUCHKIT=y

CONFIG_MOUSE_PS2_FOCALTECH=y

CONFIG_MOUSE_PS2_VMMOUSE=y

CONFIG_MOUSE_PS2_SMBUS=y

CONFIG_MOUSE_SERIAL=m

CONFIG_MOUSE_APPLETOUCH=m

CONFIG_MOUSE_BCM5974=m

CONFIG_MOUSE_CYAPA=m

CONFIG_MOUSE_ELAN_I2C=m

CONFIG_MOUSE_ELAN_I2C_I2C=y

CONFIG_MOUSE_ELAN_I2C_SMBUS=y

CONFIG_MOUSE_VSXXXAA=m

CONFIG_MOUSE_GPIO=m

CONFIG_MOUSE_SYNAPTICS_I2C=m

CONFIG_MOUSE_SYNAPTICS_USB=m

CONFIG_HID_MAGICMOUSE=m

CONFIG_HID_HYPERV_MOUSE=m

# CONFIG_USB_IDMOUSE is not set

```

```
liszt ~ # grep -r -v \# /usr/share/X11/xorg.conf.d/

/usr/share/X11/xorg.conf.d/10-quirks.conf:

/usr/share/X11/xorg.conf.d/10-quirks.conf:

/usr/share/X11/xorg.conf.d/10-quirks.conf:Section "InputClass"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        Identifier "ThinkPad HDAPS accelerometer blacklist"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        MatchProduct "ThinkPad HDAPS accelerometer data"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        Option "Ignore" "on"

/usr/share/X11/xorg.conf.d/10-quirks.conf:EndSection

/usr/share/X11/xorg.conf.d/10-quirks.conf:

/usr/share/X11/xorg.conf.d/10-quirks.conf:Section "InputClass"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        Identifier "Xen Virtual Pointer axis blacklist"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        MatchProduct "Xen Virtual Pointer"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        Option "IgnoreAbsoluteAxes" "off"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        Option "IgnoreRelativeAxes" "off"

/usr/share/X11/xorg.conf.d/10-quirks.conf:EndSection

/usr/share/X11/xorg.conf.d/10-quirks.conf:

/usr/share/X11/xorg.conf.d/10-quirks.conf:Section "InputClass"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        Identifier "Tag trackballs as XI_TRACKBALL"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        MatchProduct "trackball"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        MatchDriver "evdev"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        Option "TypeName" "TRACKBALL"

/usr/share/X11/xorg.conf.d/10-quirks.conf:EndSection

/usr/share/X11/xorg.conf.d/10-quirks.conf:

/usr/share/X11/xorg.conf.d/10-quirks.conf:Section "InputClass"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        Identifier "Tag Mionix Naos 5000 mouse XI_MOUSE"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        MatchProduct "La-VIEW Technology Naos 5000 Mouse"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        MatchDriver "evdev"

/usr/share/X11/xorg.conf.d/10-quirks.conf:        Option "TypeName" "MOUSE"

/usr/share/X11/xorg.conf.d/10-quirks.conf:EndSection

/usr/share/X11/xorg.conf.d/10-amdgpu.conf:Section "OutputClass"

/usr/share/X11/xorg.conf.d/10-amdgpu.conf:      Identifier "AMDgpu"

/usr/share/X11/xorg.conf.d/10-amdgpu.conf:      MatchDriver "amdgpu"

/usr/share/X11/xorg.conf.d/10-amdgpu.conf:      Driver "amdgpu"

/usr/share/X11/xorg.conf.d/10-amdgpu.conf:EndSection

/usr/share/X11/xorg.conf.d/10-radeon.conf:Section "OutputClass"

/usr/share/X11/xorg.conf.d/10-radeon.conf:      Identifier "Radeon"

/usr/share/X11/xorg.conf.d/10-radeon.conf:      MatchDriver "radeon"

/usr/share/X11/xorg.conf.d/10-radeon.conf:      Driver "radeon"

/usr/share/X11/xorg.conf.d/10-radeon.conf:EndSection

/usr/share/X11/xorg.conf.d/40-libinput.conf:

/usr/share/X11/xorg.conf.d/40-libinput.conf:Section "InputClass"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        Identifier "libinput pointer catchall"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        MatchIsPointer "on"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        MatchDevicePath "/dev/input/event*"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        Driver "libinput"

/usr/share/X11/xorg.conf.d/40-libinput.conf:EndSection

/usr/share/X11/xorg.conf.d/40-libinput.conf:

/usr/share/X11/xorg.conf.d/40-libinput.conf:Section "InputClass"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        Identifier "libinput keyboard catchall"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        MatchIsKeyboard "on"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        MatchDevicePath "/dev/input/event*"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        Driver "libinput"

/usr/share/X11/xorg.conf.d/40-libinput.conf:EndSection

/usr/share/X11/xorg.conf.d/40-libinput.conf:

/usr/share/X11/xorg.conf.d/40-libinput.conf:Section "InputClass"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        Identifier "libinput touchpad catchall"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        MatchIsTouchpad "on"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        MatchDevicePath "/dev/input/event*"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        Driver "libinput"

/usr/share/X11/xorg.conf.d/40-libinput.conf:EndSection

/usr/share/X11/xorg.conf.d/40-libinput.conf:

/usr/share/X11/xorg.conf.d/40-libinput.conf:Section "InputClass"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        Identifier "libinput touchscreen catchall"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        MatchIsTouchscreen "on"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        MatchDevicePath "/dev/input/event*"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        Driver "libinput"

/usr/share/X11/xorg.conf.d/40-libinput.conf:EndSection

/usr/share/X11/xorg.conf.d/40-libinput.conf:

/usr/share/X11/xorg.conf.d/40-libinput.conf:Section "InputClass"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        Identifier "libinput tablet catchall"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        MatchIsTablet "on"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        MatchDevicePath "/dev/input/event*"

/usr/share/X11/xorg.conf.d/40-libinput.conf:        Driver "libinput"

/usr/share/X11/xorg.conf.d/40-libinput.conf:EndSection

/usr/share/X11/xorg.conf.d/70-synaptics.conf:Section "InputClass"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:        Identifier "touchpad catchall"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:        Driver "synaptics"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:        MatchIsTouchpad "on"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:       MatchDevicePath "/dev/input/event*"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:EndSection

/usr/share/X11/xorg.conf.d/70-synaptics.conf:

/usr/share/X11/xorg.conf.d/70-synaptics.conf:

/usr/share/X11/xorg.conf.d/70-synaptics.conf:Section "InputClass"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:        Identifier "Default clickpad buttons"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:        MatchDriver "synaptics"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:        Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:EndSection

/usr/share/X11/xorg.conf.d/70-synaptics.conf:

/usr/share/X11/xorg.conf.d/70-synaptics.conf:Section "InputClass"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:        Identifier "Disable clickpad buttons on Apple touchpads"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:        MatchProduct "Apple|bcm5974"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:        MatchDriver "synaptics"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"

/usr/share/X11/xorg.conf.d/70-synaptics.conf:EndSection
```

----------

## neyuru

You have enabled everything in the kernel and in the config files. I don't think the kernel is a problem tho. But the xorg.conf files definitely are. I would try this:

Keep only one file, and place it in 

```
/etc/X11/xorg.conf.d/
```

 name it 

```
40-libinput.conf
```

 and inside that file place: 

```

Section "InputClass"

     Identifier "libinput touchpad catchall"

     MatchIsTouchpad "on"

     MatchDevicePath "/dev/input/event*"

     Option "Tapping" "True"

     Option "TappingDrag" "True"

     Driver "libinput"

EndSection
```

also, if not already present, place this in your make.conf file:

```
INPUT_DEVICES="libinput keyboard mouse synaptics"
```

----------

## neyuru

Premature post, sorry.

and after all that 

```
emerge --ask --newuse --deep --update @world
```

and restart your system.

----------

## Ant P.

libinput sees it and recognises it as a valid device, which is a good start.

Let's try to figure out where it breaks: run `hexdump /dev/input/event10` and make some pointer motions and button clicks, it *should* produce screenfuls of output. That's the kernel driver side. If that works, repeat with `libinput debug-events` (to see if libinput is the problem) and finally with `xev` to see if it's X itself (you'll probably need to use the mouse to put the pointer over its window).

----------

## oxensepp

Hi, 

first I did like neyuru suggested. 

Just for your info: By putting the 40-libinput.conf file in /etc/X11/xorg.conf.d I stumbled over a 10-keyboard.conf file, which sets the keyboard to "de" (okay for my laptop). 

The world update pulled in these two packets: 

```

[ebuild   R    ] x11-base/xorg-drivers-1.20-r2  INPUT_DEVICES="keyboard* mouse*" 

[ebuild  N     ] x11-drivers/xf86-input-keyboard-1.9.0

 
```

After doing all changes, emerging @world and rebooting I started X, and neither keyboard, nor toucpad nor a USB mouse worked. After undeleting the files in /usr/share/X11/xorg.conf, all was as before, i.e. keyboard and USB mouse work, but the touchpad does not. 

I kept the changes in /etc/portage/make.conf. 

Second, i tried the events as Ant P. asked. For the sake of completeness, I tried all /dev/input/events*, which are from 0 to 12. 

Result: /dev/input/event0  produces output if the keyboard is used, /dev/input/event12 is related to the USB mouse. 

With the touchpad I could not produce any output in /dev/input/event* - so there seems a kernel driver problem. 

My suggestion is that there are still not enough kernel options enabled, but I have no clue which one might missing. So I would start a try-and-error-game...  :Sad: 

Other opinions? Hints?

oxensepp

----------

## neyuru

Ok, let's get this sorted out   :Cool:  :

do you have this enabled in kernel?

```
grep -i CONFIG_INPUT_EVDEV /usr/src/linux/.config
```

what drivers is your system using?

```
cat ~/.local/share/xorg/Xorg.0.log | grep -i "Using input driver"
```

----------

## charles17

 *neyuru wrote:*   

> also, if not already present, place this in your make.conf file:
> 
> ```
> INPUT_DEVICES="libinput keyboard mouse synaptics"
> ```
> ...

 

Remove keyboard, mouse and synaptics. See https://wiki.gentoo.org/wiki/Libinput#USE_flags and https://gentoo.org/support/news-items/2020-04-03-deprecation-of-legacy-x11-input-drivers.html.

----------

## Ant P.

-synaptics isn't deprecated, keep it until the rest is figured out. I'll let someone with more experience answer for the kernel issue.

Just for comparison, my laptop's (working) touchpad doesn't look much different in the output:

```
[  +0.281153] psmouse serio1: elantech: assuming hardware version 2 (with firmware version 0x020030)

[  +0.072691] psmouse serio1: elantech: Synaptics capabilities query result 0x00, 0x02, 0x64.

[  +0.075275] psmouse serio1: elantech: Elan sample query result 00, 03, 64

[  +0.003542] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input8
```

```
Device:           ETPS/2 Elantech Touchpad

Kernel:           /dev/input/event7

Group:            9

Seat:             seat0, default

Size:             37x25mm

Capabilities:     pointer

Tap-to-click:     disabled

Tap-and-drag:     enabled

Tap drag lock:    disabled

Left-handed:      disabled

Nat.scrolling:    disabled

Middle emulation: n/a

Calibration:      n/a

Scroll methods:   *two-finger edge

Click methods:    none

Disable-w-typing: enabled

Accel profiles:   none

Rotation:         n/a
```

```
reg_07:0x08

reg_10:0x54

reg_11:0x88

reg_20:0x01

reg_21:0x60

reg_22:0x7f

reg_23:0x00

reg_24:0x00

reg_25:0x00

reg_26:0x00
```

----------

## charles17

 *Ant P. wrote:*   

> -synaptics isn't deprecated, keep it until the rest is figured out. ...

 

Agreed.  But consider If multiple input drivers are ... then additional configuration is required.

----------

## oxensepp

it is working now! 

But let me tell one by one.

CONFIG_INPUT_EVDEV was enabled.

I found synaptics as input driver: 

```

liszt /var/log # grep -i "Using input driver" Xorg.0.log

[  9035.003] (II) Using input driver 'libinput' for 'Fujitsu FUJ02E3'

[  9035.167] (II) Using input driver 'libinput' for 'Video Bus'

[  9035.258] (II) Using input driver 'libinput' for 'Power Button'

[  9035.350] (II) Using input driver 'libinput' for 'PixArt USB Optical Mouse'

[  9035.486] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'

[  9035.590] (II) Using input driver 'synaptics' for 'ETPS/2 Elantech Touchpad'

[  9035.745] (II) Using input driver 'synaptics' for 'ETPS/2 Elantech Touchpad'

[  9081.011] (II) Using input driver 'libinput' for 'PixArt USB Optical Mouse'

```

(I did this grep after it was working, for posting it in this thread. When experimenting first, I did the same grep, but got only one 'ETPS/2 Elantech Touchpad' line.)

 *charles17 wrote:*   

>  *Ant P. wrote:*   -synaptics isn't deprecated, keep it until the rest is figured out. ... 
> 
> Agreed.  But consider If multiple input drivers are ... then additional configuration is required.

 

That hint led me finally to the solution. After some googeling, i added a file /etc/X11/xorg.conf.d/50-synaptics.conf:

```

Section "InputClass"

        Identifier "touchpad catchall"

        Driver "synaptics"

        MatchIsTouchpad "on"

        Option "VertEdgeScroll" "on"

        Option      "CircularScrolling"         "on"

        Option      "VertScrollDelta"          "-111"

        Option      "HorizScrollDelta"         "-111"

        Option      "TapButton1"                  "1"

EndSection

```

Now, after restarting X11, the touchpad works. Also the two "mouse" buttons below the touchpad are working, and pressing both buttons simultaneously emulated the middle "mouse" buttons.

Thank to all for your help!

----------

## oxensepp

 *oxensepp wrote:*   

> it is working now! 
> 
> 

 

Too early...  :Sad: 

After reboot, it stopped working. But I didn't touch my system. 

What happened?

----------

## neyuru

 *oxensepp wrote:*   

>  *oxensepp wrote:*   it is working now! 
> 
>  
> 
> Too early... 
> ...

 

Now that we know that your system is using libinput and synaptics, I would do the following:

1) In your make.conf file place:

```
INPUT_DEVICES="libinput  synaptics"
```

2) Keep the configuration file you placed: /etc/X11/xorg.conf.d/50-synaptics.conf but remove all others, like the one I suggested (because it is for libinput) and all other files whose section header is Section "InputClass" (e.g. in your original post there were too many configuration files with these characteristics)

3) Make sure your system is aware of the input drivers  

```
emerge --ask --newuse --deep --update @world
```

4) Do 

```
env-update && source /etc/profile
```

 and restart the system.

----------

## oxensepp

hello, 

there are some news. 

- now I have INPUT_DEVICES="libinput synaptics"

- I did the wolrd update

- I experimented with the config files. Now, /usr/share/X11/xorg.conf is empty, /etc/X11/xorg.conf.d has this: 

```

liszt ~ # grep -v \# /etc/X11/xorg.conf.d/*

/etc/X11/xorg.conf.d/00-keyboard.conf:Section "InputClass"

/etc/X11/xorg.conf.d/00-keyboard.conf:        Identifier "libinput keyboard catchall"

/etc/X11/xorg.conf.d/00-keyboard.conf:        MatchIsKeyboard "on"

/etc/X11/xorg.conf.d/00-keyboard.conf:        Option "XkbLayout" "de"

/etc/X11/xorg.conf.d/00-keyboard.conf:        MatchDevicePath "/dev/input/event*"

/etc/X11/xorg.conf.d/00-keyboard.conf:        Driver "libinput"

/etc/X11/xorg.conf.d/00-keyboard.conf:EndSection

/etc/X11/xorg.conf.d/02-pointer.conf:Section "InputClass"

/etc/X11/xorg.conf.d/02-pointer.conf:        Identifier "libinput pointer catchall"

/etc/X11/xorg.conf.d/02-pointer.conf:        MatchIsPointer "on"

/etc/X11/xorg.conf.d/02-pointer.conf:        MatchDevicePath "/dev/input/event*"

/etc/X11/xorg.conf.d/02-pointer.conf:        Driver "libinput"

/etc/X11/xorg.conf.d/02-pointer.conf:EndSection

/etc/X11/xorg.conf.d/02-pointer.conf:

/etc/X11/xorg.conf.d/50-synaptics.conf:Section "InputClass"

/etc/X11/xorg.conf.d/50-synaptics.conf:        Identifier "touchpad catchall"

/etc/X11/xorg.conf.d/50-synaptics.conf:        Driver "synaptics"

/etc/X11/xorg.conf.d/50-synaptics.conf:        MatchIsTouchpad "on"

/etc/X11/xorg.conf.d/50-synaptics.conf: Option      "Protocol" "auto-dev"

/etc/X11/xorg.conf.d/50-synaptics.conf:        Option "VertEdgeScroll" "on"

/etc/X11/xorg.conf.d/50-synaptics.conf:        Option      "CircularScrolling"         "on"

/etc/X11/xorg.conf.d/50-synaptics.conf:        Option      "VertScrollDelta"          "-111"

/etc/X11/xorg.conf.d/50-synaptics.conf:        Option      "HorizScrollDelta"         "-111"

/etc/X11/xorg.conf.d/50-synaptics.conf:        Option      "TapButton1"                  "1"

/etc/X11/xorg.conf.d/50-synaptics.conf:EndSection

```

I tried even lesser configuration, but this led to non-working keyboard / USB mouse. So this should be a quite minimal setup.

But there is another thing. Looking a bit closer at /var/log/Xorg.0.log, I found this error:

```

(~300 lines snipped)

[    72.339] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/event11)

[    72.339] (**) ETPS/2 Elantech Touchpad: Applying InputClass "touchpad catchall"

[    72.339] (II) LoadModule: "synaptics"

[    72.348] (II) Loading /usr/lib64/xorg/modules/input/synaptics_drv.so

[    72.359] (II) Module synaptics: vendor="X.Org Foundation"

[    72.359]    compiled for 1.20.7, module version = 1.9.1

[    72.359]    Module class: X.Org XInput Driver

[    72.359]    ABI class: X.Org XInput driver, version 24.1

[    72.359] (II) Using input driver 'synaptics' for 'ETPS/2 Elantech Touchpad'

[    72.359] (**) ETPS/2 Elantech Touchpad: always reports core events

[    72.359] (**) Option "Protocol" "auto-dev"

[    72.359] (**) Option "Device" "/dev/input/event11"

[    72.443] (--) synaptics: ETPS/2 Elantech Touchpad: x-axis range 0 - 2943 (res 31)

[    72.443] (--) synaptics: ETPS/2 Elantech Touchpad: y-axis range 0 - 1747 (res 31)

[    72.443] (--) synaptics: ETPS/2 Elantech Touchpad: pressure range 0 - 255

[    72.443] (--) synaptics: ETPS/2 Elantech Touchpad: finger width range 0 - 15

[    72.443] (--) synaptics: ETPS/2 Elantech Touchpad: buttons: left right double triple

[    72.444] (--) synaptics: ETPS/2 Elantech Touchpad: Vendor 0x2 Product 0xe

[    72.444] (**) Option "VertScrollDelta" "-111"

[    72.444] (**) Option "HorizScrollDelta" "-111"

[    72.444] (**) Option "VertEdgeScroll" "on"

[    72.444] (**) Option "TapButton1" "1"

[    72.444] (**) Option "CircularScrolling" "on"

[    72.444] (--) synaptics: ETPS/2 Elantech Touchpad: touchpad found

[    72.444] (**) ETPS/2 Elantech Touchpad: always reports core events

[    72.523] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio2/input/input10/event11"

[    72.523] (II) XINPUT: Adding extended input device "ETPS/2 Elantech Touchpad" (type: TOUCHPAD, id 11)

[    72.523] (**) synaptics: ETPS/2 Elantech Touchpad: (accel) MinSpeed is now constant deceleration 2.5

[    72.523] (**) synaptics: ETPS/2 Elantech Touchpad: (accel) MaxSpeed is now 1.75

[    72.523] (**) synaptics: ETPS/2 Elantech Touchpad: (accel) AccelFactor is now 0.058

[    72.524] (**) ETPS/2 Elantech Touchpad: (accel) keeping acceleration scheme 1

[    72.524] (**) ETPS/2 Elantech Touchpad: (accel) acceleration profile 1

[    72.524] (**) ETPS/2 Elantech Touchpad: (accel) acceleration factor: 2.000

[    72.524] (**) ETPS/2 Elantech Touchpad: (accel) acceleration threshold: 4

[    72.524] (--) synaptics: ETPS/2 Elantech Touchpad: touchpad found

[    72.525] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/mouse0)

[    72.525] (**) ETPS/2 Elantech Touchpad: Applying InputClass "touchpad catchall"

[    72.526] (II) Using input driver 'synaptics' for 'ETPS/2 Elantech Touchpad'

[    72.526] (**) ETPS/2 Elantech Touchpad: always reports core events

[    72.526] (**) Option "Protocol" "auto-dev"

[    72.526] (**) Option "Device" "/dev/input/mouse0"

[    72.603] (EE) synaptics: ETPS/2 Elantech Touchpad: Synaptics driver unable to detect protocol

[    72.603] (EE) PreInit returned 11 for "ETPS/2 Elantech Touchpad"

[    72.603] (II) UnloadModule: "synaptics"

[    73.584] (II) intel(0): EDID vendor "LGD", prod id 1191

[    73.584] (II) intel(0): Printing DDC gathered Modelines:

[    73.584] (II) intel(0): Modeline "1920x1080"x0.0  138.70  1920 1968 2000 2080  1080 1083 1088 1111 +hsync -vsync (66.7 kHz eP)

```

google suggested omitting the Option "Protocol" "auto-dev", but it did not change anything. 

And very surprisingly, after suspending (s2ram) the system and resuming it, the touchpad does work! This "trick" seems to work reliably. I rebooted several times, and always it came up with a non working touchpad, which was working after suspending and resuming. 

Tomorrow I am going to have a closer look at the protocaol detection....

oxensepp

----------

## charles17

 *oxensepp wrote:*   

> But there is another thing. Looking a bit closer at /var/log/Xorg.0.log, I found this error:

 

Here it puts 'synaptics' even for (/dev/input/mouse0)

```

(~300 lines snipped)

...

[    72.525] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/mouse0)

[    72.525] (**) ETPS/2 Elantech Touchpad: Applying InputClass "touchpad catchall"

[    72.526] (II) Using input driver 'synaptics' for 'ETPS/2 Elantech Touchpad'

...
```

Are you sure you need synaptics at all?  

Have you tried with plain INPUT_DEVICES="libinput"?

And something like 

```
# https://wiki.archlinux.org/index.php/Libinput

Section "InputClass"

        Identifier "libinput touchpad catchall"

        MatchIsTouchpad "on"

        MatchDevicePath "/dev/input/event*"

        Driver "libinput"

        Option "Tapping" "on"

        Option "Accel Speed" "1.0"

EndSection

```

----------

## oxensepp

hello again, 

now, I have

```
INPUT_DEVICES="libinput"

```

A world update removed synaptics:

```

liszt /etc/portage # emerge --ask --newuse --deep --update @world

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R    ] x11-base/xorg-drivers-1.20-r2  INPUT_DEVICES="-synaptics*" 

```

The last lines of Xorg.0.log read:

```

[   454.621] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/event11)

[   454.621] (**) ETPS/2 Elantech Touchpad: Applying InputClass "libinput touchpad catchall"

[   454.621] (II) Using input driver 'libinput' for 'ETPS/2 Elantech Touchpad'

[   454.621] (**) ETPS/2 Elantech Touchpad: always reports core events

[   454.621] (**) Option "Device" "/dev/input/event11"

[   454.621] (**) Option "_source" "server/udev"

[   454.623] (II) event11 - ETPS/2 Elantech Touchpad: is tagged by udev as: Touchpad

[   454.626] (II) event11 - ETPS/2 Elantech Touchpad: device is a touchpad

[   454.627] (II) event11 - ETPS/2 Elantech Touchpad: device removed

[   454.804] (**) Option "Tapping" "on"

[   454.805] (**) Option "AccelSpeed" "1.0"

[   454.805] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio2/input/input10/event11"

[   454.805] (II) XINPUT: Adding extended input device "ETPS/2 Elantech Touchpad" (type: TOUCHPAD, id 11)

[   454.807] (**) Option "AccelerationScheme" "none"

[   454.807] (**) ETPS/2 Elantech Touchpad: (accel) selected scheme none/0

[   454.807] (**) ETPS/2 Elantech Touchpad: (accel) acceleration factor: 2.000

[   454.807] (**) ETPS/2 Elantech Touchpad: (accel) acceleration threshold: 4

[   454.810] (II) event11 - ETPS/2 Elantech Touchpad: is tagged by udev as: Touchpad

[   454.810] (II) event11 - ETPS/2 Elantech Touchpad: device is a touchpad

[   454.810] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/mouse0)

[   454.810] (II) No input driver specified, ignoring this device.

[   454.810] (II) This device may have been added with another device file.

[   455.592] (II) intel(0): EDID vendor "LGD", prod id 1191

[   455.592] (II) intel(0): Printing DDC gathered Modelines:

[   455.592] (II) intel(0): Modeline "1920x1080"x0.0  138.70  1920 1968 2000 2080  1080 1083 1088 1111 +hsync -vsync (66.7 kHz eP)

```

but the problem still exists and is unchanged: the touchpad does not work, until I issue a "s2ram" and resume the system. after that procedure, it works just fine.

I played around and did the s2ram/resume after booting, but before doing "startx" and got a working touchpad... So maybe the driver and config is allright and the problem is deep inside X11 or kernel.

----------

## Ant P.

It's a terrible idea, but you could make the workaround automatic with an /etc/local.d script that calls rtcwake+s2ram to suspend once at boot.

----------

## charles17

 *oxensepp wrote:*   

> but the problem still exists and is unchanged: the touchpad does not work, until I issue a "s2ram" and resume the system. after that procedure, it works just fine.
> 
> I played around and did the s2ram/resume after booting, but before doing "startx" and got a working touchpad... So maybe the driver and config is allright and the problem is deep inside X11 or kernel

 

At least, it seems the additional synaptics driver is not really needed for that touchpad.

What does s2ram/resume do to x11 or to libinput? 

Maybe you could find something by cutting your logs (dmesg,Xorg.0.log, rc.log, ...) from the point where you call s2ram?

----------

## oxensepp

 *Ant P. wrote:*   

> It's a terrible idea, but you could make the workaround automatic with an /etc/local.d script that calls rtcwake+s2ram to suspend once at boot.

 

Well, finally I followed your advice:

/etc/init.d/elantech:

```

#!/sbin/openrc-run

description="hack for my elantech touchpad"

start()

{

        ebegin "starting elantech, go to mem state and wake up after 3 seconds"

        rtcwake -m mem -s 3

        eend $?

}

stop()

{

        ebegin "stopping elantech... (no actions needed)"

        eend $?

}

```

I added it to the default runlevel. 

Yes, it's a workaround, but atleast it works now.

oxensepp

----------

