I have KDE set to Turn Off Screen after 5 minutes and to Sleep after 10 minutes of inactivity. This works when I first turn on the machine, but eventually stops working after a few hours of general use (mostly Firefox, VS Code, and some Steam games). Sometimes the screen isn’t turning off at all, other times the screen turns off but the machine never goes to sleep. (Explicitly telling it to go to sleep from the main menu always works.)

I figure there’s either some sort of issue with KDE power management, or one (or more) applications are preventing it from sleeping. How do I troubleshoot this further?

systemd-inhibit just lists PowerDevil, which seems to be KDE’s power management service:

$ systemd-inhibit --list --mode=block
WHO        UID  USER    PID  COMM            WHAT                                                                       WHY                      MODE 
PowerDevil 1000 iggames 4115 org_kde_powerde handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch KDE handles power events block

1 inhibitors listed.

One time, I clicked KDE’s Power Management notification icon, and it showed me an app that was preventing sleep (a game that had not exited properly). Most of the time, however, it doesn’t list anything.

Is there a way to see what apps are causing “activity” that would prevent PowerDevil from suspending the machine? What should I try next?

System details:

Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.8.11-300.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i5-12400
Memory: 31.1 GiB of RAM
Graphics Processor: AMD Radeon RX 6600
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B660M DS3H DDR4
  • Red@reddthat.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    5 months ago

    Close, that is because of the wakeup. (I think)

    See all of your devices that make your computer: cat /proc/acpi/wakeup

    Toggle all of them one by one:

    echo GPP0 | sudo tee /proc/acpi/wakeup (where GPP0 is the item in the left hand column)

    Cat again if you want to see if it’s disabled

    Keep going until you find the one that is ‘waking’ your computer back up after a sleep.

    When you find the right one, add it to your crontab so it turns it off on every boot:

    sudo crontab -e
    @reboot echo "GPP0" > /proc/acpi/wakeup