Without adding this module, the service is not directly usable.
---
nixos/modules/services/monitoring/hdaps.nix | 1 +
1 file changed, 1 insertion(+)
diff --git a/nixos/modules/services/monitoring/hdaps.nix b/nixos/modules/services/monitoring/hdaps.nix
index be26c44e78d..2cad3b84d84 100644
--- a/nixos/modules/services/monitoring/hdaps.nix
+++ b/nixos/modules/services/monitoring/hdaps.nix
@@ -16,6 +16,7 @@ in
};
config = mkIf cfg.enable {
+ boot.kernelModules = [ "hdapsd" ];
services.udev.packages = hdapsd;
systemd.packages = hdapsd;
};
ryantm
2
@hpoussin It looks like there is no kernel module called âhdapsdâ. Did you mean âhdapsâ?
No, I really mean âhdapsdâ.
hdapsd (pkgs/os-specific/linux/hdapsd/default.nix) package source code is at https://github.com/evgeni/hdapsd/releases/download/20141203/hdapsd-20141203.tar.gz .
Without the patch (or with âhdapsâ as you suggest), I get
dmesg | grep -i hdaps
[ 15.086633] hdaps: supported laptop not found!
[ 15.086635] hdaps: driver init failed (ret=-19)!
[ 24.204814] audit: type=1130 audit(1551030602.203:74): pid=1 uid=0 auid=4294967295 ses=4294967295 msg=âunit=hdapsd@sda comm=âsystemdâ exe=â/nix/store/kinpd6wss80pf2d04jnvvmw25lzkrlbq-systemd-239/lib/systemd/systemdâ hostname=? addr=? terminal=? res=successâ
With this patch, I get:
dmesg | grep -i hdaps
[ 16.093667] hdaps: LENOVO ThinkPad X220 detected, setting orientation 4
[ 16.093764] hdaps: initial mode latch is 0x05
[ 16.093907] hdaps: setting ec_rate=250, filter_order=2
[ 16.094130] hdaps: device successfully initialized.
[ 16.094192] input: ThinkPad HDAPS joystick emulation as /devices/virtual/input/input6
[ 16.094220] input: ThinkPad HDAPS accelerometer data as /devices/virtual/input/input7
[ 16.094221] hdaps: driver successfully loaded.
[ 24.919059] audit: type=1130 audit(1551029327.917:73): pid=1 uid=0 auid=4294967295 ses=4294967295 msg=âunit=hdapsd@sda comm=âsystemdâ exe=â/nix/store/kinpd6wss80pf2d04jnvvmw25lzkrlbq-systemd-239/lib/systemd/systemdâ hostname=? addr=? terminal=? res=successâ
Joystick and accelerometers are available, and hard disk protection is enabled.
1 Like
ryantm
4
Thanks for the clarification. Iâve converted your patch into a GitHub PR, which Iâll merge later today to get it in before the feature freeze.
https://github.com/NixOS/nixpkgs/pull/56309