Score:1

High power usage when suspended

vn flag

I have some issues with high power usage when my computer is suspended. There is significant power drain from one day to the next, and the battery is completely depleted in three to four days when the computer is left suspended without being connected to a power supply. I currently run Ubuntu 20.04, and this was never an issue before upgrading or while I still used Windows. My battery broke down a few months ago, and my work place's IT department said they had never experienced a laptop battery breaking down after such short time (~2 years of use), indicating there are some issues with how Ubuntu manages battery usage.

I believe the battery drain issue started when I tried to fix another issue that arose when upgrading to 20.04, where my computer failed entering suspend mode. This page presented a fix, where the line intel_idle.max_cstate=1 i915.enable_dc=0 is added to GRUB_CMDLINE_LINUX= in /etc/sysconfig/grub. At the time, this didn't really prevent my computer from failing to enter suspend mode, but I still left the parameters there as it seemed to reduce the occurrences where suspend failed. Later suspend issue seem to have been fixed, while my computer still uses a lot of power while suspended, so I was trying to restore the setting to its original state. I believe the issue lies with intel_idle.max_cstate=1 which prevents the processor from entering deep sleep states. i915.enable_dc=0 disables GPU power management. I am not sure whether this will affect anything as my laptop seemingly only uses my nvidia GPU.

However, I have two issues here:

  1. I cannot find a file named /etc/sysconfig/grub: There is no folder in /etc named sysconfig, and there is no file named grub. However, doing a search I did find a file /boot/grub/grub.cfg, which contain the line linux /boot/vmlinuz-5.4.0-77-generic root=UUID=901ebf90-3de9-4271-b1a3-c6ab7dec86c4 ro intel_idle.max_cstate=1 i915.enable_dc=0 quiet splash $vt_handoff. Are these the parameters I should modify? If not, where can I find the correct config file?
  2. I can no longer remember the original setting. What should the parameters be set to?

Alternatively, can there be another issue causing the battery drain on suspend?

Score:2
cn flag

Let's answer your specific grub questions first

  1. On Ubuntu the grub customization file is /etc/default/grub
  2. Assuming you haven't modified the above file (which is likely, since you couldn't find it), you can regenerate a fresh grub deployment, which will be driven off these default through sudo update-grub.

S0ix likely culprit for poor sleep power performance

One of the first things to determine is whether your laptop using so-called "legacy" S3 or so-called "modern" S0ix sleep state.

This may be determined through a BIOS setting (where available; some laptops don't allow customization), with S0ix sometimes called "Windows 10" and S3 sometimes called "Linux-compatible". It would typically be found under a "power" section in your BIOS.

The naming of the BIOS settings provides a hint: S0ix is not (very) well supported on Linux (yet...). Even on my 2021 laptop, which is running 21.04, the implementation is lacking in terms of power performance.

Below reference also provides a quick Bash script that allows checking which sleep setting your laptop is using (you'll need sudo apt install acpidump first).

Your best bet if your laptop provides a BIOS switch to S3/legacy/Linux sleep is to use that (you're likely to see drastic improvements, provided your laptop's firmware isn't buggy; mine is!). Otherwise, you can try your luck with Intel's troubleshooting guide and finally some Googling with your specific laptop model and "Linux S0ix" might yield some useful tips.

References:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.