KDE 4.10 doesn't logout reboot or shutdown [is a bug] Topic is solved

Need help with your Linux distro? All questions are good - not all answers are -but we try

Moderator: jkerr82508

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

KDE 4.10 doesn't logout reboot or shutdown [is a bug]

Postby dedanna1029 » 31 May 2013, 00:30

Has anyone seen anything about KDE 4.10.2 not shutting down, rebooting, or locking screen when clicked to? I'm curious - none of the logout, reboot, or lock screen links are working, from widgets, or from the applications menu (kicker) for me. They did at first, but no longer do now.

Any clue what could have done this? I'm having to do a killall X, then reboot from there from tty... Thanks.
Last edited by dedanna1029 on 03 Jun 2013, 06:03, edited 2 times in total.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: KDE 4.10.2 doesn't logout, reboot, or shutdown?

Postby viking60 » 31 May 2013, 07:43

You should be able to use (as root)

Code: Select all

systemctl poweroff
and

Code: Select all

systemctl reboot
and

Code: Select all

systemctl restart slim

replace slim with your display manager (kdm, gdm or whatever).
and

Code: Select all

systemctl suspend
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: KDE 4.10.2 doesn't logout, reboot, or shutdown?

Postby dedanna1029 » 01 Jun 2013, 01:42

OK, yeah, I think I will try slim, but I'm wondering if you might know what's causing this? It's very strange. When it finally does go to reboot or shutdown from the widget or menu, it causes a panic??? The errors are unbelievable, and I'd be typing for a week what they all say... I guess I could catch the last line or two? Could KDM be causing this? It's really strange!

Will get slim going, and see if that works, and report back. So far, Gnome *appears* to be logging out, rebooting, and shutting down?

Thanks!
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: KDE 4.10.2 doesn't logout, reboot, or shutdown?

Postby viking60 » 01 Jun 2013, 13:17

I do not think that Slim will do it better - kdm "should" be the best login manager for KDE. It could be a dbus thing or maybe the cash.
This problem has occured from time to time with KDE some have had luck with simply removing cash files.

You are not the only one, so maybe this can help:
http://forum.kde.org/viewtopic.php?f=67&t=110304

It looks like it could be a problem with ksmserver (component in KDE that should regulate those things).
https://bugs.kde.org/show_bug.cgi?id=310486

It could be that the ksmserver still loads the 4.9 components after an upgrade to 4.10

If that is the case a switch to another login manager might actually help. :think: So Slim could fix it :pray:
.....
Remember to enable and start the slim servie in systemd after you have installed it.

Code: Select all

sudo systemctl enable slim.service

Code: Select all

sudo systemctl start slim
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: KDE 4.10.2 doesn't logout, reboot, or shutdown?

Postby viking60 » 02 Jun 2013, 13:22

I just figured out a new way to log out;

Code: Select all

sudo systemctl restart kdm

You can try it in ALT+F2 first.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: KDE 4.10.2 doesn't logout, reboot, or shutdown?

Postby dedanna1029 » 03 Jun 2013, 05:08

So far, it's OK with slim (kinda), but I hadn't seen your advice on it until now. I do have several questions for slim.conf. The commands you gave above, the systemctl ones, poweroff, reboot, etc., should I replace the section in slim with them? In this one:

Code: Select all

# Commands for halt, login, etc.
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xvt -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
suspend_cmd        /usr/sbin/suspend

Should I replace with:

Code: Select all

