Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Working suspend, but no hibernate after upgrade to kde 5,
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 260
Location: Nijmegen

PostPosted: Sat Apr 09, 2016 3:24 pm    Post subject: Working suspend, but no hibernate after upgrade to kde 5, Reply with quote

After the upgrade to KDE5, I no longer had hibernation/suspend options in the kde-menu. Following the suggestions here: https://wiki.gentoo.org/wiki/KDE/Plasma_5_upgrade#Missing_shutdown.2Freboot.2Fsuspend.2Fhibernate_buttons_.28using_OpenRC.29 I added my user to the users group which returned suspend to the menu, but hibernate is still missing. I also switched from upower-pm-utils to upower, because emerge suggested it. And I added pm-utils useflag to consolekit, but that didn't help.
Code:
andrew@Andrew-Gentoo ~ $ qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.CanHibernate
false
andrew@Andrew-Gentoo ~ $ qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.CanSuspend
true
andrew@Andrew-Gentoo ~ $ grep pam_ck_connector /etc/pam.d/system-login
session         optional        pam_ck_connector.so nox11
andrew@Andrew-Gentoo ~ $

I checked that the swap is working, but that wasn't it. I have no clue why CanHibernate is false, anybody know why?
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
sebB
l33t
l33t


Joined: 02 Mar 2011
Posts: 806
Location: S.O. France

PostPosted: Sat Apr 09, 2016 10:11 pm    Post subject: Reply with quote

Same problem for me.
No hibernate in menu or in Power Management / Button events handling.
Running as root pm-hibernate work.

I notice that "screen brightness" is not present too in Power Management.
Do you have it on your system?
Running Fn + F5 work for me.
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 260
Location: Nijmegen

PostPosted: Sun Apr 10, 2016 7:41 am    Post subject: Reply with quote

I was reading around, and other people have similar issues but usually it's supspend and hibernate that's missing. I suspect this has to do with consolekit, I read another forum post where downgrading consolekit got hibernate back, but i haven't tried since lots of stuff requires the new version.

Regarding brightness adjustment, I haven't had working brightness adjustment for months now. It has something to do with ACPI i think. Long story short, i can adjust brigthenss with echo value > /sys/class/backlight/radeon_bl0/brigntess, but not with xbacklight or any other command, I also don't have the slider in the system tray icon anymore, it used to be there in KDE4 and it just showed 0%.
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8933

PostPosted: Sun Apr 10, 2016 9:26 am    Post subject: Reply with quote

There was one commit in consolekit that added a check for prerequisites to hibernate, that might be the reason why it stopped working for some people. One could try to revert that.
Back to top
View user's profile Send private message
paraw
Apprentice
Apprentice


Joined: 07 Jan 2005
Posts: 158
Location: Coventry (UK)

PostPosted: Sun Apr 10, 2016 11:07 am    Post subject: Reply with quote

The reason seems to be this bug here
https://bugs.kde.org/show_bug.cgi?id=344456
In fact, in my case, if I start kde and then do
Code:
kill -9 kded5 && kded5&
kill -9 plasmashell && plasmashell&

the hibernation button reappears, together with other missing stuff, such as screen brightness. According to the link above, the problem is that the kde polkit agent starts only after kded. The bug is marked resolved upstream, but even updating to the latest versions available in portage does not solve it out of the box. Also, the behaviour is exactly the same with upower and upower-pm-utils, but, according to my tests, one does need the pm-utils use flag for consolekit.
Anyway, it's really annoying.
Back to top
View user's profile Send private message
sebB
l33t
l33t


Joined: 02 Mar 2011
Posts: 806
Location: S.O. France

PostPosted: Sun Apr 10, 2016 1:51 pm    Post subject: Reply with quote

paraw wrote:

In fact, in my case, if I start kde and then do
Code:
kill -9 kded5 && kded5&
kill -9 plasmashell && plasmashell&


Effectively, after typing this commands, hibernate and brightness work.
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 260
Location: Nijmegen

PostPosted: Sun Apr 10, 2016 2:05 pm    Post subject: Reply with quote

paraw wrote:

Code:
kill -9 kded5 && kded5&
kill -9 plasmashell && plasmashell&


Am I missing something here? those commands fail on my system.
Code:

Andrew-Gentoo andrew # kill -9 kded5 && kded5&
[1] 23887
bash: line 1: kill: kded5: arguments must be process or job IDs

_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
sebB
l33t
l33t


Joined: 02 Mar 2011
Posts: 806
Location: S.O. France

PostPosted: Sun Apr 10, 2016 2:27 pm    Post subject: Reply with quote

Sorry I use killall instead of kill -9
I've a made simple bash script (xx.sh) and run it after kde start
Code:

#!/bin/bash
killall kded5 && kded5&
killall plasmashell && plasmashell&
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 260
Location: Nijmegen

PostPosted: Sun Apr 10, 2016 2:36 pm    Post subject: Reply with quote

