https://bugzilla.kernel.org/show_bug.cgi?id=65761
--- Comment #25 from Christoph Haag haagch.christoph@googlemail.com --- Created attachment 124041 --> https://bugzilla.kernel.org/attachment.cgi?id=124041&action=edit just some printk to easily see what's going on
Well, I don't really know how it is supposed to work. I figured the easiest thing I could do right now was adding some printk() to the code to have an overview of what is happening in dmesg -H | grep radeonpm.
After booting up with no X I see this:
[ +0,000016] radeonpm: runtime_idle [ +4,000483] radeonpm: runtime_suspend
After starting X this is added:
[Jan31 19:04] radeonpm: runtime_resume [ +1,126688] radeonpm: runtime_idle [ +0,000203] radeonpm: runtime_idle [ +0,000400] radeonpm: runtime_idle [ +0,000232] radeonpm: runtime_idle
But then it never does anything again.
After this, I did the usual xrandr --setprovideroffloadsink radeon Intel and started and exited DRI_PRIME=1 glxgears and stuff, but nothing with radeonpm was printed to the log again.
After a while I tried exiting X and sure enough, another line:
[ +2,368895] radeonpm: runtime_suspend
And after starting X for the second time:
[ +19,119650] radeonpm: runtime_resume [ +1,131037] radeonpm: runtime_idle
And then... nothing with radeonpm again. I have read a bit in the Documentation/power/runtime_pm.txt and maybe I did not catch it but I haven't really seen when you call pm_runtime_put_autosuspend whether it is supposed to eventually call back radeon_pmops_runtime_suspend but I would think that's what it does, right? So that just never happens until X is quit.
After boot with no X running I see this with for i in /sys/class/drm/card0/device/power/*; do echo "$i: $(cat $i)"; done
/sys/class/drm/card0/device/power/async: enabled /sys/class/drm/card0/device/power/autosuspend_delay_ms: 5000 /sys/class/drm/card0/device/power/control: auto /sys/class/drm/card0/device/power/runtime_active_kids: 0 /sys/class/drm/card0/device/power/runtime_active_time: 13260 /sys/class/drm/card0/device/power/runtime_enabled: enabled /sys/class/drm/card0/device/power/runtime_status: suspended /sys/class/drm/card0/device/power/runtime_suspended_time: 218426 /sys/class/drm/card0/device/power/runtime_usage: 0 [snipped some wakeup* stuff]
The GPU is off, fan is not running, etc.
After starting X I see this:
/sys/class/drm/card0/device/power/async: enabled /sys/class/drm/card0/device/power/autosuspend_delay_ms: 5000 /sys/class/drm/card0/device/power/control: auto /sys/class/drm/card0/device/power/runtime_active_kids: 0 /sys/class/drm/card0/device/power/runtime_active_time: 185230 /sys/class/drm/card0/device/power/runtime_enabled: enabled /sys/class/drm/card0/device/power/runtime_status: active /sys/class/drm/card0/device/power/runtime_suspended_time: 226856 /sys/class/drm/card0/device/power/runtime_usage: 0
runtime_status is always active in X...