Powerprofile 'performance' is inhibited by 'lap-detected' if ThinkPad is tilted on a desktop-stand

fedora 34 Silverblue on a lenovo ThinkPad X1 Carbon, which resides on a desktop-stand, tilted by ~30 degrees: I would like to permanently switch to the ‘performance’ power profile while the ThinkPad is on the desktop-stand in a tilted position. But it switches back to ‘balanced’ after a while.

root@fedora:~# powerprofilesctl 
  performance:
    Driver:     platform_profile
    Inhibited:  yes (lap-detected)

* balanced:
    Driver:     platform_profile

  power-saver:
    Driver:     platform_profile

I cannot change the power profile to ‘performance’ in Gnome settings. If I run the following command to switch to the ‘performance’ power profile,

root@fedora:~# echo performance > /sys/firmware/acpi/platform_profile

it is ignored at the 1st try. If I immediately re-run it a 2nd time, the profile is changed:

root@fedora:~# powerprofilesctl 
* performance:
    Driver:     platform_profile
    Inhibited:  yes (lap-detected)

  balanced:
    Driver:     platform_profile

  power-saver:
    Driver:     platform_profile

But when I check the current profile after a while (minutes), it has switched back to ‘balanced’.

I suspect, that the ‘lap-detected’ inhibitor might be accidentally triggered (by some acceleration sensors?) by having the ThinkPad in a tilted position on the desktop-stand: if I put it flat on the desktop surface, the ‘inhibited yes (lap-detected)’ changes to ‘no’ after a while (minutes). If I then put it back to the tilted position on the desktop-stand, the ‘inhibited’ immediately changes back to ‘yes (lap-detected)’ and the power profile switches back from ‘performance’ to ‘balanced’.

Any idea how I can avoid the accidential lap-detection and ‘inhibited yes (lap-detected)’ while the ThinkPad is on the desktop-stand in a tilted position?

best regards, Armin.

I think this is likely a bug that should be reported upstream to either GNOME settings or to the powerprofiles daemon.

Thanks for this advise. I opened a bug: Bug 2014261

(Btw. this is my 1st bug reported to fedora bugzilla. If you could have a look at it and advise on how to improve my bug report, that would be very welcome!)

Armin.

1 Like

I am not able to access that bug, but in my experience the issue isn’t really to do with gnome settings or power profiles daemon.

Whether your device is considered to be on your lap is decided by the device’s firmware from Lenovo. Sometimes it can be a bit finicky in my experience. This bug can only really be solved properly by them, gnome settings just follows what the firmware ultimately decides.

Some related discussion: CPU Turbo Modes are not used in "balanced" mode (#29) · Issues · Bastien Nocera / power-profiles-daemon · GitLab

1 Like

The bug is restricted to a private group for an unknown reason. Suggesting @awarda to remove it.

Sorry, there is no reason why this bug should be restricted to a private group, I will try to remove the restriction (if I can find out how…) A.

Now the accidental visibility restriction of the bug 2014261 to a private group should be removed, should be visible to everyone now.

I have the same problem on my X1 carbon g7. But the output of powerprofilesctl says Degraded instead of Inhibited, and it never goes back to not lap-detected.
Edit : after a night on my desk and a reboot, it switched back to Degraded : no

I have rebased my silverblue to fedora 35 and now the ‘performance’ profile stays enabled (it does not switch back to ‘balanced’) when the ThinkPad is resting in a tilted position, although the ‘lap detected’ is still indicated in the Gnome power settings: ‘Lap detected: performance mode temporarily unavailable. Move the device to a stable surface to restore.’

Armin.

This sounds like another bug, I think I have seen it too.

Edit: Doesn’t auto switch to balanced profile when lap detected (#60) · Issues · Bastien Nocera / power-profiles-daemon · GitLab

I run Ubuntu on a ThinkPad T15 Gen 2i that I recently got and I constantly have issues with Performance mode being Degraded due to Lap Detection.

There’s no issue with either OS I’m pretty sure, but for the sake of solving this, did anyone find a fix? Can we somehow disable Lap detection?

I think there is a delay that can be added to the response of that sensors change of state, but I am unfamiliar with how to change anything with PPD since I ripped it out and replaced it with tuned, now my desktop doesn’t think it’s a laptop.

Interestingly on my x1 Gen 9 carbon, after several restarts entered directly into laptop detected mode I dual booted into Windows, manually updated the balanced setting straight into power, booted back into Fedora and laptop had returned to Performance settings again. So Windows may have a force override option.