Can't hibernate without root on my Thinkpad T430s

When I switched over from an L430 to an T430s I lost the ability to hibernate and I’m not entirely sure why. If I recall correctly simply setting

    services.logind.extraConfig = ''


allowed me to hibernate my previous laptop by pressing the power key. I tried to fix this on my T430s by manually calling hibernate, but it complains that it must be run as root, even if I set

  security.wrappers.hibernate = {
    source = "${pkgs.hibernate}/bin/hibernate";
    user = "root";

Am I missing something?


Does the command work when invoked with sudo?

If yes then it’s probably a difference in the systemd versions, are you using the same nixos channel?

If no it’s probably an ACPI issue, have a look in nixos-hardware/lenovo/thinkpad at master · NixOS/nixos-hardware · GitHub to see if you can steal some config in there.

The command does indeed work when invoked with sudo.

it’s probably a difference in the systemd versions, are you using the same nixos channel?

Everything is installed from whatever channel pkgs in configuration.nix binds to. nixos-18.03?

You can run nix-shell -p nix-info --run "nix-info -m" on both systems to find out.

Also type -P hibernate to find out if it’s finding the executable with the setuid bit first.

Unfortunately I no longer have my previous laptop. I did find out that holding down the power button for a short while (instead of just pressing it) makes it enter hibernation. This is with the settings posted in the OP.

Another lenovo here with a related data point.

Previously when I was using a Dell as a media center PC, a quick press on the power button would be enough to power it off. On the lenovo however, it needs to be held for slightly less than a second before it starts the shut down process.

Must be something they changed between the L- and T-models. Thanks for confirming.