New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hwdb: Add Thinkpad T460s Trackpoint support #4384

Closed
kaihendry opened this Issue Oct 16, 2016 · 19 comments

Comments

4 participants
@kaihendry
Copy link

kaihendry commented Oct 16, 2016

Following instructions from #3426 (comment)

Here is the udevadm test for my slow Trackpoint device:
http://s.natalian.org/2016-10-16/T460s-trackpoint.txt

Submission type

Request for enhancement (RFE)

systemd version the issue has been seen with

systemd 231
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN

Used distribution

Archlinux

@whot

This comment has been minimized.

Copy link
Contributor

whot commented Oct 17, 2016

Have a look at the top of 70-pointingstick.hwdb, it explains how to install a local copy. Then you tweak the sensitivity/const accel until it fits. There's no real tool, it's a matter of installing the hwdb, udevadm hwdb --update, sudo udevadm test /sys/class/input/eventX to make sure the new value appears, then testing libinput whether it feels better.

@kaihendry

This comment has been minimized.

Copy link

kaihendry commented Oct 20, 2016

I wasn't quite sure what the name of /etc/udev/hwdb.d/70-pointingstick.hwdb is...

I hope evdev:name:TPPS/2 IBM TrackPoint:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadT460s:* is correct. I picked out this pvr value from the earlier udevadm test.

I didn't notice any changes after running sudo udevadm test /sys/class/input/event18. Do I need to restart X?

@whot

This comment has been minimized.

Copy link
Contributor

whot commented Oct 21, 2016

looks correct. does the command show the tags being applied to the device? If not, then there's a typo somewhere. If it does show up, then you should restart X. If you're using the SENSITIVITY tag, this should show up in /sys/class/input/event8/device/device/sensitivity (event node adjusted for device).

the const_accel bit is for userspace only and will need a libinput restart (i.e. an X restart)

@kaihendry

This comment has been minimized.

Copy link

kaihendry commented Oct 24, 2016

Oh, I see the tags. For some reason or another eventXX changed from 18 to 22 & confused me. I'm on 4.8.4-1-ARCH btw.

http://s.natalian.org/2016-10-24/event22.txt

Still a bit too slow. Tbh the Trackpoint on the T460s is by far the worst Trackpoint hardware I've used. It's too easy for the finger to slip. Argh, why do things seem to get worse?

@kaihendry

This comment has been minimized.

Copy link

kaihendry commented Oct 24, 2016

Oh.. it would appear

POINTINGSTICK_CONST_ACCEL=1.0
POINTINGSTICK_SENSITIVITY=200

Is the default & my http://s.natalian.org/2016-10-20/70-pointingstick.hwdb is not matching and applying.

I can't see 70-pointingstick.hwdb being read in anywhere.... :/

@whot

This comment has been minimized.

Copy link
Contributor

whot commented Oct 24, 2016

expect the event nodes to change after every reboot. they don't alway do, but expect it anyway :)
the hwdb entry is read by udevadm hwdb --update, then applied by the udev rules. To make sure you don't have a typo in the match rule, try this:

  modalias=`cat /sys/class/dmi/id/modalias`
  udevadm hwdb --test 'evdev:name:TPPS/2 IBM TrackPoint:$modalias'

does that show up the tag? if not, either your hwdb file isn't read on hwdb --update or the dmi match string is wrong. Once it shows up here you can keep tweaking the config until it matches the desired behaviour

@whot

This comment has been minimized.

Copy link
Contributor

whot commented Oct 24, 2016

oh, i just just noticed there's another match for the T460s in the hwdb already, the one with this line:

evdev:name:TPPS/2 IBM TrackPoint:dmi:bvn_:bvr_:bd_:svnLENOVO:pn_:pvrThinkPad??60?:*

systemd's hwdb matching is (until very recently) a bit confusing, so until you comment out that line, it's probably overriding whatever match you put in place. That's fixed in systemd master.

Check the history of this line, it was added in v231-37-gded495d, specifically for this laptop. So I guess our problem is more that the range of trackpoint acceleration isn't big enough. See https://bugs.freedesktop.org/show_bug.cgi?id=94953

@kaihendry

This comment has been minimized.

Copy link

kaihendry commented Oct 25, 2016

~$ udevadm hwdb --test "evdev:name:TPPS/2 IBM TrackPoint:$(cat /sys/class/dmi/id/modalias)"
POINTINGSTICK_CONST_ACCEL=1.0
POINTINGSTICK_SENSITIVITY=200

Tweaked /etc/udev/hwdb.d/70-pointingstick.hwdb

