LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-17-2020, 03:54 AM   #1
linuxUser247
Member
 
Registered: Jan 2019
Posts: 77

Rep: Reputation: Disabled
how to disable suspension in Ubuntu 20.04?


How can i disable suspension in Ubuntu 20? I think i solved my problem but i wanted someone to look over it.

I applied the following solution:

Code:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

based on https://askubuntu.com/a/1043652/881300

and this is perfectly working. I now am no longer able to select these options in the power off menu from the desktop.


Is this only disabled for the user or also for the system? I don't have `pm-hibernate` installed.

I tried to apply this solution to additionally disable automatic suspension. But the path to the file does not exist, i think it changed from

`/etc/polkit-1/localauthority/50-local.d/com.ubuntu.disable-suspend.pkla` to
`/etc/polkit-1/localauthority.conf.d/50-localauthority.conf`

but the file contents are very different.

I found this but power settings are no longer available.
 
Old 11-18-2020, 12:31 AM   #2
Pentium4User
Member
 
Registered: Jan 2018
Posts: 37

Rep: Reputation: Disabled
As I know, this will disable the functionality.
Try
Code:
systemctl suspend
This should result in an error.
 
1 members found this post helpful.
Old 11-18-2020, 06:54 AM   #3
linuxUser247
Member
 
Registered: Jan 2019
Posts: 77

Original Poster
Rep: Reputation: Disabled
Thumbs up

I just tried that and it works:

Quote:
systemctl suspend
Code:
Failed to suspend system via logind: Access denied
Failed to start suspend.target: Unit suspend.target is masked.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't disable suspension lucasce Linux - General 5 07-01-2020 02:37 AM
Resuming from suspension fails- lenovo s10-3 TimmyTurner Linux - Laptop and Netbook 3 06-07-2011 01:00 AM
avoiding system suspension during mplayer playback danix85 Slackware 2 04-25-2010 03:29 PM
Suspension to ram only works for short periods cyberfishee Linux - Hardware 2 08-14-2008 08:35 AM
Monitor suspension g4j31a5 Linux - General 5 01-12-2007 01:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 03:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration