Power Management (powerdevil) putting computer to sleep too early

Hi, I am experiencing an issue where my computer is going to sleep earlier than what I have set in the Power Management settings.

System Info:

System:    Kernel: 5.6.8-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.3.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.6-x86_64 root=UUID=6a1b4ac3-d886-4a59-9195-2d4a8147274c rw quiet apparmor=1 
           security=apparmor udev.log_priority=3 
           Desktop: KDE Plasma 5.18.4 tk: Qt 5.14.2 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: Micro-Star model: MEG X570 ACE (MS-7C35) v: 1.0 serial: <filter> UEFI: American Megatrends 
           v: 1.80 date: 01/16/2020 
CPU:       Topology: 16-Core (2-Die) model: AMD Ryzen 9 3950X bits: 64 type: MT MCP MCM arch: Zen family: 17 (23) 
           model-id: 71 (113) stepping: N/A microcode: 8701013 L2 cache: 8192 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 224086 
           Speed: 3689 MHz min/max: 2200/3500 MHz boost: enabled Core speeds (MHz): 1: 3689 2: 3522 3: 3735 4: 3721 5: 3002 
           6: 3712 7: 3721 8: 3723 9: 3722 10: 3181 11: 3253 12: 3723 13: 3688 14: 2910 15: 3583 16: 3398 17: 2360 18: 3724 
           19: 3721 20: 3721 21: 3734 22: 3715 23: 3123 24: 3244 25: 3720 26: 3723 27: 3566 28: 3262 29: 3295 30: 2896 
           31: 3721 32: 3741 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: conditional, RSB filling 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] driver: amdgpu 
           v: kernel bus ID: 2f:00.0 chip ID: 1002:731f 
           Display: x11 server: X.Org 1.20.8 driver: amdgpu FAILED: ati unloaded: modesetting,radeon alternate: fbdev,vesa 
           compositor: kwin_x11 resolution: 3840x2160~120Hz 
           OpenGL: renderer: AMD Radeon RX 5700 XT (NAVI10 DRM 3.36.0 5.6.8-1-MANJARO LLVM 10.0.0) v: 4.6 Mesa 20.0.6 
           direct render: Yes 
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] Navi 10 HDMI Audio driver: snd_hda_intel v: kernel bus ID: 2f:00.1 
           chip ID: 1002:ab38 
           Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio vendor: Micro-Star MSI driver: snd_hda_intel 
           v: kernel bus ID: 31:00.4 chip ID: 1022:1487 
           Device-3: Logitech HD Pro Webcam C920 type: USB driver: snd-usb-audio,uvcvideo bus ID: 5-1.3:4 chip ID: 046d:082d 
           serial: <filter> 
           Device-4: N/A type: USB driver: cdc_acm,hid-generic,snd-usb-audio,usbhid bus ID: 5-3.2:5 chip ID: 2833:0051 
           serial: <filter> 
           Sound Server: ALSA v: k5.6.8-1-MANJARO 
Network:   Device-1: Intel I211 Gigabit Network vendor: Micro-Star MSI driver: igb v: 5.6.0-k port: e000 bus ID: 26:00.0 
           chip ID: 8086:1539 
           IF: enp38s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Realtek RTL8125 2.5GbE vendor: Micro-Star MSI driver: r8169 v: kernel port: d000 bus ID: 27:00.0 
           chip ID: 10ec:8125 
           IF: enp39s0 state: down mac: <filter> 
Drives:    Local Storage: total: 1.34 TiB used: 262.48 GiB (19.1%) 
           ID-1: /dev/nvme0n1 vendor: Corsair model: Force MP600 size: 953.87 GiB block size: physical: 512 B logical: 512 B 
           speed: 63.2 Gb/s lanes: 4 serial: <filter> rev: EGFM11.3 scheme: GPT 
           ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 970 EVO 1TB size: 931.51 GiB block size: physical: 512 B 
           logical: 512 B speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 2B2QEXE7 scheme: GPT 
           ID-3: /dev/nvme2n1 vendor: Corsair model: Force MP510 size: 894.25 GiB block size: physical: 512 B logical: 512 B 
           speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: ECFM12.3 scheme: GPT 
           ID-4: /dev/sda vendor: SanDisk model: SDSSDH3 512G size: 476.94 GiB block size: physical: 512 B logical: 512 B 
           speed: 6.0 Gb/s serial: <filter> rev: 1000 scheme: GPT 
