Metadata-Version: 2.1
Name: asus-charge-daemon
Version: 0.1.0
Summary: A daemon exposing D-Bus services for managing the charge level of recent ASUS notebooks.
Home-page: https://github.com./cforrester1988/asus-charge-daemon
License: GPL-3.0-or-later
Author: Christopher Forrester
Author-email: christopher@cforrester.ca
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: No Input/Output (Daemon)
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System
Requires-Dist: asus-charge-control (>=1.0.3,<2.0.0)
Requires-Dist: dbus-next (>=0.2.2,<0.3.0)
Requires-Dist: systemd-python (>=234,<235)
Description-Content-Type: text/markdown

# 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**

### Manual Installation

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```:

```console
sudo apt install python3
```

On Arch-based distributions, use ```pacman```:

```console
sudo pacman -Syu python
```

On RHEL/Fedora-based distributions, use ```rpm```:

```console
sudo rpm -i python3
```

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.

Clone the git repository locally:

```console
$ 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:

```console
cd asus-charge-daemon
sudo ./install.py install
```

To update, pull the latest changes and reinstall:

```console
git pull
sudo ./install.py reinstall
```

To uninstall, run the installation script again:

```console
sudo ./install.py uninstall
```

## Version history

- 0.1.0 (2021-01-23)
  - Initial release.

