Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#32371 - [kdebase-workspace] shutdown and reboot don't work unless KDE is started by KDM

Attached to Project: Arch Linux
Opened by Aurora (LadyAurora) - Thursday, 01 November 2012, 18:34 GMT
Last edited by Andrea Scarpino (BaSh) - Friday, 16 August 2013, 10:37 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Andrea Scarpino (BaSh)
Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 11
Private No


Unless KDE is started by KDM, there are no shutdown and reboot options in the menu. Trying to shutdown and reboot from KRunner results in a logout.

The sleep and hibernate options *are* there and work; I can shutdown and reboot from terminal emulator without root; and things like mounting disks work, so this is *not* about a broken session.
The exact line that I use to start KDE is:
[[ "$TTY" == '/dev/tty1' ]] && xinit /usr/bin/startkde -- vt1 -nolisten tcp &> /dev/null && logout

The result is the same if KDE is started by e.g. GDM. Or really anything else except KDM.

Steps to reproduce:
* install kdebase-workspace (4.9.2-6 is known to fail)
* start KDE through something different than KDM
* notice the lack of shutdown and reboot options in Plasma menu
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Friday, 16 August 2013, 10:37 GMT
Reason for closing:  Fixed
Additional comments about closing:  kdebase-workspace 4.11.0-1
Comment by Aurora (LadyAurora) - Thursday, 01 November 2012, 18:35 GMT
(it's a dupe of  FS#32096 , but hopefully now I explained the issue more clearly and also made it clear that it's not a configuration issue relating to broken sessions)
Comment by Javier Viñal (fjvinal) - Thursday, 01 November 2012, 21:14 GMT
I can confirm this with lightdm.
Comment by Andrea Scarpino (BaSh) - Thursday, 01 November 2012, 21:28 GMT
This should be fixed with xorg-xinit 1.3.2-3
Comment by phanisvara das (phani00) - Thursday, 01 November 2012, 22:46 GMT
i am using xorg-xinit 1.3.2-3, but shutdown and reboot still aren't available. (using SLIM login manager)
Comment by Andrea Scarpino (BaSh) - Friday, 02 November 2012, 08:49 GMT
If you use xorg-xinit this means that you start your graphical session using startx, not using a login manager.

please test xorg-xinit 1.3.2-3
Comment by phanisvara das (phani00) - Friday, 02 November 2012, 16:24 GMT
even when i start kde via startx (startx /usr/bin/startkde), i don't get shutdown/reboot options. and yes, my session is active and not remote.
Comment by Aurora (LadyAurora) - Saturday, 03 November 2012, 18:34 GMT
@Andrea: fails with xorg-xinit 1.3.2-3.

Anyway, is it really related to xorg-xinit? After all, login managers typically don't use it, and the bug occurs when using one, too (unless the one is KDM).
Comment by phanisvara das (phani00) - Saturday, 08 December 2012, 17:26 GMT
have been using kdm for the time being, but when i tried slim just now it's still the same: no shutdown / reboot options available.
Comment by Andrea Scarpino (BaSh) - Saturday, 08 December 2012, 17:31 GMT
AFAIK slim doesn't support logind yet.
Comment by phanisvara das (phani00) - Saturday, 08 December 2012, 17:39 GMT
hm...started with SLIM right now, and get this:

[phani@laptop ~]$ loginctl show-session $XDG_SESSION_ID
Timestamp=Sat, 2012-12-08 23:07:44 IST
Comment by phanisvara das (phani00) - Saturday, 08 December 2012, 17:49 GMT
i don't think it makes a difference, but to make sure i started via startx now, no login manager active, and it's still the same: no shutdon/reboot.
Comment by Den (deniolp) - Thursday, 27 December 2012, 15:12 GMT
The same issue. (I start x via startx and ~/.xinitrc). New version 4.9.4-2 didn't solve it yet.
Comment by André Vitor Matos (andre.vmatos) - Monday, 04 February 2013, 22:03 GMT
4.9.5-2 and not working yet. Someone knows if 4.10 implemented loginctl shutdown/reboot?
Comment by phanisvara das (phani00) - Tuesday, 05 February 2013, 11:46 GMT
no, still the same with KDE 4.9.98: only logout offered in the shutdown dialog. (started via startx / startkde).
Comment by André Vitor Matos (andre.vmatos) - Saturday, 16 February 2013, 18:52 GMT
I think this is relative to this bug:
Someone can ask them to reopen?
Comment by Stefano Avallone (stavallo) - Wednesday, 03 April 2013, 17:12 GMT
The upstream bug report mentioned by Andrè refers to a review request that has been committed to kde-workspace master after branching KDE 4.10 (Jan 24, 2013). So, the fix will land in KDE 4.11.

