关于Ubuntu 23.10睡眠模式高功耗、唤醒异常及优化修复的技术问询
Hey there! Let's tackle your sleep/wake and power consumption headaches on Ubuntu 23.10 with your Lenovo laptop and Ryzen 5 5500U—this is a pretty common pain point with AMD hardware on Linux, but there are actionable fixes and checks you can run right now.
First, let's fix that high sleep power draw
The biggest difference between Windows and Ubuntu here is usually the sleep mode type: Windows defaults to a deep, low-power sleep, while Ubuntu often uses a lighter "s2idle" mode that can still draw noticeable power. Here's how to switch to deep sleep:
- Check which sleep modes your system supports:
If you seecat /sys/power/mem_sleeps2idle [deep], deep sleep is available but not set as default. If you only sees2idle, we'll need to enable it via grub. - Edit the grub configuration to set deep sleep as default:
Find the line starting withsudo nano /etc/default/grubGRUB_CMDLINE_LINUX_DEFAULTand addmem_sleep_default=deepto the quoted string, like this:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep" - Save the file (Ctrl+O, then Enter) and exit nano (Ctrl+X), then update grub:
Reboot your laptop, and this should drop sleep power consumption to be much closer to Windows.sudo update-grub
Next, fix the wake-from-sleep failures
Wake issues often come down to ACPI (the power management interface) compatibility with Lenovo's hardware. Try adding a grub parameter to improve this:
- Reopen the grub config file with
sudo nano /etc/default/grub - Add
acpi_osi=! "Windows 2020"to the sameGRUB_CMDLINE_LINUX_DEFAULTstring. It should look something like:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep acpi_osi=! \"Windows 2020\"" - Update grub again with
sudo update-gruband reboot. This tells Linux to mimic an older Windows ACPI profile, which often fixes Lenovo's wake-up quirks.
Tweak AMD GPU power management
Your Ryzen 5500U's integrated Radeon GPU might be staying active in sleep mode. Let's make sure it's using proper power management:
- Create or edit the amdgpu config file:
sudo nano /etc/modprobe.d/amdgpu.conf - Add these lines to enable dynamic power management:
options amdgpu power_dpm_force_performance_level auto options amdgpu amdgpu_dpm_enable=1 - Save and reboot. This helps the GPU scale down to minimal power when sleeping.
Will updates fix this long-term?
Absolutely! Ubuntu 23.10 is a short-term release (supported until July 2024), so regular kernel and package updates will keep rolling in—these often include fixes for AMD power management and sleep/wake bugs. If you want even more stability, consider upgrading to Ubuntu 24.04 LTS when it's available (it launches in April 2024), as LTS versions get extended support and polished hardware compatibility for newer Ryzen platforms.
Bonus: Diagnose hidden power hogs
Install powertop to see exactly what's drawing power during sleep:
sudo apt install powertop
Run it with sudo powertop, switch to the "Sleep Stats" tab, and you'll see which processes or devices are staying active. You can also run sudo powertop --auto-tune to apply automatic power-saving tweaks.
备注:内容来源于stack exchange,提问作者Tiago Earth

