LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Power management problem on a laptop for new-installed Slackware 14.2 (https://www.linuxquestions.org/questions/slackware-14/power-management-problem-on-a-laptop-for-new-installed-slackware-14-2-a-4175669926/)

illidan.modeler 02-19-2020 10:12 PM

Power management problem on a laptop for new-installed Slackware 14.2
 
Problems:
1. Occasionally, "shutdown -h now" seemed to shut down the system, but the power was not cut off automatically, and I would have to hold the hardware power button for seconds to truely cut off the power.
2. The XFCE power manager was not able to show battery information at all. The XFCE power manager always showed a static power plug icon and would not change to show a battery icon with battery life when the AC power cable was plug off.

Hardware: AMD Turion X2 laptop made in 2010.

System: Slackware 14.2 32bit, only with packages from the official ISO, without any package from on-line official mirror or third-party repositories.

Code:

root@slack14:~# modinfo battery
filename:      /lib/modules/4.4.14-smp/kernel/drivers/acpi/battery.ko
license:        GPL
description:    ACPI Battery Driver
author:        Alexey Starikovskiy <astarikovskiy@suse.de>
author:        Paul Diefenbaugh
alias:          acpi*:PNP0C0A:*
depends:       
intree:        Y
vermagic:      4.4.14-smp SMP mod_unload PENTIUMIII
parm:          cache_time:cache time in milliseconds (uint)

file under /proc showed showed the correct info (at least it correctly reflected whether the AC power was unplugged, or the remaining battery capacity when running on battery):
Code:

$ cat /proc/acpi/battery/BAT1/state
present:                yes
capacity state:          ok
charging state:          charging
present rate:            337 mA
remaining capacity:      316 mAh
present voltage:        11000 mV

upower command gave errors:
Code:

root@slack14:~# upower -e

(upower:2326): libupower-glib-WARNING **: Couldn't enumerate devices: Launch helper exited with unknown return code 127

(upower:2326): UPower-WARNING **: failed to enumerate: Launch helper exited with unknown return code 127


Any suggestion to solve the problems ?

upnort 02-19-2020 10:52 PM

Quote:

2. The XFCE power manager was not able to show battery information at all. The XFCE power manager always showed a static power plug icon and would not change to show a battery icon with battery life when the AC power cable was plug off.
I'm using 14.2. To my understanding there are two ways to enable the Xfce4 power manager.

* Settings Manager->Session and Startup->Application Autostart->Power Manager

* "Right-click" the Panel->Panel->Add New Items->Power Manager Plugin

The first method uses a system tray static icon. The second method uses bigger dynamic icon.

When the second method is used, trying to access the Power Manager Settings results in a dialog that Power Manager is not running. Telling the dialog to start Power Manager results in the system tray icon appearing.

When popup notifications are enabled, the bigger dynamic icon does not show the popups. When the smaller static icon is used the popups appear.

I don't know why there are two methods and one of the methods is a static icon.

Edit: Please refer to my next post for clarification about the two icons.

bassmadrigal 02-19-2020 11:06 PM

While I'm not sure it would be related, I would highly recommend updating your 14.2 to the latest patches. These problems might've been resolved with newer kernels or other patches, and it's best to know you're on a fully patched 14.2 install before we try and debug this problem.

elcore 02-20-2020 01:20 AM

Hey, I'm almost certain that (1) depends on the board, since I've seen 'shutdown' act differently on different motherboards.
One machine would poweroff with just "shutdown -h now" another required "shutdown -hP now"

Code:

-h:      halt after shutdown.
-P:      halt action is to turn off power.

Not sure if -P is the default action on Slackware, but it probably should be.

upnort 02-20-2020 11:31 AM

Some hours after my previous post I realized the difference between the two icons. The static icon is for indicating the power manager daemon is running. The dynamic icon is to show power status.

The power manager daemon must be running. The daemon is enabled in Settings Manager->Session and Startup->Application Autostart->Power Manager.

When the daemon is enabled, open the power manager dialog. In the General tab, disable/uncheck the Show system tray icon.

Then "right-click" the Panel->Panel->Add New Items->Power Manager Plugin.


All times are GMT -5. The time now is 03:01 PM.