I happened to build kde-workspace from master a few days ago and I can confirm that turn off and reboot options are available again (I am using lightdm).

In case Andrea wants to pick the fix for the next build of kde-workspace (4.10.2), the resolving commit can be found at:

(did not test this single commit on top of kde-workspace 4.10.2, though)
Comment by André Vitor Matos (andre.vmatos) - Wednesday, 03 April 2013, 21:58 GMT
+1 to the possibility of fixing that in 4.10.2. That bug is really annoying me.
Comment by Andreas Radke (AndyRTR) - Saturday, 06 April 2013, 06:23 GMT
abs is your friend ;)
Comment by Stefano Avallone (stavallo) - Saturday, 06 April 2013, 14:27 GMT
I cherry-picked the commit mentioned above and applied on top of kde-workspace 4.10.2. Unfortunately, kded (or something else, I don't recall) crashes at startup, leaving a black screen as desktop background and no panels. Downgrading to plain kde-workspace 4.10.2 fixes this issue. So, I guess backporting the fix to KDE 4.10 is not trivial and we need to wait for KDE 4.11.
Comment by Sven-Hendrik Haase (Svenstaro) - Monday, 15 April 2013, 02:07 GMT
If you guys want this fix before August, I suggest you make upstream backport it to 4.10.3 in time for the next patch release.
Comment by Stefano Avallone (stavallo) - Monday, 15 April 2013, 15:27 GMT
The commit I mentioned above was affected by a typo, which has been fixed (in master) by:

I built kdebase-workspace 4.10.2 with the above two commits and the issue is fixed (I can shutdown and reboot from krunner or kde application launcher).

I doubt that kde devs will apply these patches to 4.10, as we are quite late in the 4.10 cycle.

I can post the patch and the PKGBUILD I used, if anyone is interested.
Comment by André Vitor Matos (andre.vmatos) - Monday, 15 April 2013, 17:11 GMT
I would appreciate if you could post your patch and/or PKGBUILD =]
Comment by Stefano Avallone (stavallo) - Monday, 15 April 2013, 18:32 GMT
Here they are :-)

Of course, you need all the other patches used by Arch (copy the kdebase-workspace directory from abs)
Comment by André Vitor Matos (andre.vmatos) - Monday, 15 April 2013, 19:04 GMT
Yeah, working here like a charm. Thanks very much. Devs, would be great, in a system ruled by systemd, that this patch could be applied to 4.10.
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 14 May 2013, 00:06 GMT
This patch is larger than what I'd be willing to maintain.
Comment by Andrea Scarpino (BaSh) - Thursday, 13 June 2013, 07:51 GMT
See also

However 4.11 beta1 packages will be in [kde-unstable] next week.
Comment by Stefano Avallone (stavallo) - Thursday, 13 June 2013, 08:16 GMT
Looks like review request 110089 has been discarded because the two commits mentioned in the above comments fix this issue.

Looking forward to testing kde 4.11 beta1 next week. Andrea, huge thanks as usual!
Comment by Andrea Scarpino (BaSh) - Thursday, 13 June 2013, 08:57 GMT
I was wrong, 4.11 beta1 has been tagged and release date is ASAP :-)
Comment by Andrea Scarpino (BaSh) - Saturday, 15 June 2013, 07:29 GMT
Confirmed as fixed in kdebase-workspace >=4.10.80
Comment by Arthur Țițeică (roentgen) - Saturday, 15 June 2013, 07:45 GMT
It's working for me too with sddm.