Bug 236176 - x11/kde5: no consolekit session, no power off/reboot/hibernate options
Summary: x11/kde5: no consolekit session, no power off/reboot/hibernate options
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: kde
Depends on:
Reported: 2019-03-03 07:06 UTC by Martin Birgmeier
Modified: 2020-03-29 17:51 UTC (History)
8 users (show)

See Also:
tcberner: maintainer-feedback+


Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2019-03-03 07:06:25 UTC
- Switched from x11/kde4 to x11/kde5 in December 2018 using portmaster: all old kde4 ports deleted, all kde5 ports built anew

- Since then, there are no options to turn off, reboot, or hibernate the machine when pressing the KDE start button and going to the "Leave" submenu; only "Lock" and "Logout" are offered
- Probably related: No consolekit session is registered:

[0]% ck-list-sessions
Comment 1 Tobias C. Berner freebsd_committer 2019-03-03 09:06:04 UTC
Moin moin

How do you start plasma?

> pkg info -xD plasma5-plasma-workspace                                                                                                                                                                             
To start plasma5 via x11/startx add the following to your .xinitrc file:

    exec ck-launch-session startkde

mfg Tobias
Comment 2 Martin Birgmeier 2019-03-03 09:10:53 UTC
I am starting it via sddm.
Comment 3 Hannes 2019-03-05 23:56:01 UTC
the "Switch user" functionality (start new KDE session) is also no longer working since I switched from KDE4 to KDE5.

Clicking on the entry in the start menu locks the curent session as usual, but no new session is started.

DBus reports:
sender=org.freedesktop.DBus -> destination=:1.45 error_name=org.freedesktop.DBus.Error.ServiceUnknown reply_serial=101 string "The name org.freedesktop.login1 was not provided by any .service files"

I'm using:
12.0-RELEASE / amd64


Comment 4 Martin Birgmeier 2019-03-26 20:34:12 UTC
I just realized that Tobias' comment #1 indeed is the solution: I did have a .xinitrc containing just

    exec /usr/local/bin/startkde

After changing this to

    exec /usr/local/bin/ck-launch-session /usr/local/bin/startkde

the consolekit session is registered and the missing power options are here.

Thanks for the pointer; it took me a long time to realize that I had a .xinitrc from very long ago and that sddm is looking at it.

-- Martin
Comment 5 Greg Rivers 2019-03-26 23:55:02 UTC
(In reply to Martin Birgmeier from comment #4)
This doesn't work for me at all. I too start KDE from sddm. I had no .xinitrc. I tried creating one that contained only the suggested startup command, but that had no effect. On startup, the following is still printed to the console:

Mar 26 18:28:34 flake ck-launch-session[1387]: error connecting to ConsoleKit
Mar 26 18:28:38 flake ck-launch-session[1392]: error connecting to ConsoleKit

My KDE session lacks many features:
• The battery monitor detects no battery, yet acpiconf -i 0 works fine.
• The Leave menu only displays Lock and Logout options.
• System Settings User manager displays no local users, and does not allow me to add any.
• System Settings KDE Wallet says "You are not allowed to save the configuration", and in fact I cannot.
• System Settings Startup and Shutdown Login Screen (SDDM) also says "You are not allowed to save the configuration", and I can't.
• Systetm Settings Regional Settings Date & Time also says "You are not allowed to save the configuration", and I can't.

Also, the shutdown and reboot buttons on the SDDM login screen do nothing.

When I moved from kde4 to kde5, I started fresh with an empty home directory, so there shouldn't be anything from the past causing a problem. What could I be missing? Do I have a SDDM problem? Are there other prerequisites, missing packages or configurations? Do I need to start hald and or dbus at boot time from rc.conf? Is there any documentation for setting up a fully functional kde5 desktop session?
Comment 6 Bengt Ahlgren 2019-03-27 09:45:54 UTC
(In reply to Martin Birgmeier from comment #4)
Do you have deskutils/plasma5-sddm-kcm installed?  Otherwise it might be the case that sddm only finds startx, which uses .xinitrc, as the way to start a session.  I do not have ck-launch-session in .xinitrc, but I do have a console-kit session after launching kde5/plasma5 from sddm.
Comment 7 Greg Rivers 2019-03-27 16:27:41 UTC
(In reply to Bengt Ahlgren from comment #6)
Thanks for the suggestion. I do have deskutils/plasma5-sddm-kcm installed.
Comment 8 Martin Birgmeier 2019-03-27 16:56:41 UTC
I don't have deskutils/plasma5-sddm-kcm installed (did not even know about it).

-- Martin
Comment 9 Wooty 2019-09-01 08:17:20 UTC
I currently am experiencing the same issue mentioned here. I have "plasma5-sddm-kcm" installed, logging in via SDDM, and have all issues stated in Comment #5. MY user account also has Administrator Privileges unchecked in User Manager but there is no way to enable it. If there is any other ideas or a method that works please advise, thanks!

P.S.: It seems that from Comment #7 this issue wasn't resolved, but I am not a frequent bug reporter so apologies if there is another thread on this. Thanks again.
Comment 10 Adriaan de Groot freebsd_committer 2019-09-01 10:51:25 UTC
When starting from SDDM:
 - ck-list-sessions shows active=FALSE ; no shutdown, etc. buttons
When starting by hand, .xinitrc:
 - ck-list-session shows active=TRUE ; session can shutdown, etc.

There may be a complication with polkit settings, but we're not there yet.
Comment 11 Bengt Ahlgren 2019-09-02 07:44:44 UTC
Do you have dbus enabled? (dbus_enable="YES" in /etc/rc.conf)

I also have hald enabled, but I'm not sure that is needed anymore.

Is "Plasma" selected in the "Session" menu?
Comment 12 Adriaan de Groot freebsd_committer 2019-10-03 22:34:20 UTC
Based on a comment on the FreeBSD forums, this is the solution that works for me:

root@beastie:~ # cat /usr/local/etc/polkit-1/rules.d/40-wheel-group.rules 
polkit.addRule(function(action, subject) {
    if (subject.isInGroup("wheel")) {
        return polkit.Result.YES;

(although this does much more than just allowing suspend/shutdown, so I don't like it a whole lot)
Comment 13 Gleb Popov freebsd_committer 2020-03-29 17:40:19 UTC
At $WORK I have non-wheel users and also using SDDM to log in. I saw some ConsoleKit-related messages, and shutdown also didn't work, but this problem have gone away for me.

Can you check SDDM logs?
Comment 14 Martin Birgmeier 2020-03-29 17:51:57 UTC
The issue in the original reports has been resoveld; this works for me since some time.

-- Martin