Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 579564 - Plasma 5: Hibernation (and brightness adjustment?) only working after restarting kded5 and plasmashell with consolekit
Summary: Plasma 5: Hibernation (and brightness adjustment?) only working after restart...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-11 07:04 UTC by Nowa Ammerlaan
Modified: 2016-09-11 13:40 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nowa Ammerlaan gentoo-dev 2016-04-11 07:04:17 UTC
When i start KDE5 hibernation is not in the kde-menu, and i can't adjust brightness. I've made a thread on the forums: https://forums.gentoo.org/viewtopic-t-1042642.html and we found that restarting kde5 and plasmashell from a running session fixes the issue. According to a user on the forum this is because kde polkit agent only starts after kded.



polkit-kde-agent-version: 5.5.5
consolekit-version 1.1.0
openrc-version: 0.19.1
Plasma-version: 5.5.5
OS: Gentoo KDE x86_64
Name: Toshiba Satellite L850-1KT
GPU: AMD Radeon HD 7670M
CPU: Intel Core i7 3630QM
Full Specifications: https://tinyurl.com/k9sucx9
Comment 1 urcindalo 2016-04-11 20:28:31 UTC
Thanks. Same for me. I was going nuts :)
I had followed the Gentoo Plasma 5 guide to the letter but I was still missing Suspend & Hibernate in all my machines. These two commands as a regular user bring them back:

killall kded5 && kded5& 
killall plasmashell && plasmashell&
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2016-04-24 14:28:34 UTC
Brightness worked fine here from the beginning.
Suspend only after the workaround from comment 1.
Comment 3 Dan James 2016-08-18 23:05:04 UTC
Brightness works fine for me, but I am having the same issues hibernate on Plasma5 and I think I have narrowed it down to being caused by ConsoleKit 1.0.1 or higher.

Downgrading to ConsoleKit 0.4.6 and also installing the required upower-pm-utils brings back hibernation. Upgrading back to 1.0.1, 1.1.0, or 1.1.0-r1 all remove hibernation even with upower-pm-utils.

As with comment 1 above, ConsoleKit >1.0.1 works if you kill & restart kded5 & plasmashell.

I also tried copying /etc/polkit-1/localauthority/10-vendor.d/40-org.freedesktop.consolekit.system.suspend-multiple-users.pkla -> 50-org.freedesktop.consolekit.system.hibernate-multiple-users.plka and changing references to 'suspend' to 'hibernate', but this does not appear to fix it.
Comment 4 Dan James 2016-08-26 01:14:51 UTC
(In reply to Dan H from comment #3)
> Brightness works fine for me, but I am having the same issues hibernate on
> Plasma5 and I think I have narrowed it down to being caused by ConsoleKit
> 1.0.1 or higher.
> 
> Downgrading to ConsoleKit 0.4.6 and also installing the required
> upower-pm-utils brings back hibernation. Upgrading back to 1.0.1, 1.1.0, or
> 1.1.0-r1 all remove hibernation even with upower-pm-utils.
> 
> As with comment 1 above, ConsoleKit >1.0.1 works if you kill & restart kded5
> & plasmashell.
> 
> I also tried copying
> /etc/polkit-1/localauthority/10-vendor.d/40-org.freedesktop.consolekit.
> system.suspend-multiple-users.pkla ->
> 50-org.freedesktop.consolekit.system.hibernate-multiple-users.plka and
> changing references to 'suspend' to 'hibernate', but this does not appear to
> fix it.

On a second look at this, adding the following contents to /etc/polkit-1/localauthority/10-vendor.d/50-org.freedesktop.consolekit.system.hibernate-multiple-users.pkla  does seem to put hibernate into my system menu: 

[Allow all users to hibernate with Conesolekit2]
Identity=unix-group:users
Action=org.freedesktop.consolekit.system.hibernate-multiple-users;org.freedesktop.consolekit.system.hibernate
ResultAny=yes
ResultInactive=no
ResultActive=yes
Comment 5 Michael Palimaka (kensington) gentoo-dev 2016-08-31 12:16:21 UTC
I have added the hibernation pkla file in bug #580994, I hope this resolves the issue for you.
Comment 6 Derek Dolney 2016-09-02 23:24:45 UTC
I don't see how this could be the fix. OP says he doesn't have suspend nor hibernate. Seems like this would fix the other bug only that appears to be hibernate missing but no suspend.

I don't have hibernate or suspend, unless I invoke workaround of Comment 1 (which produces other unfortunate side effects)
Comment 7 Nowa Ammerlaan gentoo-dev 2016-09-11 13:40:33 UTC
I tried adding the file in comment 4, however this does not fix the issue with hibernation for me. I've run a tail -f on /var/log/messages to see what actually happens when plasmashell and kde5 are restarted:

Sep 11 15:26:22 Andrew-Gentoo su[6608]: Successful su for root by andrew
Sep 11 15:26:22 Andrew-Gentoo su[6608]: + /dev/pts/1 andrew:root
Sep 11 15:26:22 Andrew-Gentoo su[6608]: pam_unix(su:session): session opened for user root by andrew(uid=1000)
Sep 11 15:30:01 Andrew-Gentoo CROND[6676]: (root) CMD ([ ! -x /etc/cron.hourly/0anacron ] && { test -x /usr/sbin/run-crons && /usr/sbin/run-crons ; })
Sep 11 15:31:47 Andrew-Gentoo su[6726]: Successful su for root by andrew
Sep 11 15:31:47 Andrew-Gentoo su[6726]: + /dev/pts/2 andrew:root
Sep 11 15:31:47 Andrew-Gentoo su[6726]: pam_unix(su:session): session opened for user root by andrew(uid=1000)
Sep 11 15:32:58 Andrew-Gentoo dbus[4033]: [system] Activating service name='org.kde.powerdevil.backlighthelper' (using servicehelper) [<-- this is when I ran a script that restarts kde5 and plasmashell]
Sep 11 15:32:58 Andrew-Gentoo dbus[4033]: [system] Successfully activated service 'org.kde.powerdevil.backlighthelper'  

For some reason the backlighthelper service is only started after a plasmashell and kde5 restart. I'm unsure why the file from comment 4 does not solve the issue with hibernation for me, but I'm pretty sure it is not related to the backlighthelper service.