If you don’t mind switching to latest stable kernel, this might resolves the issue:
boot.kernelPackages = pkgs.linuxPackages_latest;
You might find useful information on this thread, it helped me a lot to fix the issues on my AMD Ryzen 7 PRO 3700U.
I’ve noticed, while debugging, that different kernel versions had different symptoms on sleeps (not consistent throughout versions). What is your current kernel version ? Maybe I can try to reproduce this on my laptop.
Let me know if I can provide you more information ! I checked the hardware of your laptop compared to mine, and they look like they are close models.
I have been running pkgs.linuxPackages_latest on the 19.09 channel since I bought this machine. nixos 19.09 only gives me kernel 5.4.24.
I’ve gone through a lot of that thread and tried many of the options, including iommu=soft, iommu=off, amd_iommu=off, and additional things documented in other threads. Nothing has changed. About 1/3 of the time, when I put this machine to sleep, it won’t wake up and I have to force it to power off.
Anyone still having this issue: here’s the most exhaustive thread on the web so far about it:
Hopefully we can get a fix! I’ve not found anything that works to any degree (to resume a suspension) except this live distro. To try it just boot and type zzz
Maybe something about running from flash instead of SSD/NVME?
I haven’t been having this problem in quite a long while. And unfortunately I forget what totally solved it, but I think it’s a matter that I have a before-sleep job that disables the c6 sleep state on the system. This is the ZenStates program that I use, and this is the before-sleep script:
systemd.services.before-sleep = {
description = "Jobs to run before going to sleep";
serviceConfig = {
Type = "oneshot";
ExecStart = "${before-sleep}";
};
wantedBy = [ "sleep.target" ];
before = [ "sleep.target" ];
};
nixpkgsLocal points to a clone of the nixpkgs repository on my local system, but since I built this I see that zenstates is now part of the standard repository.
For what it’s worth: I received a T14S (AMD Ryzen 7 PRO 4750U with Radeon Graphics) for work yesterday and had similar issues to what you are describing. I found this reddit-thread and the top-comment delivered the solution in my case. Just a BIOS-option