sebB wrote:
Sorry I use killall instead of kill -9
I've a made simple bash script (xx.sh) and run it after kde start
Code:

#!/bin/bash
killall kded5 && kded5&
killall plasmashell && plasmashell&


Thank you so much. This also fixed the issue i've been having with brightness adjustment, looks like it was a problem for kde4 too.
I had completely given up on fixing the backlight, and now the solution is really simple. One last question tho, how do I restart plasmashell in such a way that it doesn't close again when i close the terminal? I tried adding a "&" to the end but that didn't help.
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
sebB
l33t
l33t


Joined: 02 Mar 2011
Posts: 806
Location: S.O. France

PostPosted: Sun Apr 10, 2016 4:08 pm    Post subject: Reply with quote

Like I said I simply create a file ex plasmarestart.sh
Put in
Code:
#!/bin/bash
killall kded5 && kded5&
killall plasmashell && plasmashell&

Then chmod +x plasmarestart.sh

To activate it simply double clic on the file.

This workaround is not a permanent solution. Do we have to open a bug?
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 260
Location: Nijmegen

PostPosted: Mon Apr 11, 2016 7:05 am    Post subject: Reply with quote

sebB wrote:
Like I said I simply create a file ex plasmarestart.sh
Put in
Code:
#!/bin/bash
killall kded5 && kded5&
killall plasmashell && plasmashell&

Then chmod +x plasmarestart.sh

To activate it simply double clic on the file.

This workaround is not a permanent solution. Do we have to open a bug?


Thanks, I got it working now.

paraw wrote:
The reason seems to be this bug here
https://bugs.kde.org/show_bug.cgi?id=344456

It looks like this bug only partial covers it. I've made a new bug report here: https://bugs.gentoo.org/show_bug.cgi?id=579564
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
urcindalo
l33t
l33t


Joined: 08 Feb 2005
Posts: 623
Location: Almeria, Spain

PostPosted: Mon Apr 11, 2016 8:30 pm    Post subject: Reply with quote

sebB wrote:
Like I said I simply create a file ex plasmarestart.sh
Put in
Code:
#!/bin/bash
killall kded5 && kded5&
killall plasmashell && plasmashell&

Then chmod +x plasmarestart.sh

To activate it simply double clic on the file.

This workaround is not a permanent solution. Do we have to open a bug?


Thanks very much. 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. I could, however, suspend from the command line. Your two commands as a regular user bring them back.
Back to top
View user's profile Send private message
shivanova
n00b
n00b


Joined: 07 Sep 2013
Posts: 3

PostPosted: Sun Apr 24, 2016 12:07 am    Post subject: Reply with quote

I had the same issue, it appears that PowerDevil installs polkit file only for suspend (/etc/polkit-1/localauthority/10-vendor.d/40-org.freedesktop.consolekit.system.suspend-multiple-users.pkla), creating one for hibernate /etc/polkit-1/localauthority/10-vendor.d/50-org.freedesktop.consolekit.system.hibernate-multiple-users.pkla
Code:

[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
Back to top
View user's profile Send private message
danarchy85
n00b
n00b


Joined: 26 Aug 2016
Posts: 4
Location: Southern California

PostPosted: Fri Aug 26, 2016 1:17 am    Post subject: Reply with quote

Awesome shivanova! Adding that file appears to fix the Hibernate button for me. Seems like that simply needs to be added to the polkit ebuild.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8933

PostPosted: Wed Aug 31, 2016 4:12 pm    Post subject: Reply with quote

This should be fixed now with powerdevil-5.7.4-r1
Back to top
View user's profile Send private message
paraw
Apprentice
Apprentice


Joined: 07 Jan 2005
Posts: 158
Location: Coventry (UK)

PostPosted: Sat Sep 10, 2016 11:07 am    Post subject: Reply with quote

shivanova wrote:
I had the same issue, it appears that PowerDevil installs polkit file only for suspend (/etc/polkit-1/localauthority/10-vendor.d/40-org.freedesktop.consolekit.system.suspend-multiple-users.pkla), creating one for hibernate /etc/polkit-1/localauthority/10-vendor.d/50-org.freedesktop.consolekit.system.hibernate-multiple-users.pkla
Code:

[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


Yes, but it still does not fix other powerdevil-related stuff, such as display and keyboard brightness.

asturm, are these fixed in powerdevil-5.7.4-r1?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8933

PostPosted: Sat Sep 10, 2016 11:17 am    Post subject: Reply with quote

The powerdevil revbump only fixed hibernate. I've never had an issue with display and keyboard brightness, so I can't tell.
Back to top
View user's profile Send private message
paraw
Apprentice
Apprentice


Joined: 07 Jan 2005
Posts: 158
Location: Coventry (UK)

PostPosted: Sat Sep 10, 2016 11:22 am    Post subject: Reply with quote

I think they are related, because restarting kded5 and plasmashell fixes all the problems for me...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum