Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Unable to disable Suspend

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
isaidiknow
Posts: 10
Joined: 2023-01-28 23:17

Unable to disable Suspend

#1 Post by isaidiknow »

Hello,
I can't get the system to stay awake when idle at the login screen.
All the power/sleep settings I can find are disabled.
But still it sleeps in 15 minutes. This is causing a problem with RDP sessions.
I tried Caffeine but no help.

Any ideas?

"Newb" install of Debian 11 with KDE Plasma and Gnome.

Aki
Global Moderator
Global Moderator
Posts: 2816
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 68 times
Been thanked: 382 times

Re: Unable to disable Suspend

#2 Post by Aki »

Hello,

Check "screen locking" section (the screen saver section) in KDE's "System Settings".

Inspect the systemd journal to identify what process suspends the system; you can use the command:

Code: Select all

su -l -c "journalctl -b 0"
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

isaidiknow
Posts: 10
Joined: 2023-01-28 23:17

Re: Unable to disable Suspend

#3 Post by isaidiknow »

Thank you!

I did the screen lock already, but I will check the systemd journal.

Thanks again.

isaidiknow
Posts: 10
Joined: 2023-01-28 23:17

Re: Unable to disable Suspend

#4 Post by isaidiknow »

Removed for formatting violation.
Last edited by isaidiknow on 2023-02-01 23:32, edited 1 time in total.

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: Unable to disable Suspend

#5 Post by sunrat »

Please use CODE tags for terminal text output.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1395
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 78 times
Been thanked: 173 times

Re: Unable to disable Suspend

#6 Post by steve_v »

I'm not sure what debian's systemd defaults are these days (since I don't use that particular clusterfsck myself) but it might be worth a look into the logind manual WRT 'IdleAction' and friends. That'd be my first guess anyway.
You didn't mention which display manager you're using, AFAIK KDE's SDDM doesn't trigger idle suspend itself, but others might, so that could be another place to look.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

isaidiknow
Posts: 10
Joined: 2023-01-28 23:17

Re: Unable to disable Suspend

#7 Post by isaidiknow »

Windows Manager is shown as KWin. Does that sound right?

I also checked the Gnome install and set everything to OFF.

The Desktop list at login also shows
X11
G Classic
and
G Xorg

Are you suggesting that each one should be loaded and checked for Sleep/Suspend settings?

isaidiknow
Posts: 10
Joined: 2023-01-28 23:17

Re: Unable to disable Suspend

#8 Post by isaidiknow »

I found something strange, I think.
It occurred to me last night that running the Journal command from RDP may not have been the right choice. I also wanted to re-run it so I could post it with the Code tags.

So I logged into the machine directly with KDE. Setup the Journal command in the terminal and waited for 15 minutes.
It didn't go to sleep. Not even after 30 minutes.
I'm pretty sure I checked this scenario before I posted here. But, there it is.
Then I opened an RDP session in KDE and sure enough, 15 minutes later the debian machine went to sleep.

Any ideas why an RDP session would put the client to sleep? And keep in mind, I'm actively using the RDP. It's not idle. It just suddenly locks up.

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: Unable to disable Suspend

#9 Post by sunrat »

isaidiknow wrote: 2023-01-31 23:42 Removed for formatting violation.
I wouldn't consider incorrect formatting to be a violation. :mrgreen: It's just recommended protocol to make posts easier to read. You could have edited your post and simply enclosed the relevant text in code tags instead.

Why do you have both Gnome and KDE installed? It's "supposed to work" but may lead to mysterious incompatibilities in practice IMO. I wouldn't do it.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

isaidiknow
Posts: 10
Joined: 2023-01-28 23:17

Re: Unable to disable Suspend

#10 Post by isaidiknow »

The text was useless anyway. :)

As for the multiple desktops, good to know. Thank you.

I installed with just KDE, but I was instantly having problems. Permissions I think, maybe. I don't know.
It occurred to me that if KDE was the problem then I could just try another Desktop. Since I had already used Gnome a little, that's the one I chose.
And it actually seemed to solve the problems. Things that wouldn't work in KDE were working in Gnome. And then!! When I went back to KDE, they were working there too!

This back and forth went on for a bit, then KDE seemed to really settle down. Right now, KDE is working better than any of the desktops I have used.
The only problem is the RDP getting cutoff by the Suspend "feature".

So I guess the next step will be to uninstall all of the other desktops and see if KDE keeps working. Hopefully the system will be able to stay awake too. :)

Any tips for removing my excess desktops?

Aki
Global Moderator
Global Moderator
Posts: 2816
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 68 times
Been thanked: 382 times

Re: Unable to disable Suspend

#11 Post by Aki »

Hello,
isaidiknow wrote: 2023-02-02 05:02 [..] The only problem is the RDP getting cutoff by the Suspend "feature". [..]
What is your "suspend" like ? For example:
1) is it a "suspend to ram" (screen is black, suspend light flashes somewhere on the computer chassis, the computer immediately wakes up pressing a key) ?
2) is it a "suspend to disk" (when computer wakes up pressing a key, the operating system reboots from the disk with grub prompt) ?
3) other ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

trinidad
Posts: 289
Joined: 2016-08-04 14:58
Been thanked: 13 times

Re: Unable to disable Suspend

#12 Post by trinidad »

Code: Select all

# systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Works for me in gnome and should work in KDE.

TC
You can't believe your eyes if your imagination is out of focus.

isaidiknow
Posts: 10
Joined: 2023-01-28 23:17

Re: Unable to disable Suspend

#13 Post by isaidiknow »

It would be #1. Suspend to ram.

Thanks Trinidad, I will give it a try.

Sunrat, I was serious about tips for removing the desktops.
I really don't need them.

isaidiknow
Posts: 10
Joined: 2023-01-28 23:17

Re: Unable to disable Suspend

#14 Post by isaidiknow »

It sure looks like that did the trick Trinidad.

I can't thank you enough!

isaidiknow
Posts: 10
Joined: 2023-01-28 23:17

Re: Unable to disable Suspend

#15 Post by isaidiknow »

Steve_v,
You may have been onto something too. When I installed Gnome I apparently switched to GDM.
I have switched back and will see if that fixes things.

Trinidad,
Would "unmask" undo that line?

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: Unable to disable Suspend

#16 Post by sunrat »

isaidiknow wrote: 2023-02-02 19:51Sunrat, I was serious about tips for removing the desktops.
I really don't need them.
It's possible but can be untidy compared to a fresh install. Uninstall the desktop metapackage and then apt autoremove. autoremove is not 100% reliable in my experience, in such a massive action like this it may also remove packages which should be kept. YMMV

Personally I find KDE to be the most capable and configurable DE, and the best visually with its traditional layout. Been using it since I started with Debian about 17 years ago. Used Xfce for a year or so, it's OK but still had enough traits which annoyed me to discontinue. Never liked Gnome at all.
Would "unmask" undo that line?
Yes
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

isaidiknow
Posts: 10
Joined: 2023-01-28 23:17

Re: Unable to disable Suspend

#17 Post by isaidiknow »

Thanks again Sunrat!

Post Reply