You are not logged in.
Hello everyone,
I have a Lenovo Thinkpad T460s, a laptop that comes with two batteries. I found it had a short battery life so I investigated, and learnd that the laptop shutdowns after only one battery is depleted.
I previously had a T440s which also had two batteries and didn't show that problem, or maybe I just wasn't aware of it.
What I can say is that, on the T460s, the two batteries are completely seen and managed by the system.
% for bat in /sys/class/power_supply/BAT*/; do echo "$bat $(cat $bat/capacity)"; done
/sys/class/power_supply/BAT0/ 65
/sys/class/power_supply/BAT1/ 100
When I reboot (without having the laptop charged nor with the AC adapter connected) it starts draining the other battery like nothing happened.
I suspect a signal being send by systemd when one of the battery is fully discharged or something like that. Also, maybe it's not normal to have only battery used by the system and that instead it should drains the two, but at this point it goes beyond my current knowledge.
Your help to further investigate and resolve this issue would be much appreciated,
thanks,
Thomas
Last edited by tinh (2023-12-07 19:52:26)
Offline
I suspect a signal being send by systemd
Check your journal from a previous boot where the problem occurred (man journalctl). It should tell you if systemd decided to shut the system down, or if you simply ran out of juice and 'crashed'.
Offline
Ok, I let the laptop run until one battery is completely deplet. Then rebooted,
% for bat in /sys/class/power_supply/BAT*/; do echo "$bat $(cat $bat/capacity) $(cat $bat/status)"; done
/sys/class/power_supply/BAT0/ 0 Not charging
/sys/class/power_supply/BAT1/ 94 Discharging
and checked the lasts log of the previous boot with `journalctl -b -1`
Here's the output
% journalctl -b -1 | tail
Dec 08 14:55:52 hostname syncthing[405]: [J6A6D] INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: lookup relays.syncthing.net on [::1]:53: read udp [::1]:54540->[::1]:53: read: connection refused
Dec 08 14:57:03 hostname syncthing[405]: [J6A6D] INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
Dec 08 14:57:03 hostname syncthing[405]: [J6A6D] INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
Dec 08 14:57:03 hostname syncthing[405]: [J6A6D] INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: lookup relays.syncthing.net on [::1]:53: read udp [::1]:43686->[::1]:53: read: connection refused
Dec 08 14:57:03 hostname syncthing[405]: [J6A6D] INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
Dec 08 14:57:03 hostname syncthing[405]: [J6A6D] INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
Dec 08 14:57:03 hostname syncthing[405]: [J6A6D] INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: lookup relays.syncthing.net on [::1]:53: read udp [::1]:57189->[::1]:53: read: connection refused
Dec 08 14:57:03 hostname syncthing[405]: [J6A6D] INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
Dec 08 14:57:03 hostname syncthing[405]: [J6A6D] INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
Dec 08 14:57:03 hostname syncthing[405]: [J6A6D] INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: lookup relays.syncthing.net on [::1]:53: read udp [::1]:46997->[::1]:53: read: connection refused
So appart from unrelated synchting not finding peers, nothing mention a signal being sent to shutdown the computer. As you suggested I simply ran out of juice and 'crashed'.
Offline
To be 100% sure: you ran the journalctl command as root? Because if those are the last entries, then the system wasn't shut down properly and crashed, for sure.
What are you running on this laptop in terms of configuration for power management, login manager, etc.?
Offline
To be 100% sure: you ran the journalctl command as root? Because if those are the last entries, then the system wasn't shut down properly and crashed, for sure.
I did not. But just did as root and found no differences in the log (trimmed of syncthing matching lines). Expect that one kernel line at the end.
# journalctl -b -1 | rg -iv syncthing | tail
Dec 08 14:05:44 hostname rtkit-daemon[810]: Supervising 8 threads of 5 processes of 1 users.
Dec 08 14:05:44 hostname rtkit-daemon[810]: Supervising 8 threads of 5 processes of 1 users.
Dec 08 14:05:44 hostname rtkit-daemon[810]: Supervising 8 threads of 5 processes of 1 users.
Dec 08 14:05:44 hostname rtkit-daemon[810]: Supervising 8 threads of 5 processes of 1 users.
Dec 08 14:06:14 hostname rtkit-daemon[810]: Supervising 8 threads of 5 processes of 1 users.
Dec 08 14:06:14 hostname rtkit-daemon[810]: Supervising 8 threads of 5 processes of 1 users.
Dec 08 14:06:14 hostname rtkit-daemon[810]: Supervising 8 threads of 5 processes of 1 users.
Dec 08 14:06:14 hostname rtkit-daemon[810]: Supervising 8 threads of 5 processes of 1 users.
Dec 08 14:15:47 hostname wpa_supplicant[398]: wlp4s0: Reject scan trigger since one is already pending
Dec 08 14:33:40 hostname kernel: perf: interrupt took too long (2522 > 2500), lowering kernel.perf_event_max_sample_rate to 79200
So I guess it just crashed.
What are you running on this laptop in terms of configuration for power management, login manager, etc.?
Well, I run i3wm with ly as login manager.
And for the power manager tools, I guess I mostly rely on systemd and no other power manager tools. I have acpid package installed but the daemon is disabled and inactive and no TLP either
I'm unsure about the assertion on systemd part because, I don't remember having configuring it in any way, Could it be the "default" power manager tool, then?
Last edited by tinh (2023-12-09 18:00:31)
Offline
Try the Power Management diagnostic steps, specifically the ones that detect if the battery is sending discharge events to udev. I assume it does that for one battery but it doesn't recognize or support the 2nd battery slot. Assuming for the moment that the 2nd battery is sending events, then you should be able to add the configs as shown there to add the shutdown/hibernate hooks.
Offline