Sleep States

When I first got my own computer, it was a refurbished Windows laptop built to last all of 4 years. It wasn’t particularity fast or well built, but it was mine. I wasn’t so well versed with technology back then, and kept most everything at stock settings. This led to some unusual issues – sometimes the laptop would simply decide to heat up, melt everything around it, and die. At the time, the best I could do was keep a charger with me.

I had heard of a new thing called Linux, but my understanding was that it was for people who knew what they were doing – and I still needed to turn in my assignments as Word documents. But as time passed and I entered college, with the looming threat of needing use a CLI and understand g++ finally gave me the push to attempt to install Ubuntu.

Ubuntu (even now) has a strange problem – sometimes it will decide to freeze, play the same half second of audio in a loop, and then die. There are no obvious errors, and all input devices become unresponsive. The laptop uses an AMD CPU, and any attempt to sleep crashes the device. As you might have guessed, these two errors are the same type of error – mishandling sleep states.

Aside: This is easily fixed by going into GRUB adding this to the boot options (but it will prevent your laptop from sleeping):

intel_idle.max_cstate=1

My Pico W also has some of the same issues as attempts tell the chip to sleep without first disabling WIFI will leave it in a pseudo-sleep – drawing significantly higher power without the ability to control it. As far as my own understanding goes, the RP2040 make use of external module for WIFI – and the power to that module and the built-in LED is not controlled by the sleep state.

Now, as I run into power management issues with my own micro controllers and the need to keep them online for a month+ at a time for remote sensor monitoring, low power sleep states are becoming an increasingly important aspect of computing that I’ve never thought about – mishandling them is disastrous, and using them safely is difficult, but if I do this correctly, I will no longer have gaps in my data.

Now to get my own sleep states under control.


Posted

in

by

Tags: