#[SOLVED] laptop doesn't charge when it dies in Arch, but charges when it dies in Windows

36 messages · Page 1 of 1 (latest)

brave sage
#

i dualboot Arch and Win11 on this laptop. when it dies booted into Arch, it will refuse to charge and i hear a small crackling noise coming from the charging port. when it dies while booted into Windows, it charges and there's no crackling noise. my guess is that systemd or whatever is managing the ACPI sleep states isn't setting the sleep state properly when the battery dies, and i'm not sure how to reconfigure that. i read the Arch wiki pages on power management but i could only find sleep state stuff about sleeping and hibernation, nothing about shutting down or battery dying

EDIT: solution was to write a bash script called by a timed systemd service that shuts down my laptop at 5% battery, before it ever gets the chance to completely drain

scarlet nest
#

what type of charger is this? USB C or a barrel?

brave sage
#

USB-C

#

once i get Arch or Windows booted back up it'll charge just fine. it only doesn't charge when it dies while Arch is booted

scarlet nest
#

when arch was booted and it died, was it in sleep mode?

brave sage
#

i'm not sure if it was in sleep mode or hibernation

#

but i wasn't actively using it when it died

#

it was just sitting on my desk not doing anything

scarlet nest
#

can you run cat /sys/power/mem_sleep

brave sage
#

[s2idle] is all it returns

scarlet nest
#

hrm

#

do you have a SWAP partition?

#

because you could just set your laptop to hibernate on lid close rather than suspend to prevent this issue

brave sage
#

i do actually

#

it's 10 gigabytes so that should probably be enough

scarlet nest
#

do you use systemd?

brave sage
#

if you mean for my boot manager, i use GRUB

brave sage
#

i forgot if this laptop had 8 or 16

#

i guess i can shorten my Arch partition and rewrite the SWAP partition but if it's possible to avoid it i'd prefer not hibernating every time i close the lid because that's gonna end up using a bunch of SSD writes

scarlet nest
#

thats fair

#

how quickly does it drain when it is closed?

brave sage
#

iiiiiii don't really know lol i don't really keep track of it

scarlet nest
#

the honestly I am at a loss, if you dont want to hibernate then there isnt exactly another option for sleep, as apparently your hardware only advertises support for suspend to idle, but that is also what windows uses so that shouldnt be the cause

#

id make sure it actually goes into sleep mode kek

brave sage
#

is sleep just what it does when i close the lid or is that what it does when the computer is dying?

#

cmd says that nothing besides S0 is available

#

so i don't even know what sleep state this thing goes into when i close the lid or whatever

scarlet nest
#

s2idle

brave sage
#

the sleep state when the thing died?

#

hmm

scarlet nest
#

given that there is only 1 available sleep state its either s2idle or something was just making it not sleep

brave sage
#

is there a way that i can make Arch just stop everything and do a clean shutdown when the battery reaches say 5% to prevent this from happening?

scarlet nest