You are not logged in.

#1 2016-04-10 02:32:28

leidson
Member
Registered: 2016-04-10
Posts: 14

Power management is not working properly.

Hi Bunsen labs team. Congratulations by this excellent CrunchBang based distro.

I'm a CrunchBang linux user since 2012 or 2013, and after its ending, I started testing BunsenLabs and CrunchBang++.

I'm using BunsenLabs for serious applications in my working day, developing robust and scalable servers for some financial markets, so is good to know that BunsenLabs has been a very reliable not just for personal use.

Well, the only serious and important feature that seems not to be working properly in BunsenLabs is the power management, because, using this feature, I never had problems before with the original CrunchBang (neither with CrunchBang++ that is based on Debian 8, like BunsenLabs).

I'm testing BunsenLabs in several notebooks and the results are the same. The items below describe the scenarios (all scenarios reported are based on Xfce Power Manager user interface).

1) Hibernate doesn't work for all configurations
  1.1) Tab General - Laptop Lid
  1.2) Tab System  - System power saving (On Battery or Plugged in)
  1.3) Tab system - Critical power

For the items above, for example, after configure all of these items to Hibernate mode, when I close the lid, the notebook flashes some of its lights (maybe power and hard disk lights) and turn itself off. When I press any key the system doesn't wake up again so pressing the power button is needed. At this point the system starts booting and the fsck disk checking shows some disk errors (informing that some inodes were lost by a wrong shutdown process).

2) Suspend and hibernate don't work in the System power saving option and critical power.
  2.1) Tab System - System power saving;
  2.2) Tab system - Critical power;

These options are not respecting the period specified by the user, for example, if I configure the computer to enter in suspend or hibernate after 15 minutes on battery (with the battery fully charged for example), and if a leave the computer turned on for 2 hours (the time of my battery power), I need to turn on the computer again and the fsck informs the bad inodes by a wrong shutdown process.

The item 2.2 in the case is configured to put the system to (hibernate or suspend)  when battery power level is 5% (I increased this option to 10%). In this case this options should protect the system of an abrupt power break causing a wrong shutdown.

Unfortunately the power management is not working properly in BunsenLabs and was working like a charm in CrunchBang, but I think that the community is helping a lot reporting problems and  helping, sometime fixing or sending information, so soon the power management will be in BunsenLabs too.

In this case, when I unlocked the system (after entering in the screen locking), there was a popup asking the password to enter hibernate or suspend mode. And there was an openbox (???) popup showing a dbus timeout error (what it means) - maybe for the password input timeout.

If someone need some information about this problem, please ask me here.

Regards.

Last edited by leidson (2016-04-11 22:01:58)

Offline

#2 2016-04-10 02:56:59

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,548
Website

Re: Power management is not working properly.

Hi leidson and welcome to the forum!

I'm not a hardware wizard I'm afraid, but the first thing I would suggest trying, if you haven't yet, is to run 'bl-welcome' in a terminal and accept the option to install the newer version of xfce4-power-manager from the BunsenLabs backports repository.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#3 2016-04-10 12:20:37

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Power management is not working properly.

Thank you for the excellent bug report!

leidson wrote:

  2.1) Tab System - System power saving;
  [...]
These options are not respecting the period specified by the user, for example, if I configure the computer to enter in suspend or hibernate after 15 minutes on battery (with the battery fully charged for example), and if a leave the computer turned on for 2 hours (the time of my battery power), I need to turn on the computer again and the fsck informs the bad inodes by a wrong shutdown process.

These options can be controlled from /etc/systemd/logind.conf instead, see logind.conf(5) for details ("IdleAction=" & "IdleActionSec=").

Can we see the output of:

systemd-inhibit

The journalctl(1) output for one of the failed hibernate attempts would probably be very useful but I'm having trouble making the systemd logs persistent in my BL system -- I will have to get back to you on that one...
hmm


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#4 2016-04-10 15:13:21

leidson
Member
Registered: 2016-04-10
Posts: 14

Re: Power management is not working properly.

Thank you Mr. John.

In fact there are 2 BunsenLabs machines that I'm using.

The first (and the serious machine) is running with Hydrogen RC1 but I think that everything is updated for RC2 (no ??), because this machine has been updated every day.

But I executed the bl-welcome again and I now I market to put backports to my repositories list. And finally now my xfce4-power-manager is updated.

