bizarre sleep and screen-related bug on my Linux laptop
I've been seeing this bizarre Linux-adjacent bug on my laptop w/ NVIDIA GPU & Intel CPU, where sleeping would not save any power at all, i.e. the battery would still be drained as if it was on normal operation. Not only that, trying to wake it up would result in the screen being unresponsive.
The screen would hang, cut to a black screen, briefly become responsive, and hang again. Rinse and repeat. Until now, it's always been this way... until I recently remembered that I could launch a TTY under this unresponsive condition.
Since TTY1 and TTY2 were claimed by my OS's graphical environment, I used [CTRL] + [ALT] + [F3] to launch TTY3. I then ran "journalctl -r", which lists systemd logs. the "-r" command argument sorts the output starting from the most recent log.
This log output was repeated many times by the kernel.
i915 0000:00:02.0: [drm] *ERROR* Failed to read DPCD register 0x92
"i915"... Intel display driver? I have another laptop with a 10th Gen. Intel CPU and no discrete GPU, and it can suspend and wake up just fine. For a while, I've been putting the blame on NVIDIA only because of it solely happening on my main laptop, but anyway...
I searched the problem up on the Internet, and saw this Arch Linux forum post: https://bbs.archlinux.org/viewtopic.php?id=300434
Quoting the answer for that post:
The error "Failed to read DPCD register 0x92" is a common issue that can prevent suspend and hibernate from working correctly. To resolve this, you need to add the following kernel parameter: intel_idle.max_cstate=2
I wasn't going to add this as another kernel parameter without knowing a bit more about it first. I then searched it up, leading me to this GitHub gist: https://gist.github.com/wmealing/2dd2b543c4d3cff6cab7
There was a comment for the gist detailing how to list all C-states of my CPU:
Kernel intel_idle module parameter n is a state number. Cn is a state name. They do correspond to each other, but state numbers are CPU-specific. So the same n means different Cns on different platforms. You can find out the correspondence between intel_idle driver state numbers and state names using, for example, the following command: grep . /sys/devices/system/cpu/cpu0/cpuidle/state*/name
Here was the output on my side:
/sys/devices/system/cpu/cpu0/cpuidle/state0/name:POLL /sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1E /sys/devices/system/cpu/cpu0/cpuidle/state2/name:C6 /sys/devices/system/cpu/cpu0/cpuidle/state3/name:C8
So, for example, when I add this kernel parameter: intel_idle.max_cstate=3, then the deepest C-state that my laptop is allowed to enter would be C8... So, I added this kernel parameter (through this ArchWiki guide: https://wiki.archlinux.org/title/Kernel_parameters), but I remember that I wrote "4" instead of "3", like this:
intel_idle.max_cstate=4
...but it did not impact anything on my side.
Before the addition of this kernel parameter, I ran this command here:
cat /sys/module/intel_idle/parameters/max_cstate
Weirdly enough, it outputted "9", even though I only have state0 to state3.
After finalising my change, I noticed that whenever my main laptop screen shuts down, either due to the PC being idle, or me closing the lid to solely focus on my second monitor, my laptop would not panic when it tried to reinitialise that screen.
Additionally, when my laptop sleeps, it actually conserves its battery properly now. Plus, I can wake it up just fine, too. Though, I should say that the screen would not turn on on its own while waking up, but that's far better than nothing.














