You are not logged in.

#1 2025-09-06 12:23:56

AndrewG777
Member
Registered: 2025-09-02
Posts: 30

[SOLVED] Prevent system from suspending during playing music

Hi!
I use kde plasma and deadbeef and can't prevent system from falling asleep during playing music.
I can disable spleeping by manually turning battery applet. But can I make this automatic?

fastfetch:

OS: Arch Linux x86_64
Kernel: Linux 6.16.4-arch1-1
Uptime: 17 mins
Packages: 1508 (pacman)
Shell: bash 5.3.3
Display (VSC402A): 1920x1080 @ 60 Hz in 23" [External]
Display (GSM5AB7): 1920x1080 @ 60 Hz in 22" [External] *
DE: KDE Plasma 6.4.4
WM: KWin (Wayland)
WM Theme: Breeze
Theme: Breeze (Light) [Qt], Breeze [GTK2/3]
Icons: breeze [Qt], breeze [GTK2/3/4]
Font: Noto Sans (10pt) [Qt], Noto Sans (10pt) [GTK2/3/4]
Cursor: breeze (24px)
Terminal: konsole 25.8.0
CPU: 13th Gen Intel(R) Core(TM) i5-13400 (16) @ 4.60 GHz
GPU 1: NVIDIA GeForce RTX 4060 [Discrete]
GPU 2: Intel UHD Graphics 730 @ 1.55 GHz [Integrated]
Memory: 3.55 GiB / 31.09 GiB (11%)
Swap: 0 B / 32.00 GiB (0%)
Disk (/): 577.64 GiB / 847.15 GiB (68%) - ext4
Disk (/run/media/andrew/Data): 2.35 TiB / 2.73 TiB (86%) - ntfs3
Local IP (enp6s0): 192.168.1.110/24
Locale: en_US.UTF-8

Last edited by AndrewG777 (2025-09-13 03:17:29)

Offline

#2 2025-09-06 12:26:46

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] Prevent system from suspending during playing music

You could launch deadbeef using a script wrapping it around systemd-inhibit(1). Copy the .desktop file from /usr/share/applications/ to ~/.local/share/applications and modify the Exec line(s) to launch the wrapper from a menu.


Jin, Jîyan, Azadî

Offline

#3 2025-09-06 12:43:24

AndrewG777
Member
Registered: 2025-09-02
Posts: 30

Re: [SOLVED] Prevent system from suspending during playing music

This is helpful. Thanks!
---------------------
But the screens do not go dark. Can I change it?

Last edited by AndrewG777 (2025-09-08 14:48:39)

Offline

#4 2025-09-10 00:30:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,146

Re: [SOLVED] Prevent system from suspending during playing music

pass

--what=sleep:shutdown

to the inhibit command

Last edited by V1del (2025-09-10 00:31:04)

Online

#5 2025-09-13 03:17:57

AndrewG777
Member
Registered: 2025-09-02
Posts: 30

Re: [SOLVED] Prevent system from suspending during playing music

Thanks!

Offline

Board footer

Powered by FluxBB