/etc/udev/hwdb.d$ sudo udevadm hwdb --update
/etc/udev/hwdb.d$ udevadm hwdb --test "evdev:name:TPPS/2 IBM TrackPoint:$(cat /sys/class/dmi/id/modalias)"
POINTINGSTICK_CONST_ACCEL=3.0
POINTINGSTICK_SENSITIVITY=400

I restarted X with a pkill X and I haven't noticed a difference. How do I know X is treating my pointing stick differently?

@whot

This comment has been minimized.

Copy link
Contributor

whot commented Oct 25, 2016

you don't, really. libinput will pick it up silently, there's no error message. but one thing here: the max sensitivity value is 256. that's actually used by the kernel and can be verified by:
cat /sys/class/input/event8/device/device/sensitivity

@kaihendry

This comment has been minimized.

Copy link

kaihendry commented Oct 26, 2016

Have no idea why my pointing stick isn't taking on the values.

~$ cat /sys/class/input/event22/device/device/sensitivity
128
~$ udevadm hwdb --test "evdev:name:TPPS/2 IBM TrackPoint:$(cat /sys/class/dmi/id/modalias)"
POINTINGSTICK_CONST_ACCEL=3.0
POINTINGSTICK_SENSITIVITY=256

I'm assuming my /etc/udev/hwdb.d/70-pointingstick.hwdb is correct since udevadm hwdb --test picks up the values. I restarted X. No change to the ..//sensitivity device. Nor when I rebooted.

@whot

This comment has been minimized.

Copy link
Contributor

whot commented Oct 26, 2016

sorry, max sensitivity is 255, anything else will just error out.

@kaihendry

This comment has been minimized.

Copy link

kaihendry commented Oct 26, 2016

Guess I can't see this error anywhere?

~$ udevadm hwdb --test "evdev:name:TPPS/2 IBM TrackPoint:$(cat /sys/class/dmi/id/modalias)"
POINTINGSTICK_CONST_ACCEL=3.0
POINTINGSTICK_SENSITIVITY=255
~$ cat /sys/class/input/event22/device/device/sensitivity
128

No change after a reboot. Sigh.

@whot

This comment has been minimized.

Copy link
Contributor

whot commented Oct 27, 2016

if you run sudo udevadm test /sys/class/input/eventX (i.e. as root) it should run the builtins (input-id in this case) and you don't have to reboot every time.

Note that hwdb and test are different targets, you always need to run the hwdb first, then you can run test.

Either way, does the test command show the line "run: 'keyboard'"?

@kaihendry

This comment has been minimized.

Copy link

kaihendry commented Oct 28, 2016

@whot

This comment has been minimized.

Copy link
Contributor

whot commented Nov 2, 2016

right, what matters here is:
IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/60-evdev.rules:17
IMPORT builtin 'hwdb' returned non-zero

so for some reason the hwdb line doesn't actually match your device, even though your commandline one does. I wonder why that is. but I think you're down to character-by-character analysis of your hwdb match to figure out why it's not working. sorry, this isn't something easy to debug remotely, all I can tell is that it's not matching.

@fd0 fd0 referenced this issue Apr 1, 2017

Closed

Lenovo ThinkPad t460p Trackpoint speed unusable slow #5685

1 of 2 tasks complete
@mindfulmonk

This comment has been minimized.

Copy link

mindfulmonk commented Jun 20, 2017

Here are my findings on Arch Linux running T460s.

sudo vim /usr/lib/udev/hwdb.d/70-pointingstick.hwdb
Modify it like this:
#T460s
evdev:name:TPPS/2 IBM TrackPoint:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPad??60?:*
 POINTINGSTICK_SENSITIVITY=255
 POINTINGSTICK_CONST_ACCEL=2.0

Apply the change

sudo systemd-hwdb update
sudo udevadm trigger

This can be added to udev too:

echo 255 | sudo tee /sys/devices/platform/i8042/serio1/serio2/speed

POINTINGSTICK_CONST_ACCEL only impacts scrolling speed, seems like the bug described here https://bugs.freedesktop.org/show_bug.cgi?id=91369

@whot Any other changes I can make to make it faster?

@whot

This comment has been minimized.

Copy link
Contributor

whot commented Jun 21, 2017

I don't recommend playing around with any more settings until that bug is fixed, sorry

@poettering

This comment has been minimized.

Copy link
Member

poettering commented Oct 29, 2018

@whot any update on this? i see that https://bugs.freedesktop.org/show_bug.cgi?id=91369 has been fixed now. can we close this?

@whot

This comment has been minimized.

Copy link
Contributor

whot commented Oct 29, 2018

yeah, let's close this. Information on what to do with the trackpoint configuration in libinput is here:
https://wayland.freedesktop.org/libinput/doc/latest/trackpoint-configuration.html

@whot whot closed this Oct 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment