On Wed, Sep 17, 2025 at 04:31:40PM +0200, Hubert Wiśniewski wrote:
On Wed Sep 17, 2025 at 3:54 PM CEST, Alan Stern wrote:
Are you aware that the action of pm_runtime_forbid() can be reversed by the user (by writing "auto" to the .../power/control sysfs file)?
I have tested this. With this patch, it seems that writing "auto" to power/control has no effect -- power/runtime_status remains "active" and the device does not get suspended. But maybe there is a way to force the suspension anyway?
I don't know exactly what's going on in your particular case. However, if you read the source code for control_store() in drivers/base/power/sysfs.c, you'll see that writing "auto" to the attribute file causes the function to call pm_runtime_allow().
If you turn on CONFIG_PM_ADVANCED_DEBUG there will be extra files in the .../power/ directory, showing some of the other runtime PM values. Perhaps they will help you to figure out what's happening.
Alan Stern