halt_cmd systemctl poweroff
reboot_cmd systemctl reboot
console_cmd (I think I'll leave that one alone? lol)
suspend_cmd systemctl suspend


And what is the systemctl restart slim for exactly? To log out?

Oh, and do I need to do anything with the login_cmd line now with all the systemctl stuff? This part in /etc/slim.conf:

Code: Select all

# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd           exec /bin/sh - ~/.xinitrc %session
login_cmd           exec /bin/bash -login /etc/X11/Xsession %session


I ended up not upgrading - the urpmi upgrade test from MGA2 to 3 didn't take, it borked on me, so I ended up formatting / and installing with the 3 dvd. I wonder if that makes a diff on the bugs (I do still need to read those, and will)?

I still have tests to do on slim, but think it will be OK. I'll do those and report back. I also need to enable and start the slim service in systemd, didn't know that one. That may fix the "OK with slim (kinda)" part of all this.

Thanks so much, this is a rather emergent situation. I had just switched to slim, btw, in MGA 2 before I upgraded to 3, so probably would've switched to it in 3 at some point anyway. I just plain like it better, and have four themes I love with it, so let them rotate. It worked really well in MGA 2. :)

Edit: The first bug you listed there does appear to be it, as I can lock screen, suspend, or whatever else, other than logging out or rebooting. The only difference is that the filer of that bug states that it happens randomly for him; it happens all the time for me, whether on battery or not, whether anything, it always happens.
The second bug does not appear to be it; the description doesn't match what I'm seeing. MGA3 is on KDE4.10.2 also, and that bug (even though it talks about KDE4.10 futuristically) was in an earlier version of KDE (although I do wonder if retracting the commit just made things worse; we'll see).

Edit 2: Well, well, well... it seems that switching to slim has fixored this! The issue's somewhere with KDM/ksmserver. It seems KDE is having some growing pains with 4.10 - there's other upstream bugs I've been working on, too..

Thanks so much for your help. At some point someday I guess I really must read up on systemd/systemctl... Ugh. I really don't get it, and you do, so that's a good thing that you do for me. Right now, as you know, there's very little time for anything. *sigh

I'm marking this solved, that it is a bug. Nice workaround for it, too. :) lol.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: KDE 4.10.2 doesn't logout, reboot, or shutdown?

Postby viking60 » 03 Jun 2013, 09:29

dedanna1029 wrote:So far, it's OK with slim (kinda), but I hadn't seen your advice on it until now. I do have several questions for slim.conf. The commands you gave above, the systemctl ones, poweroff, reboot, etc., should I replace the section in slim with them? In this one:

Code: Select all

# Commands for halt, login, etc.
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xvt -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
suspend_cmd        /usr/sbin/suspend

Should I replace with:

Code: Select all

halt_cmd systemctl poweroff
reboot_cmd systemctl reboot
console_cmd (I think I'll leave that one alone? lol)
suspend_cmd systemctl suspend

No those commands work from the username prompt on the login screen. If you write "halt" there the system will shut down directly from there etc

dedanna1029 wrote:And what is the systemctl restart slim for exactly? To log out?

Well it will restart slim so it has pretty much the same effect as CTRL+ALT+BACKSPACE since slim controls X too. It is kind of a brutal way of logging out.
It is not a dedicated loggout routine. You should stick to the "normal" stuff if it works.

dedanna1029 wrote:Oh, and do I need to do anything with the login_cmd line now with all the systemctl stuff? This part in /etc/slim.conf:

Code: Select all

# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd           exec /bin/sh - ~/.xinitrc %session
login_cmd           exec /bin/bash -login /etc/X11/Xsession %session


No you do not have to do anything with that. You could autolog yourself in so you do not have to log in everytime - but that is not the place. If you do, slim will autolog you right back in so the "log-out routine" above would not work.

dedanna1029 wrote:I still have tests to do on slim, but think it will be OK. I'll do those and report back. I also need to enable and start the slim service in systemd, didn't know that one. That may fix the "OK with slim (kinda)" part of all this.

Yes systemd changes how slim is started as a service.

Glad it worked out for you :greetings And it really is interesting that Slim fixes the problems/bugs you have with Kdm.

As you know I am using Arch and that has given me the opportunity to get confused on a somewhat higher level, regarding systemd. I really hated to leave the good old rc.conf but I do see huge advantages with systemd.

The most important one is that it works the same on all distros so the long coveted standardisation of Linux is getting closer everyday. Well except for Ubuntu but they don't count. :mrgreen: (Canonical's contribution to the Linux kernel is less than Microsoft's ). And they will probably follow once all the others have tested systemd and ironed out all bugs.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: [solved is a bug] KDE 4.10 doesn't logout reboot or shut

Postby dedanna1029 » 04 Jun 2013, 04:34

Aye. Well, you understand it better than I do (obviously). I don't even know what it's for, or anything, other than what the name implies, some kind of system control. I wonder though, can't I have that control back? If I'm making sense? I'm so used to having control over every last aspect of my system myself... eh, well, that's a long-standing debate in some circles, and I'm not up to going there now.

For now, things do work, and so that means that I can function properly for now, even if not curing the issue directly, I've found something that does work, with your help.

Thanks so much for answering the questions, and someday, yeah, I'll get down to systemd/systemctl, but unfortunately that can't be right now. Mom keeps me pretty busy, too busy to worry about computers much or be able to be on them. All I have is about an hour in the evening, unfortunately, and I'm lucky at that. I'm just glad she's healing nicely (albeit slowly), or I wouldn't even have that (and some evenings I don't as it is).

TTYS.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: KDE 4.10 doesn't logout reboot or shutdown

Postby dedanna1029 » 06 Jun 2013, 19:02

It appears I spoke too soon. I do have a glitch with slim, and don't know where it's coming from. When I click to reboot or shut down, via widget or menu, what it does is just log out. What do I need to do with this? I'm wondering if there is any lingering ksmserver/kdm stuff going on?

slim.conf:

Code: Select all

.:[ dedanna@dedanna.rockz.net : 11:35:12 : ~/.kde4/Autostart ]:.
:) su -
Password:
[root@dedanna ~]# cat /etc/slim.conf
# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path        /bin:/usr/bin:/usr/local/bin:/usr/sbin
default_xserver     /usr/bin/X
#xserver_arguments   -dpi 75

# Commands for halt, login, etc.
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xvt -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
suspend_cmd        /usr/sbin/suspend

# Full path to the xauth binary
xauth_path         /usr/bin/xauth

# Xauth file for server
authfile           /var/run/slim.auth

# Activate numlock when slim starts. Valid values: on|off
# numlock             on

# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor          false

# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd           exec /bin/sh - ~/.xinitrc %session
login_cmd           exec /bin/bash -login /etc/X11/Xsession %session

# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd   some command
# sessionstop_cmd   some command

# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
daemon   no

# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions            KDE4,GnomeClassic,GNOME,Openbox,xfce4,IceWM,WindowMaker,LXDE,drak3d

# Executed when pressing F11 (requires imagemagick)
screenshot_cmd      import -window root /slim.png

# welcome message. Available variables: %host, %domain
welcome_msg         Welcome to Ded's Netbook

# Session message. Prepended to the session name when pressing F1
# session_msg         Session:

# shutdown / reboot messages
shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...

# default user, leave blank or remove this line
# for avoid pre-loading the username.
default_user        dedanna

# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
#focus_password      no

# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
auto_login          no


# current theme, use comma separated list to specify a set to
# randomly choose from
current_theme       default,mageia,mindlock,scotland-road

# Lock file
lockfile            /var/run/slim.lock

# Log file
logfile             /var/log/slim.log

[root@dedanna ~]#


Anything wrong that anyone can see there?

Thanks.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: [solved is a bug] KDE 4.10 doesn't logout reboot or shut

Postby viking60 » 07 Jun 2013, 11:50

No I think you have to use sudo poweroff etc to get out fast. That is normally the price - you only get logged out to slim where you can poweroff. You write halt in the userid field according to your config.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: [solved is a bug] KDE 4.10 doesn't logout reboot or shut

Postby dedanna1029 » 12 Jun 2013, 05:51

Ugh. Slim didn't do that way in Arch, when I was running it. We told it reboot, it would reboot. We told it shut down, it shut down. And etc.

Very strange.

Thanks.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: [solved is a bug] KDE 4.10 doesn't logout reboot or shut

Postby viking60 » 12 Jun 2013, 10:40

Yes that is true.
But the DE's are implemented in Mageia by the devs - in Arch you pretty much install the vanilla KDE etc and you are correct: I did turn of from within KDE there too - so it did work.

But I think this is an upstream issue and did change with systemd. So as long as kde works with kdm I guess they do not feel responsible for Slim.

You could make a launcher that shuts down the box brutally with sudo systemctl reboot or systemctl poweroff. or simply sudo poweroff.

For that to work you can check that you have an active session.

This will give you a session list wit session numbers:

Code: Select all

[viking@thomas-pc ~]$ loginctl
   SESSION        UID USER             SEAT           
         3       1001 viking           seat0           
         4       1001 viking           seat0


Then you check the session number you want (It could be only one - just use the number)

Code: Select all

[viking@thomas-pc ~]$ loginctl show-session 4
Id=4
Timestamp=on. 2013-06-12 14:43:53 CEST
TimestampMonotonic=2845441051
DefaultControlGroup=systemd:/user/1001.user/4.session
VTNr=7
TTY=tty7
Display=:0
Remote=no
Service=lxdm
Leader=19510
Audit=4
Type=x11
Class=user
Active=yes <<--------------This needs to be "yes"
State=active
KillProcesses=no
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
Name=viking
[viking@thomas-pc ~]$



But if you can poweroff from your terminal it all is active and works.

KDE behaves the same with LXDM - you can only log out and shut down from there.
The shutdown button in Openbox on my docky works just fine. So it looks like Gnome (gdm) and KDE (kdm) are the "sinners".

If I add docky to KDE it shuts down and restarts directly from that "shutdown" button.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"


Return to “Help”