I'll try this new xfce4-power-manager release. smile

The second machine is a testing machine and was installed yesterday and all of these options were market when I installed BunsenLabs on this machine.

Thanks a lot

Leidson

johnraff wrote:

Hi leidson and welcome to the forum!

I'm not a hardware wizard I'm afraid, but the first thing I would suggest trying, if you haven't yet, is to run 'bl-welcome' in a terminal and accept the option to install the newer version of xfce4-power-manager from the BunsenLabs backports repository.

Offline

#5 2016-04-10 15:24:10

leidson
Member
Registered: 2016-04-10
Posts: 14

Re: Power management is not working properly.

Hi Mr.

Here is the systemd-inhibit results:

popolony2k@vicviper:~$ 
popolony2k@vicviper:~$ systemd-inhibit
     Who: NetworkManager (UID 0/root, PID 547/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks
    Mode: delay[/b]

     Who: xfce4-power-manager (UID 1000/popolony2k, PID 1151/xfce4-power-man)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
     Why: xfce4-power-manager handles these events
    Mode: block[/b]

2 inhibitors listed.

I'll try to check the journalctl results after trying to hibernate/suspend, please check my next post.

Thanks in advance.

Leidson


Head_on_a_Stick wrote:

Thank you for the excellent bug report!

leidson wrote:

  2.1) Tab System - System power saving;
  [...]
These options are not respecting the period specified by the user, for example, if I configure the computer to enter in suspend or hibernate after 15 minutes on battery (with the battery fully charged for example), and if a leave the computer turned on for 2 hours (the time of my battery power), I need to turn on the computer again and the fsck informs the bad inodes by a wrong shutdown process.

These options can be controlled from /etc/systemd/logind.conf instead, see logind.conf(5) for details ("IdleAction=" & "IdleActionSec=").

Can we see the output of:

systemd-inhibit

The journalctl(1) output for one of the failed hibernate attempts would probably be very useful but I'm having trouble making the systemd logs persistent in my BL system -- I will have to get back to you on that one...
hmm

Last edited by Head_on_a_Stick (2016-04-10 22:19:55)

Offline

#6 2016-04-10 15:50:31

damo
....moderator....
Registered: 2015-08-20
Posts: 4,224

Re: Power management is not working properly.

leidson wrote:

...

The first (and the serious machine) is running with Hydrogen RC1 but I think that everything is updated for RC2 (no ??), because this machine has been updated every day.
...

But an update will not affect all your user configurations.


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#7 2016-04-10 16:25:40

leidson
Member
Registered: 2016-04-10
Posts: 14

Re: Power management is not working properly.

Hi Damo.

You're right but in this case the results are the same found on my newer Bunsen labs installation.

Regards

Leidson

damo wrote:
leidson wrote:

...

The first (and the serious machine) is running with Hydrogen RC1 but I think that everything is updated for RC2 (no ??), because this machine has been updated every day.
...

But an update will not affect all your user configurations.

Offline

#8 2016-04-10 16:37:47

leidson
Member
Registered: 2016-04-10
Posts: 14

Re: Power management is not working properly.

Well.

My computer is configured to enter hibernate/suspend after 15 minutes. I tested this scenario again and after 15 minutes nothing happened.

When I tried to login again, there was an authentication request popup to enter hibernating mode. The Power manager shows a "method call timeout" as you can see below.

forum.th.png

Regards.

Leidson

Mod Note: Oversized image replaced with thumbnail link, please limit images to ~250x250px
-HoaS

Offline

#9 2016-04-10 18:37:45

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Power management is not working properly.

Try this:

sudo apt-get install pm-utils

If that doesn't fix it we can try to workaround the problem with logind.conf


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#10 2016-04-10 20:00:11

leidson
Member
Registered: 2016-04-10
Posts: 14

Re: Power management is not working properly.

Unfortunately installing pm-utils didn't work, on both of my installations.

Leidson

Head_on_a_Stick wrote:

Try this:

sudo apt-get install pm-utils

If that doesn't fix it we can try to workaround the problem with logind.conf

Offline

#11 2016-04-10 20:41:51

leidson
Member
Registered: 2016-04-10
Posts: 14

Re: Power management is not working properly.

Hi.

