Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Surface Book with Performance Base: NVMe SSD breaks suspend (s2idle) #123
s2idle (S0ix state), formerly called as Suspend-to-Freeze. Actually, some devices with Linux seem to go well with Connected Standby (Modern Standby) when s2idle is selected as a suspend mode (not traditional Suspend-to-Ram which is not supported even in Windows, though).
But my PC fails to resume from s2idle always when I attempt to resume for the second time (oddly, first time resume is ok).
How to reproduce
1. Make sure s2idle is selected as a suspend mode:
$ cat /sys/power/mem_sleep [s2idle]
2. First s2idle, can correctly resume from this state (you can go to s2idle in the ordinary way:
3. Second s2idle, and never to resume again
pci 0000:03:00.0: Refused to change power state, currently in D3 nvme 0000:02:00.0: Refused to change power state, currently in D3
(pci 0000:03:00.0 is wifi device)
And don't respond to any input anymore.
pre/*) echo 1 > "/sys/bus/pci/devices/0000:03:00.0/remove" post/*) echo 1 > /sys/bus/pci/rescan
But nvme will not go the same way. If I do, error storm occurs.
So, I need to set
Can anyone reproduce this issue? How to change power state of nvme from D3 state?
Hi! I can now correctly resume from s2idle more than first time with these commands!:
echo 0 > "/sys/bus/pci/devices/0000:02:00.0/d3cold_allowed" # nvme echo 0 > "/sys/bus/pci/devices/0000:03:00.0/d3cold_allowed" # wifi
Now no need to set
Can anyone confirm this?
it doesn't seem to work for me ... well in general
Because you are using SB2, maybe there are another issues preventing you from suspending the system. I think the cause can differ by models.
@jakeday Just for your information, I noticed disabling d3cold only for nvme is enough (at least for my Performance Base) to resume from s2idle.
echo 0 > "/sys/bus/pci/devices/0000:02:00.0/d3cold_allowed" # for SB Performance Base nvme for s2idle suspend
Then, I see this message
Also see this message
I don't know how harmful these messages are, though.
changed the title
Surface Book with Performance Base: nvme and wifi is preventing PC from resuming from s2idle
Apr 2, 2018
referenced this issue
Jan 10, 2019
Sorry to comment on an old closed issue, but I want to share my update.
I wrote my findings here:
I made two patches to fix suspend by kernel side. These patches fix resume from suspend by not allow that NVMe disk to enter D3 state and then, improve power consumption when we disable D3 state on the NVMe during suspend.