Page 1 of 1

[DONE]Strange problem with shutdown

PostPosted: Jun 13th, '16, 14:48
by mackowiakp
Problem with my Wife computer (URGENT!!). :lol:

When she want to shutdown computer from KDE GUI, it does shutdown computer but logout user from system and login screen appears. What I have to correct situation?

Re: Strange problem with shutdown

PostPosted: Jun 13th, '16, 15:49
by isadora
Maybe have a look at:
KDE System Settings-> Startup and shutdown-> Session Management-> Offer shutdown options

Re: Strange problem with shutdown

PostPosted: Jun 14th, '16, 06:32
by mackowiakp
I have several M5 based PC and all of them has KDE configured the way You show in Your post. Including that one with "strange" shutdown problem.
I have to mention once more. The problem is that I click on "Zakończ" (that is "End session") in M5 main panel and than "Shutdown". But the PC logout user (to user login screen) instead shutdown system.

Re: Strange problem with shutdown

PostPosted: Jun 14th, '16, 21:51
by claire
Sometimes see this symptom when pre-release testing new releases. It's normally an issue with polkit.

$ ps -e | grep polkit
1072 ? 00:00:00 polkitd
3395 ? 00:00:00 polkit-kde-auth

Re: Strange problem with shutdown

PostPosted: Jun 15th, '16, 05:19
by mackowiakp
OK. But I have several M5 based PC. Apart from the fact that different hardware, installation everywhere M5 is identical. And this is strange. Because all four PC behave properly. With the exception of one.

Re: Strange problem with shutdown

PostPosted: Jun 15th, '16, 17:49
by doktor5000
So what? Others maintain several dozen similar installations, and only one machine misbehaves in unexpected ways.

At the very least provide the output of the following commands, run as your regular user in a terminal:
Code: Select all
loginctl show-session $XDG_SESSION_ID
ps -ef|grep -v grep|grep -iE "polkit|policykit"
pkexec whoami     # you need to enter your root password when asked by the authentication dialog
echo $DISPLAY

and as root from:
Code: Select all
systemctl status polkit.service -a

Re: Strange problem with shutdown

PostPosted: Jun 15th, '16, 18:03
by mackowiakp
doktor5000 wrote:So what? Others maintain several dozen similar installations, and only one machine misbehaves in unexpected ways.


Yes, exactly.

Below outputs:

Code: Select all
[gosia@gosia ~]$ loginctl show-session $XDG_SESSION_ID
Id=c1
Name=gosia
Timestamp=śro 2016-06-15 16:07:01 CEST
TimestampMonotonic=35908189
VTNr=1
Display=:0
Remote=no
Service=kdm-np
Scope=session-c1.scope
Leader=1499
Audit=0
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
[gosia@gosia ~]$ ps -ef|grep -v grep|grep -iE "polkit|policykit"
polkitd   1334     1  0 16:06 ?        00:00:00 /usr/lib/polkit-1/polkitd --no-debug
gosia     2505     1  0 16:07 ?        00:00:00 /usr/lib64/kde4/libexec/polkit-kde-authentication-agent-1
[gosia@gosia ~]$ pkexec whoami
root
[gosia@gosia ~]$ echo $DISPLAY
:0
[gosia@gosia ~]$


and

Code: Select all
[gosia@gosia ~]$ systemctl status polkit.service -a
● polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
   Active: active (running) since śro 2016-06-15 16:07:00 CEST; 1h 53min ago
     Docs: man:polkit(8)
 Main PID: 1334 (polkitd)
   CGroup: /system.slice/polkit.service
           └─1334 /usr/lib/polkit-1/polkitd --no-debug
[gosia@gosia ~]$

Re: Strange problem with shutdown

PostPosted: Jun 15th, '16, 18:18
by doktor5000
Seems alright regarding polkit, system daemon is running. your logind session is considered active and a polkit agent is running for your user.

What happens if you run the following command as your regular user?
Code: Select all
qdbus org.kde.ksmserver /KSMServer logout 0 0 0

Re: Strange problem with shutdown

PostPosted: Jun 15th, '16, 18:37
by mackowiakp
It logouts user and login screen appears.

Re: Strange problem with shutdown

PostPosted: Jun 15th, '16, 23:59
by doktor5000
Well, that is the command that is run for the log off command, so it's working in general, you could create a desktop shortcut for that command as mitigation, that way you'd also have to click less ;)

Does your wife maybe use the quick user switch, or is there only one user using that box? Does the problem persist under a newly created user?

Re: Strange problem with shutdown

PostPosted: Jun 16th, '16, 00:51
by mackowiakp
Well. M5 is not housewife proof ;-)
So, I created of course shortcut for quick computer shutdown. My wife is the only user of that laptop, but I will create another user to test it.

Re: [DONE]Strange problem with shutdown

PostPosted: Jun 17th, '16, 13:13
by mackowiakp
Yep. Workaround that is "STOP" icon on screen and shutdown script associated with the icon, resolved problem. In my wife meaning of course. Nothink more to be happy ;-)