I found the same issue report for Xubuntu installations and one guy wrote that the problem is related to the "light-locker" (???).

He wrote: "Please set light-locker to lock the session “When the screensaver is deactivated” and test again."

But the configuration of light-locker on lubuntu is different of BunsenLabs. Where can I configure light-locker in BunseLabs ? I checked in the autostart openbox configuration file and there is a reference to the light-locker that I'm pasting below.

## Start xscreensaver (light-locker now used by default, run via XDG autostart.)
#xscreensaver -no-splash &

Here is the original forum post at Xubuntu forum.

https://bugs.launchpad.net/ubuntu/+sour … ug/1441460

Last edited by leidson (2016-04-10 20:43:07)

Offline

#12 2016-04-10 20:56:13

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Power management is not working properly.

Try:

sudo mv /etc/xdg/autostart/light-locker.desktop ~/

This will stop lightlocker from starting and thus prevent it from marking a session as inactive and stopping xfce4-power-manager hibernating the machine.

What is the output of:

xfce4-power-manager --dump

“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#13 2016-04-10 21:25:03

leidson
Member
Registered: 2016-04-10
Posts: 14

Re: Power management is not working properly.

The output for the xfce4-power-manager --dump is:

popolony2k@vicviper:/etc/lightdm$ xfce4-power-manager --dump
---------------------------------------------------
       Xfce power manager version 1.4.4
With policykit support
With network manager support
---------------------------------------------------
Can suspend: True
Can hibernate: True
Authorized to suspend: True
Authorized to hibernate: True
Authorized to shutdown: True
Has battery: True
Has brightness panel: True
Has power button: True
Has hibernate button: True
Has sleep button: True
Has LID: True
popolony2k@vicviper:/etc/lightdm$ 


I'll try to move the light-locker config file like you wrote and soon I'll post here the results.

Thanks in advance.

Leidson

Head_on_a_Stick wrote:

Try:

sudo mv /etc/xdg/autostart/light-locker.desktop ~/

This will stop lightlocker from starting and thus prevent it from marking a session as inactive and stopping xfce4-power-manager hibernating the machine.

What is the output of:

xfce4-power-manager --dump

Last edited by Head_on_a_Stick (2016-04-10 22:20:30)

Offline

#14 2016-04-11 01:25:05

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,548
Website

Re: Power management is not working properly.

Head_on_a_Stick wrote:

Try:

sudo mv /etc/xdg/autostart/light-locker.desktop ~/

This will stop lightlocker from starting

For this, I would recommend

cp /etc/xdg/autostart/light-locker.desktop ~/.config/autostart/

Then edit~/.config/autostart/light-locker.desktop , adding a line

Hidden=true

The original file is untouched, upgrades of LightLocker will not affect the fix, and no root powers are needed.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#15 2016-04-11 07:52:10

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Power management is not working properly.

^ Yes indeed, good advice smile

Alternatively:

sudo apt purge light-locker

big_smile


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#16 2016-04-11 21:51:35

leidson
Member
Registered: 2016-04-10
Posts: 14

Re: Power management is not working properly.

Hi John.

Thank you for your response.

About creating the specific user configuration file for the light-locker.desktop, this is the best thing to do, i think too. About this solution I have a question. Is not a good idea to create this autostart directory on .config, copying the light-locker configuration file with some presets, or just copying the original /etc/xdg/autostart/light-locker.desktop, to this user configuration autostart directory ? This could be done by a bunsen labs install/config script, "automagically" ?

About the Hidden=true option you wrote, unfortunately this option affects the openbox right menu option "Lock Screen". When you put Hidden=true, the openbox Lock Screen menu item, stops working.

The solution I found was the same written in Xubuntu forum I sent before, but I was in doubt how to configure it.

They said:
Please set light-locker to lock the session “When the screensaver is deactivated” and test again.

Using the light-locker man page I found that the option --late-locking means “When the screensaver is deactivated” smile

In the light-locker.desktop config file, the only thing to do is to put this option in the Exec entry, like written below.

Exec=light-locker --late-locking

This solution worked for both of my BunsenLabs notebooks.

Now the only thing that is not working 100% is the suspend mode, but I can survive with hibernate instead suspend smile

I'll try to investigate the suspend problem and soon I contact you.

Thank you guys.

Leidson


johnraff wrote:
Head_on_a_Stick wrote:

