Skip to content

Suspend on ThinkPad L510 with pm-suspend #1624

@Atemo-C

Description

@Atemo-C

Greetings. NixOS works on my ThinkPad L510 (albeit with difficulty when rebuilding the system due to having less than 2 GB of memory available), but suspending using the default systemctl suspend command simply does not work, and this is the case on any modern systemd-based Linux distributions on this hardware.

Currently, I have my own workaround in this module, and was wondering if the pm-suspend workaround in said module would be a good idea to implement here.

This could also be easily replicated for hibernation, but I have had no issue with that on my end.

Cheers.


{ config, pkgs, ... }: {
	environment.systemPackages = [ pkgs.pmutils ];

	systemd.services."systemd-suspend" = {
		description = "System suspend with pm-suspend";
		serviceConfig.Type = "oneshot";
		serviceConfig.Environment = "PATH=${pkgs.pmutils}/bin";
		serviceConfig.ExecStart = [ "" "${pkgs.pmutils}/bin/pm-suspend" ];
	};
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions