I’m troubleshooting high battery drain on a Lenovo Legion Slim 5 16APH8 on Kubuntu with:
My goal is to have the iGPU handle normal desktop use and have the dGPU only wake when explicitly needed.
I installed:
sudo apt update
sudo apt install nvidia-driver-580-open nvidia-prime
sudo prime-select on-demand
Refresh rate is set to 60 Hz.
The desktop renderer is the AMD iGPU, confirmed by:
glxinfo | grep "OpenGL renderer"
which shows:
OpenGL renderer string: AMD Radeon 780M Graphics ...
So the system is in the correct hybrid graphics setup.
The good state
Sometimes the NVIDIA GPU does go properly to sleep. When that happens:
cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status
cat /proc/driver/nvidia/gpus/0000:01:00.0/power
show:
suspended
Runtime D3 status: Enabled (fine-grained)
Video Memory: Off
In that state, battery life improves a lot. I saw roughly 12–15 W in the better moments. The bad state / remaining problem
The problem is that this does not stay stable.
At other times the same checks show:
active
Runtime D3 status: Enabled (fine-grained)
Video Memory: Active
When that happens, actual battery discharge jumps back up to around 25–27 W. I checked real battery power with:
cat /sys/class/power_supply/BAT1/power_now
For example:
25089000
which is about 25.1 W.
When the GPU is in the bad state, this command:
sudo lsof /dev/nvidia* 2>/dev/null
shows that the thing holding the NVIDIA device open is usually just:
Xorg
and on some Wayland tests it was:
Xorg
Xwayland
So the main remaining issue seems to be:
the driver / PRIME / AMD-rendering setup is correct, but Xorg sometimes wakes or keeps the dGPU awake anyway.
Possible solution / current best setup
The best setup I have found so far is:
sudo apt update
sudo apt install nvidia-driver-580-open nvidia-prime
sudo prime-select on-demand
Then verify with:
glxinfo | grep "OpenGL renderer"
cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status
cat /proc/driver/nvidia/gpus/0000:01:00.0/power
Desired good state:
prime-run <appname>
Has anyone found a reliable way to stop Xorg from waking the NVIDIA GPU again on this laptop / on Kubuntu, while keeping hybrid graphics and on-demand mode working normally?
- AMD Radeon 780M iGPU
- NVIDIA GeForce RTX 4070 Mobile dGPU
- BIOS graphics mode set to Both (only options are Discrete or Both)
- Kernel 6.17
My goal is to have the iGPU handle normal desktop use and have the dGPU only wake when explicitly needed.
I installed:
sudo apt update
sudo apt install nvidia-driver-580-open nvidia-prime
sudo prime-select on-demand
Refresh rate is set to 60 Hz.
The desktop renderer is the AMD iGPU, confirmed by:
glxinfo | grep "OpenGL renderer"
which shows:
OpenGL renderer string: AMD Radeon 780M Graphics ...
So the system is in the correct hybrid graphics setup.
The good state
Sometimes the NVIDIA GPU does go properly to sleep. When that happens:
cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status
cat /proc/driver/nvidia/gpus/0000:01:00.0/power
show:
suspended
Runtime D3 status: Enabled (fine-grained)
Video Memory: Off
In that state, battery life improves a lot. I saw roughly 12–15 W in the better moments. The bad state / remaining problem
The problem is that this does not stay stable.
At other times the same checks show:
active
Runtime D3 status: Enabled (fine-grained)
Video Memory: Active
When that happens, actual battery discharge jumps back up to around 25–27 W. I checked real battery power with:
cat /sys/class/power_supply/BAT1/power_now
For example:
25089000
which is about 25.1 W.
When the GPU is in the bad state, this command:
sudo lsof /dev/nvidia* 2>/dev/null
shows that the thing holding the NVIDIA device open is usually just:
Xorg
and on some Wayland tests it was:
Xorg
Xwayland
So the main remaining issue seems to be:
the driver / PRIME / AMD-rendering setup is correct, but Xorg sometimes wakes or keeps the dGPU awake anyway.
Possible solution / current best setup
The best setup I have found so far is:
sudo apt update
sudo apt install nvidia-driver-580-open nvidia-prime
sudo prime-select on-demand
Then verify with:
glxinfo | grep "OpenGL renderer"
cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status
cat /proc/driver/nvidia/gpus/0000:01:00.0/power
Desired good state:
- AMD renderer active
- runtime_status = suspended
- Video Memory = Off
prime-run <appname>
Has anyone found a reliable way to stop Xorg from waking the NVIDIA GPU again on this laptop / on Kubuntu, while keeping hybrid graphics and on-demand mode working normally?