Try:

sudo mv /etc/xdg/autostart/light-locker.desktop ~/

This will stop lightlocker from starting

For this, I would recommend

cp /etc/xdg/autostart/light-locker.desktop ~/.config/autostart/

Then edit~/.config/autostart/light-locker.desktop , adding a line

Hidden=true

The original file is untouched, upgrades of LightLocker will not affect the fix, and no root powers are needed.

Last edited by leidson (2016-04-11 22:10:37)

Offline

#17 2017-11-07 15:09:12

jimjamz
Member
From: Nagasaki, Japan
Registered: 2016-04-04
Posts: 61

Re: Power management is not working properly.

Hi @leidson,

Did you make any further progress solving the suspend => powering off issue?

I have the same problem.  I installed BL-Deuterium on my MacBook Pro 2015 and closing the lid or selecting the Suspend option from the Exit menu option, "sort-of" powers off the machine.
I say "sort-of" because a short-press of the power button does not turn the system back on.  Instead, a long-press (5+ seconds) followed by a short-press of the power button turns the system back on.
This indicates to me that the system may not be completely powered off.
No other key nor the trackpad will wake the system once in this state.

Strangely, I have followed the same BL-Deuterium installation procedure on my MBP 2010 and that works without any issue.  Closing the lid or manually suspending the system does not result in it powering off.

Offline

#18 2018-01-10 12:45:35

leidson
Member
Registered: 2016-04-10
Posts: 14

Re: Power management is not working properly.

jimjamz wrote:

Hi @leidson,

Did you make any further progress solving the suspend => powering off issue?

I have the same problem.  I installed BL-Deuterium on my MacBook Pro 2015 and closing the lid or selecting the Suspend option from the Exit menu option, "sort-of" powers off the machine.
I say "sort-of" because a short-press of the power button does not turn the system back on.  Instead, a long-press (5+ seconds) followed by a short-press of the power button turns the system back on.
This indicates to me that the system may not be completely powered off.
No other key nor the trackpad will wake the system once in this state.

Strangely, I have followed the same BL-Deuterium installation procedure on my MBP 2010 and that works without any issue.  Closing the lid or manually suspending the system does not result in it powering off.

Hi @jimjamz

In fact now I resolved like I wrote some responses above. I'm still using Hydrogen based Bunsenlabs, maybe in future I'll move to a new version.

I had a MacBook air with Hydrogen installed and I was facing the same kind of problem.

When I was using the original Crunchbang, these issues didn't exist, so I don't know if is something new inserted in newer linux kernel, or even UI packages like openbox.

Regards
Leidson

Last edited by leidson (2018-01-10 12:46:11)

Offline

#19 2018-02-15 03:34:09

leidson
Member
Registered: 2016-04-10
Posts: 14

Re: Power management is not working properly.

Hi friends.

Good news about this issue. I finally fixed this wrong sleep/suspending behavior on BunsenLabs. In fact this problem doesn't happen to several Linux distribution I'm using but unfortunately is happening to serveral others, BunsenLabs included.

After 2 years using the oldest BunsenLabs version I finally did an upgrade to the latest  BunsenLabs Deuterium release. Unfortunately the same problem is happening to this version but I finally studied a little bit more about this issue to fix this.

This is related to the FreeDesktop power management policiy and can be adjusted configuring the suspend policy.

Please follow the steps below:

Open a terminal and go to the following directory

cd /usr/share/polkit-1/actions/

