My laptop sits on a desk 80% of the time, so fully charging the battery is a Bad Idea TM. I can set the charge limit to 90%, which works, but when I shut the machine down at the end of my work day the setting seems to get lost: when I start it up the next day the Charge Limit is back to 100%.
It’s a clean Manjaro install from a week ago, with ‘pamac update -a’ having been run today.
Any suggestions of what I can investigate to solve this?
I followed @bogdancovaciu 's instructions and the settings still weren’t retained.
Please note who I was replying to. When I asked “But what’s the point of implementing a GUI that doesn’t work?” it was in response to @ajaychat3 's post, who said: “I am using Manjaro KDE and face the same issue every time after shutdown. using a system service route to set the charging limit.”
So, what do I do next? The setting isn’t getting retained. What can I do to investigate this? Should I report it somewhere? Where do I report an issue like this? Is this a problem with the KDE settings interface and should I report it to KDE? Is there a way for me to confirm it’s a problem with the KDE settings and not a problem with the Manjaro specific implementation of those settings? I have looked on other laptops I have access to that run Manjaro and they don’t even have the option to set a charge limit, so I haven’t been able to compare between machines. From what @ajaychat3 said it seems pretty clear that the GUI setting isn’t getting retained in his case, either.
Is there a workaround while I wait for this to get fixed upstream? @ajaychat3 seemed to indicate that it can be fixed by editing some settings file somewhere directly, but didn’t say what specific setting in what file.
Then we can move on to the next stage of the investigation.
We didn’t concluded yet if is a local issue for you and @ajaychat3 - and while there are multiple ways around this, the classic approach might be better.
Are the files ~/.config/powerdevilrc and ~/.config/powermanagementprofilesrc writable on your user, do your user owns those files?
After doing this, charge threshold of 80% (as per service file) will persist between reboots. It will also stop charging the battery if the current level is above 80%. Hope this helps. I have been using it for almost 1.5 years without any issue.
The ~/.config folder is owned by my user and I have read and write to the directory. The file “powerdevilrc” doesn’t exist. “powermanagementprofilesrc” exists, and I have both read and write permissions. I checked, and powerdevil is installed.
These settings seem to be tied to a specific user and (in my limited understanding) only get loaded on user login, but surely “Charge Limit” is a system wide setting? For example, let’s say I have been on site, return to my office and dump my laptop on my desk to charge but I don’t log in, wouldn’t I still want to limit he charge to 90%, even without a user being logged on?
Apparently there is a bug report on this, but seems to be specific to some laptop models, and in the case of the OP of that issue report, it happens after booting to Windows …
The proposal is to go here Laptop/ASUS - ArchWiki and since your laptop is an ASUS, for sure will help.
More or less goes the same route as @ajaychat3 proposed, plus gives also a fix to persist from hibernate.