Bug 293978

Summary: System doesn't shutdown/reboot anymore after systemd upgrade
Product: plasma4 Reporter: Andrea Scarpino <scarpino>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Severity: normal CC: benbullard1, colin, Hamsi2k, kilian, lmenut, macieksitarz, mail, marius_mps, martinstolpe, melko, rdieter, teg, thrilseeka, vavooon
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Archlinux Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: fedora pam patch being tested

Description Andrea Scarpino 2012-02-13 09:48:52 UTC
Version:           unspecified (using KDE 4.8.0) 
OS:                Linux

The shutdown/reboot options in the KMenu doesn't turn off/reboot the system anymore but exit the session and back to KDM.

This happens after the update to systemd version 41 and 42.

This is a KDE bug because the user which reported us the bug (see https://bugs.archlinux.org/task/28386) tried XFCE and everything is fine there.

I didn't test XFCE (I'll do), but I cannot shutdown/reboot my system anymore too.

Any info you need please ask.

Reproducible: Always

Steps to Reproduce:
Use systemd. Try to shutdown/reboot your system.

Actual Results:  
The session is closed and you are back to KDM.

Expected Results:  
The system turn off/reboot.

systemd 42
KDE 4.8.0
Comment 1 Jekyll Wu 2012-02-18 16:37:36 UTC
*** Bug 294376 has been marked as a duplicate of this bug. ***
Comment 2 Marius Cirsta 2012-02-20 20:51:45 UTC
I can confirm that this indeed happens with the new systemd and KDE 4.8.0
Comment 3 Rex Dieter 2012-03-13 20:52:41 UTC
Seems to be a pam issue (I'll attach a patch workaround we're testing in fedora)
Comment 4 Rex Dieter 2012-03-13 20:54:04 UTC
Created attachment 69593 [details]
fedora pam patch being tested

See also downstream bug http://bugzilla.redhat.com/796969
Comment 5 Luc Menut 2012-03-13 21:37:21 UTC
(In reply to comment #4)
> Created attachment 69593 [details]
> fedora pam patch being tested
> See also downstream bug http://bugzilla.redhat.com/796969

All distribs that uses recent systemd have this bug.
It would be nice if this patch is incorporated in kdm, after a proper review by kdm devs.
Rex, please, could you open a review request for this patch to the kde review board?

Comment 6 Rex Dieter 2012-03-13 22:23:52 UTC
We will when it's gotten more testing and more confident that it's the right fix.  You're welcome to help by testing it out yourself, or help provide feedback (if you understand the code).
Comment 7 Martin Stolpe 2012-03-17 13:48:43 UTC

I've tested the attached patch and it works for me. I haven't seen any side effects yet.

Comment 8 Colin Guthrie 2012-04-01 22:50:31 UTC
As my colleague Luc Menut pointed out on our downstream bug (https://bugs.mageia.org/show_bug.cgi?id=4605) this has now been fixed at the systemd side:

This recent commit in systemd "logind: close FIFO before ending sessions
fixes this bug with KDE/KDM.

I tested our current systemd patched with the logind FIFO patch + our kdebase4-workspace without the fedora patch, and shutdown and reboot work fine.

From my previous reading of his description, Rex's patch could very well still be valid, but it seems like it's not specifically needed for proper operation now.
Comment 9 Andrea Scarpino 2012-04-01 22:56:30 UTC
Fixed in systemd with this commit http://cgit.freedesktop.org/systemd/systemd/commit/?id=75c8e3cffd7da8eede614cf61384957af2c82a29