Open lowercasename opened 7 months ago
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?
It seems that sensitivity get set from hwdb. Invoking udevadm test /sys/class/input/event<n>
shows POINTINGSTICK_SENSITIVITY=200
. I get my sensitivity=255 after boot on my T450s with the following in config:
services.udev.extraHwdb = ''
evdev:name:TPPS/2 IBM TrackPoint:dmi:*:svnLENOVO:*:pvrThinkPadT450s:*
POINTINGSTICK_SENSITIVITY=255
'';
@lowercasename Could you test if the following works for you?
{ config, lib, ... }:
{
services.udev.extraHwdb =
let
c = config.hardware.trackpoint;
in
lib.optionalString c.enable ''
evdev:name:${c.device}:dmi:*:svnLENOVO:*:pvrThinkPad*:*
POINTINGSTICK_SENSITIVITY=${builtins.toString c.sensitivity}
'';
}
Describe the bug
I've got the following rules in
configuration.nix
:After running
nixos-rebuild switch
, I see the following rule added in/run/current-system/etc/udev/rules.d/99-local.rules
:On reboot, I can see the following values:
If I remove the rules from
configuration.nix
and restart, I've got the following values:It looks like
speed
is being set as expected and returns to defaults otherwise, butsensitivity
stays locked at200
.Expected behavior
With the above rules, I expect
speed
to be set to 60 andsensitivity
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: https://github.com/NixOS/nixos-hardware/issues/56
Notify maintainers
@thillux @nikstur
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.