LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-28-2023, 10:47 AM   #1
George528
Member
 
Registered: May 2021
Location: Moldova
Distribution: Arch, Debian
Posts: 95

Rep: Reputation: 2
After auto-suspend this pop-up shows up and I don't know how to fix it


Whenever my laptop suspends, this shows up.

https://i.imgur.com/oWeZSHH.png
https://i.imgur.com/8r8dm58.png

I get its because of no privilege, when I type `systemctl suspend` in terminal I get the same notification. It needs sudo. How do I give it permission system-wide in graphical environment? (KDE Plasma 5, Arch)
 
Old 12-29-2023, 06:41 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,660
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Hi, If you have sudo setup for (ALL), then use the "user" password

If sudo is not setup completely you may have to use the root admin password.

I only need sudo for one thing so as soon as it is setup I remove sudo from my system.

nano /etc/sudoers
Code:
# User privilege specification
root    ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "@include" directives:

@includedir /etc/sudoers.d
I don't remember doing anything from a kde app. But, mine has this.
nano /etc/sudoers.d/kdesu-sudoers
Code:
# Workaround for KDE bug https://bugs.kde.org/452532
# To be installed with permissions root:root 440 in /etc/sudoeors.d/

Defaults!/usr/lib/*/libexec/kf5/kdesu_stub !use_pty
be sure to reset permissions for the file(s).


I hope this helps.
 
Old 12-29-2023, 08:38 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,366
Blog Entries: 28

Rep: Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162
This is a shot in the dark, but I found your question intriguing.

I'm going out on a limb here and guess that, as you say this happens on "auto-suspend," auto-suspend may not be properly set up. Therefore, when the system resumes, it is asking for the password that it expected to have been issued at time of suspend.

Does that make sense?

I did a web search for "systemd auto-suspend password" and turned up this article that may be relevant.
 
Old 12-30-2023, 06:57 AM   #4
George528
Member
 
Registered: May 2021
Location: Moldova
Distribution: Arch, Debian
Posts: 95

Original Poster
Rep: Reputation: 2
All these solutions seem great but I didn't check them, instead I found a different solution by asking some guys on the IRC:

I added '49-nopasswd_global.rules' file in 'rules.d': `/etc/polkit-1/rules.d/49-nopasswd_global.rules` containing this:

Code:
/* Allow members of the wheel group to execute any actions
 * without password authentication, similar to "sudo NOPASSWD:"
 */
polkit.addRule(function(action, subject) {
    if (subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }
});
after that I added myself to group wheel
 
  


Reply

Tags
arch, freedesktop, kde, plasma, systemd



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
[SOLVED] cannot auto-suspend/suspend/shutdown unless exit to root after upgrade to polkit-122 xfce, sw current, 6.1.9 Brian997 Slackware 4 02-04-2023 07:30 PM
Need permanent fix for suspend. Suspend doesn't work in Ubuntu 18.04 larrymeditates Linux - Newbie 10 09-15-2020 02:30 PM
First time and New full installation of POP Linux from an iso file. After installation and first updates an error with a password shows up JoseFreire Linux - Newbie 2 12-16-2019 06:42 AM
What I know, looking for what I don't know I don't know Dontpanic Linux - Newbie 18 07-23-2019 07:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:41 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