Partition: ID-1: / raw size: 893.96 GiB size: 878.92 GiB (98.32%) used: 80.53 GiB (9.2%) fs: ext4 dev: /dev/nvme2n1p2 
Sensors:   System Temperatures: cpu: 54.2 C mobo: N/A gpu: amdgpu temp: 44 C 
           Fan Speeds (RPM): N/A gpu: amdgpu fan: 65535 
Info:      Processes: 557 Uptime: 1d 56m Memory: 31.38 GiB used: 22.16 GiB (70.6%) Init: systemd v: 244 Compilers: gcc: 9.3.0 
           clang: 10.0.0 Shell: bash v: 5.0.16 running in: konsole inxi: 3.0.37 

I have my Power Management settings set up to sleep after 4 hours (240 min):
Screenshot_20200505_091910

However, I am finding that my system is going to sleep mode after about 30 minutes. Here is a snippet of the journalctl from last night. I walked away from my machine at around 11pm, and it went to sleep at around 11:30pm.

May 04 22:58:21 Manjaro-PC org_kde_powerdevil[4298]: powerdevil: Enforcing inhibition from ":1.328" "/usr/bin/discord" with cookie 200 and reason "Playing audio"
May 04 22:58:21 Manjaro-PC org_kde_powerdevil[4298]: powerdevil: By the time we wanted to enforce the inhibition it was already gone; discarding it
May 04 22:59:27 Manjaro-PC org_kde_powerdevil[4298]: powerdevil: Scheduling inhibition from ":1.334" "/usr/bin/discord" with cookie 201 and reason "Playing audio"
May 04 22:59:30 Manjaro-PC org_kde_powerdevil[4298]: powerdevil: Releasing inhibition with cookie  201
May 04 22:59:30 Manjaro-PC org_kde_powerdevil[4298]: powerdevil: It was only scheduled for inhibition but not enforced yet, just discarding it
May 04 22:59:32 Manjaro-PC org_kde_powerdevil[4298]: powerdevil: Enforcing inhibition from ":1.334" "/usr/bin/discord" with cookie 201 and reason "Playing audio"
May 04 22:59:32 Manjaro-PC org_kde_powerdevil[4298]: powerdevil: By the time we wanted to enforce the inhibition it was already gone; discarding it
May 04 23:09:30 Manjaro-PC org_kde_powerdevil[4298]: powerdevil: Kbd backlight brightness value:  0
May 04 23:30:16 Manjaro-PC org_kde_powerdevil[2057]: powerdevil: Can't contact systemd
May 04 23:30:16 Manjaro-PC org_kde_powerdevil[2057]: powerdevil: Can't contact ck
May 04 23:30:16 Manjaro-PC org_kde_powerdevil[2057]: powerdevil: Suspend session triggered with QMap(("GraceFade", QVariant(bool, true))("Type", QVariant(uint, 1)))
May 04 23:30:16 Manjaro-PC org_kde_powerdevil[2057]: powerdevil: Suspend session triggered with QMap(("GraceFade", QVariant(bool, true))("SkipFade", QVariant(bool, true))("Type", QVariant(uint, 1)))
May 04 23:30:21 Manjaro-PC org_kde_powerdevil[2057]: powerdevil: Can't contact systemd
May 04 23:30:21 Manjaro-PC org_kde_powerdevil[2057]: powerdevil: Can't contact ck
May 04 23:30:21 Manjaro-PC org_kde_powerdevil[2057]: powerdevil: Suspend session triggered with QMap(("SkipFade", QVariant(bool, true))("Type", QVariant(uint, 1)))
May 04 23:30:21 Manjaro-PC org_kde_powerdevil[2057]: powerdevil: Starting Login1 suspend job
May 04 23:30:21 Manjaro-PC org_kde_powerdevil[4298]: powerdevil: Pausing all media players before sleep
May 04 23:30:21 Manjaro-PC org_kde_powerdevil[2057]: powerdevil: Pausing all media players before sleep

I can't help you with your problem, as I'm not a KDE user (anymore). Just wanted to congratulate you on this magnificent machine :star_struck:

