Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Configuring xinput/libinput parameters for touchpad.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dartleader
Tux's lil' helper
Tux's lil' helper


Joined: 21 Apr 2019
Posts: 128

PostPosted: Thu Sep 02, 2021 9:47 pm    Post subject: [SOLVED]Configuring xinput/libinput parameters for touchpad. Reply with quote

[SOLVED]: Rebuilt the kernel using genkernel all and the default install kernel and my mouse works properly again. I must have disabled an important kernel module on a previous build.

EDIT: The critical module was HID_MULTITOUCH. It lists right in the description it is for several models of touchpad, including the Elan Microelectronics touch panels, which I believe is the model used in the Lenovo Legion 5. Rebuilding the kernel with HID_MULTITOUCH as a module results in the expected, sane touchpad behaviour when controlling the mouse.

Hi everyone, I've had quite a bit of trouble configuring my Lenovo Legion 5 Touchpad so that the mouse is usable. Movement of the mouse pointer is extremely sensitive and 'chunky'.

I have identified my mouse by running xinput --test "MSFT0001:00 06CB:7F28 Mouse" and it does produce output when I interact with the mousepad, including movement in the X and Y directions and detecting button 1 and button 3 press/release.

Output of xinput --list --long "MSFT0001:00 06CB:7F28 Mouse":

Code:
MSFT0001:00 06CB:7F28 Mouse                id=14   [slave  pointer  (2)]
   Reporting 7 classes:
      Class originated from: 14. Type: XIButtonClass
      Buttons supported: 7
      Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right"
      Button state:
      Class originated from: 14. Type: XIValuatorClass
      Detail for Valuator 0:
        Label: Rel X
        Range: -1.000000 - -1.000000
        Resolution: 0 units/m
        Mode: relative
      Class originated from: 14. Type: XIValuatorClass
      Detail for Valuator 1:
        Label: Rel Y
        Range: -1.000000 - -1.000000
        Resolution: 0 units/m
        Mode: relative
      Class originated from: 14. Type: XIValuatorClass
      Detail for Valuator 2:
        Label: Rel Horiz Scroll
        Range: -1.000000 - -1.000000
        Resolution: 0 units/m
        Mode: relative
      Class originated from: 14. Type: XIValuatorClass
      Detail for Valuator 3:
        Label: Rel Vert Scroll
        Range: -1.000000 - -1.000000
        Resolution: 0 units/m
        Mode: relative
      Class originated from: 14. Type: XIScrollClass
      Scroll info for Valuator 2
        type: 2 (horizontal)
        increment: 15.000000
        flags: 0x0
      Class originated from: 14. Type: XIScrollClass
      Scroll info for Valuator 3
        type: 1 (vertical)
        increment: 15.000000
        flags: 0x0


Output of xinput --get-feedbacks "MSFT0001:00 06CB:7F28 Mouse" prior to modification:
Code:
1 feedback class
PtrFeedbackClass id=0
   accelNum is 2
   accelDenom is 1
   threshold is 4


Output of xinput --get-feedbacks "MSFT0001:00 06CB:7F28 Mouse", following modification with xinput --set-ptr-feedback

Code:
1 feedback class
PtrFeedbackClass id=0
   accelNum is 1
   accelDenom is 1
   threshold is 1


Despite this modification, to accelNum, accelDenom and threshold, the mouse continues to fly around the screen and is unusable.

Output of xinput --list-props "MSFT0001:00 06CB:7F28 Mouse":
Code:
Device 'MSFT0001:00 06CB:7F28 Mouse':
   Device Enabled (173):   1
   Coordinate Transformation Matrix (175):   1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
   libinput Natural Scrolling Enabled (307):   0
   libinput Natural Scrolling Enabled Default (308):   0
   libinput Scroll Methods Available (315):   0, 0, 1
   libinput Scroll Method Enabled (316):   0, 0, 0
   libinput Scroll Method Enabled Default (317):   0, 0, 0
   libinput Button Scrolling Button (318):   3
   libinput Button Scrolling Button Default (319):   3
   libinput Button Scrolling Button Lock Enabled (320):   0
   libinput Button Scrolling Button Lock Enabled Default (321):   0
   libinput Accel Speed (322):   -1.000000
   libinput Accel Speed Default (323):   0.000000
   libinput Accel Profiles Available (324):   1, 1
   libinput Accel Profile Enabled (325):   1, 0
   libinput Accel Profile Enabled Default (326):   1, 0
   libinput Left Handed Enabled (327):   0
   libinput Left Handed Enabled Default (328):   0
   libinput Send Events Modes Available (292):   1, 0
   libinput Send Events Mode Enabled (293):   0, 0
   libinput Send Events Mode Enabled Default (294):   0, 0
   Device Node (295):   "/dev/input/event9"
   Device Product ID (296):   1739, 32552
   libinput Drag Lock Buttons (309):   <no items>
   libinput Horizontal Scroll Enabled (310):   1
   libinput Scrolling Pixel Distance (329):   15
   libinput Scrolling Pixel Distance Default (330):   15


After setting the following to 0, 0, the mouse movement is still very chunky and imprecise, it is very difficult to click on buttons/hyperlinks/scrollbars, etc:
libinput Accel Profiles Available (324): 1, 1
libinput Accel Profile Enabled (325): 1, 0

