Shutdown over GUI only drops to TTY

Hey all,

since a few weeks a weird permissions issue turned up in my tumbleweed installation.
When I want to shutdown or reboot my machine through the kickoff launcher, the system only drops to tty. When I shutdown or reboot via a terminal, everything is working normaly.

Also, around every 10th boot, PolKit asks for a sudo password to check the S.M.A.R.T. values for all my drives each. Don’t know if that is related but the issues started around the same time.

I’m running Tumbleweed with Plasma on Wayland, if that helps.

Do you have an idea how I could debug this? Thanks in advance!

Same problems here, but with Plasma with X11.

SMART:

Every time I log in Polkit asks for root password to read SMART report for storage device /dev/sdb (some days it asked for /dev/sda too)

  • Action: Read SMRT Report Details
  • Vendor Plasma SMART (it has a link that takes you to www.kde.org)
  • polkit.subject.pid: Some number corresponding to /usr/bin/kded5
  • polkit.caller-pid: Some number corresponding to /usr/libexec/kauth/kded-smart-helper

If I type the root password, in KInfoCenter → Devices → SMART I see /dev/sda details. After today upgrade I see /dev/sdb details too (“device working as expected”)

Searching on Internet the only “usable” information I found talks about /etc/polkit-1/rules.d/90-default-privs.rules, where I find the lines


...
               'org.kde.kded.smart.smartctl': 
                       [ 'no', 'no', 'auth_admin' ], 

...

but no idea about what are the right vakues and if it has something to do with this problem.

Reboot/Shutdown problems:

I also have problem with reboot/shutdown. The screen goes black with the mouse pointer on it (responsive). I have to kill session with Ctrl + Alt + ← (twice) so I get the login screen and I can reboot/shutdown with no problem.

Lately I choose Close sesion, which leads me to Log In screen and I can reboot/shutdown from there.

Hope this help us to find the possible “culprit”. :wink:

Read man 5 polkit-default-privs how to change this file and what values are possible. I suppose you want yes for ACTIVE-CONSOLE (the third field).

1 Like

Thanks a lot arvidjaar!

With your suggestions both problems are solved just with one action:

I ran man 5 polkit-default-privs , as suggested, and it says:

...
The AUTHORIZATION column consists of colon separated fields of the form ANY-USER:INACTIVE-CONSOLE:ACTIVE-CONSOLE. Each of the fields can have one of the values auth_admin, auth_admin_keep, auth_self, auth_self_keep, no and yes. For the meaning of these values see polkit(8).
...

So I ran man 8 polkit:


auth_self
Authentication by the owner of the session that the client originates from is required. Note that this is not restrictive enough for most uses on multi-user systems; auth_admin* is generally recommended.

I edited /etc/polkit-1/rules.d/90-default-privs.rules changing the last parameter (left the original line commented, just in case):


...
   'org.kde.kded.smart.smartctl':
   #   [ 'no', 'no', 'auth_admin' ],
          [ 'no', 'no', 'auth_self' ],
...

Now I can restart or shutdown the machine without any problem, don’t get annoyed by SMART asking for root password and can access to SMART information in KInfoCenter.

There are, nonetheless, three things that bother me:

  1. Can’t think of any relationship between SMART and Plasma problems to restart/shutdown the PC.
  2. Although man polkitd recommends using auth_admin, only when using auth_self for ACTIVE_CONSOLE (third parameter) the problems dissapeared.
  3. Don’t know the possible security implications of this modification, given the previous recommendation.

:thinking:

I also ran journalctl -f before/during login and didn’t see any errors.

This file is auto generated and may be overwritten on updates. It is not supposed to be edited directly as the comment in this file makes quite clear.

1 Like

You’re right, arvidjaar!

I forgot the warning you mention, which is at the beginning of the file :person_facepalming:, and I saw the first time I opened it with vi. I found later the “*.smartctl” line and I closed the file there.

When I opened next day the file with vi the file was opened at the line I mentioned and I had forgotten the warning.

Searching for information about Polkit and how to add custom rules I found this page, which seems interesting, and I then remembered I had modified in YaST → Security Center → use safe file permissions from easy to secure some time ago.

With secure setting I had PERMISSION_SECURITY="secure local" in /etc/sysconfig/security. Turned back to easy in YaST → Security Center → use safe file permissions and now I have PERMISSION_SECURITY="easy local" in /etc/sysconfig/security (without editing it) and in /etc/polkit-1/rules.d/90-default-privs.rules both the commented line and my setup dissapeared and now I have:

...
   'org.kde.kded.smart.smartctl': 
      [ 'no', 'auth_admin', 'yes' ],
...

And that’s the same configuration I have in my laptop (checked it this morning). Both SMART and Restart/Shutdown from an active Plasma session work well in both computers.

Thanks a lot for your help! Any further advice will be appreciated.

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