I'm just curios, since is a desktop and no information about battery in the inxi, from where do the option tab come from and what settings have there? From your screenshot

image

On my end, also desktop there are no battery tabs.

image

Hi,
I have a UPS battery backup hooked up via USB to the system. I think it shows those options because of that. Here's what it looks like:

Screenshot_20200507_085743

In that case you have to make sure there is no false input as if the system goes for a short moment on battery, hence making it to sleep early ...

I would assume that powerdevil would log an event if the system switches from AC to Battery power? If not, what should I be searching for in the journalctl? Thanks.

Yes, the logs should show something
journalctl -b | grep powerdevil
but quite not sure if there will be something in it.

I could not find any indication in the log seeing that powerdevil was using the Battery settings, or switching over to Battery power.

However, I unchecked all the options in the On Battery and On Low Battery panes and it seems to have solved the issue (fingers crossed).

Thanks for your help!

I may have spoken too soon. The issue is still persisting. And there is an additional symptom now, where the system will suspend randomly while I'm using it. Here is the log - the computer suspended randomly at 15:15

May 11 14:51:03 Manjaro-PC org_kde_powerdevil[3830]: powerdevil: It was only scheduled for inhibition but not enforced yet, just discarding it
May 11 14:51:06 Manjaro-PC org_kde_powerdevil[3830]: powerdevil: Enforcing inhibition from ":1.14" "firefox" with cookie 66 and reason "video-playing"
May 11 14:51:06 Manjaro-PC org_kde_powerdevil[3830]: powerdevil: By the time we wanted to enforce the inhibition it was already gone; discarding it
May 11 14:51:06 Manjaro-PC org_kde_powerdevil[3830]: powerdevil: Enforcing inhibition from ":1.14" "firefox" with cookie 67 and reason "audio-playing"
May 11 14:51:06 Manjaro-PC org_kde_powerdevil[3830]: powerdevil: By the time we wanted to enforce the inhibition it was already gone; discarding it
May 11 15:14:50 Manjaro-PC org_kde_powerdevil[1847]: powerdevil: Can't contact systemd
May 11 15:14:50 Manjaro-PC org_kde_powerdevil[1847]: powerdevil: Can't contact ck
May 11 15:14:50 Manjaro-PC org_kde_powerdevil[1847]: powerdevil: Suspend session triggered with QMap(("GraceFade", QVariant(bool, true))("Type", QVariant(uint, 1)))
May 11 15:14:50 Manjaro-PC org_kde_powerdevil[1847]: powerdevil: Suspend session triggered with QMap(("GraceFade", QVariant(bool, true))("SkipFade", QVariant(bool, true))("Type", QVariant(uint, 1)))
May 11 15:14:55 Manjaro-PC org_kde_powerdevil[1847]: powerdevil: Can't contact systemd
May 11 15:14:55 Manjaro-PC org_kde_powerdevil[1847]: powerdevil: Can't contact ck
May 11 15:14:55 Manjaro-PC org_kde_powerdevil[1847]: powerdevil: Suspend session triggered with QMap(("SkipFade", QVariant(bool, true))("Type", QVariant(uint, 1)))
May 11 15:14:55 Manjaro-PC org_kde_powerdevil[1847]: powerdevil: Starting Login1 suspend job
May 11 15:14:55 Manjaro-PC org_kde_powerdevil[1847]: powerdevil: Pausing all media players before sleep
May 11 15:14:55 Manjaro-PC org_kde_powerdevil[3830]: powerdevil: Pausing all media players before sleep
May 11 15:15:08 Manjaro-PC org_kde_powerdevil[1847]: powerdevil: fd passing available: true
May 11 15:15:08 Manjaro-PC org_kde_powerdevil[1847]: powerdevil: failed to inhibit systemd powersave handling
May 11 15:15:09 Manjaro-PC org_kde_powerdevil[3830]: Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
May 11 15:15:09 Manjaro-PC org_kde_powerdevil[3830]: Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
May 11 15:15:09 Manjaro-PC org_kde_powerdevil[3830]: Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
May 11 15:15:11 Manjaro-PC org_kde_powerdevil[3830]: Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
May 11 15:15:11 Manjaro-PC org_kde_powerdevil[3830]: Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by