A daemon exposing D-Bus services for managing the charge level of recent ASUS notebooks.
Project description
asus-charge-daemon
A daemon exposing D-Bus services for managing the charge level of recent ASUS notebooks.
Recent ASUS notebooks come with a Windows application to set the maximum battery
charge level, in order to reduce stress on the battery and prolong its lifespan. On
Linux kernels >= version 5.4, the asus_nb_wmi
kernel module exposes a sysfs object to manage this setting.
asus-charge-daemon
is a system service that runs in the background, exposing a D-Bus interface on the System Bus, enabling userspace applications to manage the maximum battery charge level.
Installation
asus-charge-daemon should work with any device running a recent kernel (>= 5.4) with the asus_nb_wmi
module loaded. Use lsmod | grep asus_nb_wmi
to check; if you see a line like asus_nb_wmi 32768 0
, then the module is running.
It has been tested with the following ASUS notebooks:
- ASUS VivoBook 15 X512DA
A Python version >= 3.7 is necessary to run this daemon. Most Linux distributions come with the right version. To verify that Python is installed on Debian/Ubuntu-based distributions, use apt
:
sudo apt install python3
On Arch-based distributions, use pacman
:
sudo pacman -Syu python
On RHEL/Fedora-based distributions, use rpm
:
sudo rpm -i python3
Manual
A very rudimentary installation script is included for easy installation. It will copy the files to the appropriate places, install the Python modules, and run the system service.
Download and run the installation script:
curl https://raw.githubusercontent.com/cforrester1988/asus-charge-daemon/main/install.py -o install.py
chmod +x install.py
sudo ./install.py install
To update, run the installation script again, as above. To uninstall:
sudo ./install.py uninstall
git version
Clone the git repository locally:
$ git clone https://github.com/cforrester1988/asus-charge-daemon.git
Cloning into 'asus-charge-daemon'...
Navigate to the directory you cloned the repository into, and run the installation script. Append local
to work with the cloned package, instead of downloading it from PyPI.
cd asus-charge-daemon
sudo ./install.py install local
To update, pull the latest changes and reinstall:
git pull
sudo ./install.py reinstall local
To uninstall, run the installation script again:
sudo ./install.py uninstall
Version history
-
0.3.0 (2021-02-07)
- (feature) Desktop notifications
- (feature) Monitor threshold for outside changes
- (feature) Monitor config for changes
-
0.2.0 (2021-01-23)
- Initial public release.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file asus-charge-daemon-0.3.2.tar.gz
.
File metadata
- Download URL: asus-charge-daemon-0.3.2.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.11.0-1-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bd7b623d0e740bfc22da456f6a0232af0014e246ee5ff84c3fc40bb2b842bbc |
|
MD5 | e003dd130a5d48a80054be39422ba596 |
|
BLAKE2b-256 | f84ecfb6bb62872f326b77bab1258b890af342871a5449db75a793692f1a94c1 |
File details
Details for the file asus_charge_daemon-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: asus_charge_daemon-0.3.2-py3-none-any.whl
- Upload date:
- Size: 23.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.11.0-1-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a142e7efb182b4fa8cfe07edb27efaf26b4b4ea14bacf61a3ab5b883410ceecd |
|
MD5 | faa838714941229b83055dec7eeab0eb |
|
BLAKE2b-256 | bbd02e5772025713db02e6d98a3ef362efe01a6f841a4a0cf7f8e647fa5124f2 |