Open the freedesktop policies file using a text editor (I'm using Geany):

sudo geany org.freedesktop.login1.policy

Search for "org.freedesktop.login1.suspend"

You will find the XML entry below:

        <action id="org.freedesktop.login1.suspend">
                <description>Suspend the system</description>
                <description xml:lang="de">Das System in Bereitschaft versetzen</description>
                <description xml:lang="el">Αναστολή του συστήματος</description>
                <description xml:lang="fr">Mettre le système en veille</description>
                <description xml:lang="it">Sospendere il sistema</description>
                <description xml:lang="pl">Uśpienie systemu</description>
                <description xml:lang="ru">Перевести систему в ждущий режим</description>
                <message>Authentication is required for suspending the system.</message>
                <message xml:lang="de">Legitimierung ist zum Versetzen des Systems in Bereitschaft notwendig.</message>
                <message xml:lang="el">Απαιτείται πιστοποίηση για την αναστολή του συστήματος.</message>
                <message xml:lang="fr">Authentification requise pour mettre le système en veille.</message>
                <message xml:lang="it">Autenticazione richiesta per sospendere il sistema.</message>
                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby uśpić system.</message>
                <message xml:lang="ru">Чтобы перевести систему в ждущий режим, необходимо пройти аутентификацию.</message>

                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>

        </action>
 

The entry :

                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>

Must be changed to:

                <defaults>
                        <allow_any>yes</allow_any>
                        <allow_inactive>yes</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>

This will avoid the light-locker ask you about user authentication before going to sleep/suspend, avoiding the system to enter sleep/suspend mode.

Important

Repeat the same procedure above for the org.freedesktop.login1.hibernate XML entry.

I think fixing this issue should be considered by the BunsenLabs team for next BunsenLabs releases or even in futures Deuterium updates, because this is really an annoying behavior for those who are using Bunsen Labs on notebooks instead desktop machines.

I'll apply this 'fix' to another installed BunsenLabs notebook I'm using here.

Last edited by leidson (2018-02-15 04:52:54)

Offline

#20 2018-02-15 04:49:01

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,548
Website

Re: Power management is not working properly.

Hi leidson, thank you for posting this.

In fact we have already committed a fix for this issue, which will be shipped in the upcoming "Helium" BunsenLabs release. We install this file as  /var/lib/polkit-1/localauthority/10-vendor.d/org.bunsenlabs.pkla:

[Allow inactive users to suspend]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultInactive=yes
ResultActive=yes

[Allow inactive users to shutdown]
Identity=unix-user:*
Action=org.freedesktop.login1.power-off
ResultInactive=yes
ResultActive=yes

I think it's essentially the same solution, adding a fix for a related issue that another user was having with shutdown.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#21 2018-02-15 04:55:55

leidson
Member
Registered: 2016-04-10
Posts: 14

Re: Power management is not working properly.

Good news about this fixing.

Do you know when Helium will be released ?

I'll test it using another machine before install it to my "production" machine.


Regards.

Leidson

Offline

#22 2018-02-15 04:58:00

leidson
Member
Registered: 2016-04-10
Posts: 14

Re: Power management is not working properly.

The solution below works for Hibernate process too ?

Please check my fix post again (I've added an extra information about Hibernate configuration).

Regards.

Leidson

johnraff wrote:

Hi leidson, thank you for posting this.

In fact we have already committed a fix for this issue, which will be shipped in the upcoming "Helium" BunsenLabs release. We install this file as  /var/lib/polkit-1/localauthority/10-vendor.d/org.bunsenlabs.pkla:

[Allow inactive users to suspend]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultInactive=yes
ResultActive=yes

[Allow inactive users to shutdown]
Identity=unix-user:*
Action=org.freedesktop.login1.power-off
ResultInactive=yes
ResultActive=yes

I think it's essentially the same solution, adding a fix for a related issue that another user was having with shutdown.

Offline

#23 2018-02-15 07:42:13

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Power management is not working properly.

leidson wrote:

Do you know when Helium will be released ?

It is imminent.

leidson wrote:

The solution below works for Hibernate process too ?

It would be helpful to us if you could test the fix and report back, thanks!


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#24 2018-02-16 11:25:18

D219
Member
Registered: 2017-02-23
Posts: 29

Re: Power management is not working properly.

jimjamz wrote:

Hi @leidson,

Did you make any further progress solving the suspend => powering off issue?

I have the same problem.  I installed BL-Deuterium on my MacBook Pro 2015 and closing the lid or selecting the Suspend option from the Exit menu option, "sort-of" powers off the machine.
I say "sort-of" because a short-press of the power button does not turn the system back on.  Instead, a long-press (5+ seconds) followed by a short-press of the power button turns the system back on.
This indicates to me that the system may not be completely powered off.
No other key nor the trackpad will wake the system once in this state.

Strangely, I have followed the same BL-Deuterium installation procedure on my MBP 2010 and that works without any issue.  Closing the lid or manually suspending the system does not result in it powering off.

I had the same issue with my laptop , upgrading the kernel to backports and removing one of the xorg- package fixed all issues I had.

Offline

Board footer

Powered by FluxBB