Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel issue with battery / power management
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1013

PostPosted: Sat Jan 06, 2018 4:22 am    Post subject: Kernel issue with battery / power management Reply with quote

The issue is that sometimes I lose the battery function in terms of charging and discharging normally, which becomes instead state unknown, and the only thing that will restore the battery charge is believe it or not taking out the battery and reinserting it. I am working to reproduce the problem, but I know very little about the power management in linux, and find the gentoo wiki to be difficult to be following in this case, given the many descriptions the wiki has for doing this, and the other potential problems of not knowing which is in use by the session or environment.

It seems like pm-suspend is working fine, but also pm-hibernate is not working (I think just because I need to increase my swap space).

I am using a desktop environment which is MATE session. Does the approach for hibernating or suspending to either RAM or disk depend on this fact? I can provide whatever information about either the pm-hibernate cycle or suspend one too.

Code:
Machine_West /var/log/kernel # emerge -pv mate-power-manager

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] mate-extra/mate-power-manager-1.18.0::gentoo  USE="applet -gnome-keyring -pm-utils -policykit -systemd {-test}" 0 KiB


Here's my system info:
https://paste.pound-python.org/show/apYhxA3jeO96T7rAuFae/

Recent dmesg output yesterday:
https://paste.pound-python.org/show/xMRkYCF9h8DyRbrgT4O4/
https://paste.pound-python.org/show/iOBLs5Vpj54KbXIR0Ctr/


Update: tried with mate-power-manager to implement use flag for pm-utils

But here is what I'm getting, in terms of the package conflict when merging:
Code:

Calculating dependencies... done!
[ebuild  N     ] sys-power/upower-pm-utils-0.9.23-r2::gentoo  USE="introspection -ios" 416 KiB
[ebuild   R    ] mate-extra/mate-power-manager-1.18.0::gentoo  USE="applet pm-utils* -gnome-keyring -policykit -systemd {-test}" 0 KiB
[blocks B      ] sys-power/upower ("sys-power/upower" is blocking sys-power/upower-pm-utils-0.9.23-r2)

Total: 2 packages (1 new, 1 reinstall), Size of downloads: 416 KiB
Conflict: 1 block (1 unsatisfied)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (sys-power/upower-pm-utils-0.9.23-r2:0/0::gentoo, ebuild scheduled for merge) pulled in by
    >=sys-power/upower-pm-utils-0.9.23 required by (mate-extra/mate-power-manager-1.18.0:0/0::gentoo, ebuild scheduled for merge)

  (sys-power/upower-0.99.7:0/3::gentoo, installed) pulled in by
    >=sys-power/upower-0.9.23 required by (mate-base/mate-applets-1.18.1-r1:0/0::gentoo, installed)
    sys-power/upower required by @selected



It would appear that one issue might be with the different methods used by consolekit or the session manager in this case...that could be blocking the upower currently installed. Is that an option for me to bypass it? Remove and rebuild with upower-pm-utils which is specifically advised against doing in the wiki. Or maybe I am doing something else wrong.


Last edited by LIsLinuxIsSogood on Sat Jan 06, 2018 9:58 am; edited 3 times in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sat Jan 06, 2018 10:00 am    Post subject: Reply with quote

LIsLinuxIsSogood wrote:
Should I assume the issue is the size of the swap?

LIsLinuxIsSogood ... quite possibly, swap should be equal to, or greater than, the size of RAM for suspend/hibernate (as it is writing memory to disk/swap). 512MB would seem an unlikely equivalent to available RAM.

Code:
# cat /sys/power/tuxonice/resume
swap:/dev/mapper/vg-swap
# lvdisplay /dev/mapper/vg-swap | grep 'LV.Size'
  LV Size       2.00 GiB
# free -m | awk '/^Mem/{print $2}'
2005

HTH & best ... khay
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1013

PostPosted: Sat Jan 06, 2018 10:32 am    Post subject: Reply with quote

Thanks khayam, looks like from what you've provided with to me I can get started on implementing a way, but have you also heard of another power management utility called tlp, which I just looked up seems to have some features for working with pm-utils.

https://github.com/dywisor/tlp-gentoo-additions
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1013

PostPosted: Sat Jan 06, 2018 10:40 am    Post subject: Reply with quote

What's confusing is that pm-suspend DOES work, while pm-hibernate DOES NOT. Also would the following mean that I really must have 8GB swap space, in order to perform the s2ram or hibernate or whatever...

vendor: Kingston
physical id: 0
serial: 44022012
slot: Bottom-Slot 1(left)
size: 8GiB
width: 64 bits
clock: 1600MHz (0.6ns)
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sat Jan 06, 2018 12:28 pm    Post subject: Reply with quote

LIsLinuxIsSogood wrote:
Thanks khayam, looks like from what you've provided with to me I can get started on implementing a way, but have you also heard of another power management utility called tlp, which I just looked up seems to have some features for working with pm-utils.

LIsLinuxIsSogood ... you're welcome. I couldn't say, I don't use pm-utils.

LIsLinuxIsSogood wrote:
What's confusing is that pm-suspend DOES work, while pm-hibernate DOES NOT. Also would the following mean that I really must have 8GB swap space, in order to perform the s2ram or hibernate or whatever...

I would suspect that 'pm-suspend' does suspend-to-ram (and so no swap is used), while 'pm-hibernate' does suspend-to-disk, which probably fails due to a lack of disk space to write the contents of RAM (8GB) to swap (512MB). s2ram will not be effected by the amount of swap, only 'hibernate' (suspend-to-disk) ... but yes, you should have 8GB swap if using hibernation, because there is no way to know how much of RAM is occupied, and so how much swap may be needed. I'm not sure if the in kernel swsusp supports compression (which would allow for a significantly smaller swap), but tuxonice does.

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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