I think the problem has something to do with the sensitivity of my trackpad; when I run xinput --test -proximity "MSFT0001:00 06CB:7F28 Mouse" I get the following error:
Code:
 X Error of failed request:  XI_BadClass (invalid Class parameter)
  Major opcode of failed request:  131 (XInputExtension)
  Minor opcode of failed request:  6 (X_SelectExtensionEvent)
  Class id in failed request: 0x740
  Serial number of failed request:  19
  Current serial number in output stream:  19


I cannot figure out how to adjust the sensitivity of my trackpad using xinput. Does anyone have any thoughts?

This is the output of sudo libinput list-devices
Code:

Device:           MSFT0001:00 06CB:7F28 Mouse
Kernel:           /dev/input/event9
Group:            6
Seat:             seat0, default
Capabilities:     pointer
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   button
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   flat *adaptive
Rotation:         n/a


There are a number of things I would like to modify here, particularly "Accel profiles" and "Disable-w-typing" but it doesn't seem possible with xinput: I get the following error:

xinput --set-prop "MSFT0001:00 06CB:7F28 Mouse" "Disable-w-typing" 1
Code:
property 'Disable-w-typing' doesn't exist, you need to specify its type and format


Is this a case of using an inappropriate command? Or do I need to supply a type and format to adjust this (I don't know what that means in this context).

I have also tried setting libinput values in /etc/X11/xorg.conf.d/50-touchpad.conf, but none of the values I set seem to affect the device's values upon running libinput list-devices. I think I need some guidance regarding managing xinput/libinput devices as I have read the respective handbook pages and archwiki pages and am still confused.

Any help would be greatly appreciated!


Last edited by dartleader on Mon Sep 06, 2021 4:19 pm; edited 4 times in total
Back to top
View user's profile Send private message
teika
Apprentice
Apprentice


Joined: 19 Feb 2011
Posts: 165
Location: YYYY-MM-DD, period. Have you ever used the Internet?

PostPosted: Thu Sep 02, 2021 11:44 pm    Post subject: Reply with quote

Hi. This is not so much likely, but hoping it can help, in particular if it's a Lenovo...

Grep your kernel message (dmesg, /var/log/message or somewhere else) for the word "psmouse". If there's a line something like:

psmouse serio2: synaptics: Your touchpad (PNP: [device ids]) says it can support a different bus. [snip]

then try rebooting with the boot parameter
psmouse.synaptics_intertouch=1

Regards.
_________________
Hack of easy Shift / Ctrl / AltGr etc; save your pinkies, type without drudgery: topic 865313

BTRFS - Biden & TRump, Fools Suck.
Back to top
View user's profile Send private message
dartleader
Tux's lil' helper
Tux's lil' helper


Joined: 21 Apr 2019
Posts: 128

PostPosted: Fri Sep 03, 2021 7:43 pm    Post subject: Reply with quote

teika wrote:
Hi. This is not so much likely, but hoping it can help, in particular if it's a Lenovo...

Grep your kernel message (dmesg, /var/log/message or somewhere else) for the word "psmouse". If there's a line something like:

psmouse serio2: synaptics: Your touchpad (PNP: [device ids]) says it can support a different bus. [snip]

then try rebooting with the boot parameter
psmouse.synaptics_intertouch=1

Regards.
Hi Teika, thanks for your input. grepping my dmesg output gives no hits for 'psmouse'. I have rebuilt the kernel with everything under device drivers/input/mice enabled and the touchpad problems persist.

I am also unable to see the touchpad using libinput measure touchpad-pressure - I get the message:
Code:
Unable to find touchpad device.


Last edited by dartleader on Sat Sep 04, 2021 11:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
teika
Apprentice
Apprentice


Joined: 19 Feb 2011
Posts: 165
Location: YYYY-MM-DD, period. Have you ever used the Internet?

PostPosted: Sat Sep 04, 2021 7:29 am    Post subject: Reply with quote

Hi. This is a known problem (since a year ago), and there seems to be a fix. Simply do a web search for the words: "Lenovo Legion 5 Touchpad linux " or so.

# Seems like a common Gentoo user pitfall, tending to think they can handle problems by examining the kernel config, xinput or else. ;-)

Hope you can fix it soon. Regards.
Back to top
View user's profile Send private message
dartleader
Tux's lil' helper
Tux's lil' helper


Joined: 21 Apr 2019
Posts: 128

PostPosted: Sat Sep 04, 2021 10:28 pm    Post subject: Reply with quote

teika wrote:
Hi. This is a known problem (since a year ago), and there seems to be a fix. Simply do a web search for the words: "Lenovo Legion 5 Touchpad linux " or so.

# Seems like a common Gentoo user pitfall, tending to think they can handle problems by examining the kernel config, xinput or else. ;-)

Hope you can fix it soon. Regards.
Thanks Teika! I'm familiar with those threads concerning the Legion 5 Touchpad not working on Linux, but I thought I had read it had been fixed in a kernel update. I'll look into it again and if I really have to go nuclear, I can always reinstall gentoo to my laptop (the touchpad worked fine for the first month I had gentoo installed, it broke after an update). That would give me a chance to make some other changes I would like (change fs to btrfs, etc ...).

I am going to try rebuilding my kernel with genkernel to basically move back to the default 'full' kernel, I can always shave it back down again if it works.

Thank you for your suggestions anyhow.

EDIT: Haha! Rebuilding the kernel with genkernel all and the default kernel gives the expected trackpad behaviour. I will have to pare it down again to see how much I can remove while preserving touchpad funciton.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum