Skip to content
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

hardware.trackpoint.sensitivity setting being ignored (but hardware.trackpoint.speed set correctly!) #299468

Open
lowercasename opened this issue Mar 27, 2024 · 1 comment

Comments

@lowercasename
Copy link

lowercasename commented Mar 27, 2024

Describe the bug

I've got the following rules in configuration.nix:

  hardware.trackpoint = {
    enable = true;
    speed = 60;
    sensitivity = 128;
  };

After running nixos-rebuild switch, I see the following rule added in /run/current-system/etc/udev/rules.d/99-local.rules:

ACTION=="add|change", SUBSYSTEM=="input", ATTR{name}=="TPPS/2 IBM TrackPoint", ATTR{device/speed}="60", ATTR{device/sensitivity}="128"

On reboot, I can see the following values:

$ cat /sys/devices/platform/i8042/serio1/serio2/sensitivity 
200
$ cat /sys/devices/platform/i8042/serio1/serio2/speed
60

If I remove the rules from configuration.nix and restart, I've got the following values:

$cat /sys/devices/platform/i8042/serio1/serio2/sensitivity 
200
$ cat /sys/devices/platform/i8042/serio1/serio2/speed 
97

It looks like speed is being set as expected and returns to defaults otherwise, but sensitivity stays locked at 200.

Expected behavior

With the above rules, I expect speed to be set to 60 and sensitivity to be set to 128.

Additional context

I'm using a ThinkPad X220 running NixOS unstable, and Wayland. There's a previous bug report here but I'm not sure how relevant it is now: NixOS/nixos-hardware#56

Notify maintainers

@thillux
@nikstur

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.22, NixOS, 24.05 (Uakari), 24.05pre601756.44d0940ea560`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"home-manager, nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a 👍 reaction to issues you find important.

@lowercasename
Copy link
Author

A bit of an update: I uncommented my rules and ran nixos-rebuild switch:

building Nix...
building the system configuration...
these 3 derivations will be built:
  /nix/store/62rbzslp455f3awllxclbp1973bwswpq-system-units.drv
  /nix/store/f5qciizlrj9sa3ly5ni8c3kkv1awqgf0-etc.drv
  /nix/store/q8dmpspjl2273z038gp5kyk1flb90i6z-nixos-system-chortik-24.05pre601756.44d0940ea560.drv
building '/nix/store/62rbzslp455f3awllxclbp1973bwswpq-system-units.drv'...
building '/nix/store/f5qciizlrj9sa3ly5ni8c3kkv1awqgf0-etc.drv'...
building '/nix/store/q8dmpspjl2273z038gp5kyk1flb90i6z-nixos-system-chortik-24.05pre601756.44d0940ea560.drv'...
updating GRUB 2 menu...
stopping the following units: systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd.service
activating the configuration...
setting up /etc...
reloading user units for username...
restarting sysinit-reactivation.target
starting the following units: systemd-udevd-control.socket, systemd-udevd-kernel.socket
the following new units were started: trackpoint.service

...and both sensitivity and speed are now set for my trackpoint, without restarting. I wonder if sensitivity is set to 200 at some stage during startup, but after NixOS's udev rule kicks in?

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

No branches or pull requests

1 participant