Hi
When I hibernate the system with sudo systemctl hibernate
the screen and keyboard light stay on. The laptop looks like it froze but I can force shut off by holding the power button and when I turn it on again everything comes back as I expect it (it works).
I’m running with the NVIDIA discrete GPU disabled (I don’t need it) by doing:
hardware.nvidiaOptimus.disable = true;
Nothing else:
boot.initrd.availableKernelModules = [ “xhci_pci” “thunderbolt” “vmd” “nvme” “usb_storage” “rtsx_pci_sdmmc” ];
boot.initrd.kernelModules = [ “dm-snapshot” ];
boot.kernelModules = [ “kvm-intel” ];
boot.extraModulePackages = [ ];
And the latest kernel available on NixOS 22.11 (6.0.9):
boot.kernelPackages = pkgs.linuxPackages_latest;
I found these on the journal:
Dec 02 19:31:37 hostname systemd[1]: Starting Pre-Sleep Actions…
Dec 02 19:31:37 hostname systemd[1]: pre-sleep.service: Deactivated successfully.
Dec 02 19:31:37 hostname systemd[1]: Finished Pre-Sleep Actions.
Dec 02 19:31:37 hostname systemd[1]: Reached target Sleep.
Dec 02 19:31:37 hostname systemd[1]: Starting Hibernate…
Dec 02 19:31:37 hostname systemd-sleep[602148]: Entering sleep state ‘hibernate’…
Dec 02 19:31:37 hostname kernel: PM: hibernation: hibernation entry
Dec 02 19:31:37 hostname kernel: bbswitch: enabling discrete graphics
Dec 02 19:31:37 hostname kernel: pci 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible
Dec 02 19:31:37 hostname kernel: pci 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible
Dec 02 22:09:03 hostname kernel: Filesystems sync: 0.010 seconds
Dec 02 22:09:03 hostname kernel: Freezing user space processes … (elapsed 0.001 seconds) done.
Dec 02 22:09:03 hostname kernel: OOM killer disabled.
Why is bbswictch
trying to turn the GPU on after it turned it off during the boot process ?
[fmaste@hostname:~]$ sudo systemctl status bbswitch.service
● bbswitch.service - Disable NVIDIA Card
Loaded: loaded (/etc/systemd/system/bbswitch.service; enabled; preset: enabled)
Active: active (exited) since Fri 2022-12-02 15:11:03 UTC; 10h ago
Process: 2855 ExecStart=/nix/store/y8fws7bq1v3f6pidnayjkvs13innnjw4-bbswitch-unstable-20>
Main PID: 2855 (code=exited, status=0/SUCCESS)
IP: 0B in, 0B out
CPU: 29msDec 02 15:11:03 hostname systemd[1]: Starting Disable NVIDIA Card…
Dec 02 15:11:03 hostname systemd[1]: Finished Disable NVIDIA Card.
I haven’t enabled any other config option related to GPU/Optimus/Prime/video/etc, just:
services.xserver.displayManager.startx.enable = true;
services.xserver.windowManager.xmonad = {…};
Output of lspci
shows:
0000:00:02.0 VGA compatible controller: Intel Corporation TigerLake-H GT1 [UHD Graphics] (rev 01)
0000:01:00.0 3D controller: NVIDIA Corporation GA107GLM [RTX A2000 Mobile] (rev a1)
Thanks!!!