.. include:: /urls.rst .. _l14_ec_install: Install ======= .. _l14_ec_install_acpi_driver: EC ACPI Linux kernel driver --------------------------- * **Alpine Linux and derivatives:** ``sudo apk add librem-ec`` * :ref:`Arch Linux and derivatives ` * `Fedora `_ * `GUIX `_ * **PureOS:** ``sudo apt install librem-ec-acpi-dkms`` * `QubesOS `_ .. _l14_ec_install_acpi_driver_arch: Arch Linux ~~~~~~~~~~ .. note:: This has been tested on Linux 6.17 but may work on future versions. #. Install the packages ``dkms``, ``linux-headers``, and ``unzip``. .. code-block:: bash sudo pacman -S dkms linux-headers unzip #. Download the ``librem-ec-dkms`` project from :download:`librem-ec-dkms `. #. Move to the download location (typically ``~/Downloads/``) and extract the project. .. code-block:: bash cd ~/Downloads/ unzip ./librem-ec-acpi-dkms-master.zip #. Copy the file ``dkms.conf`` from the ``debian/`` directory to the root of the source directory. .. code-block:: bash cp debian/librem-ec-acpi-dkms.dkms dkms.conf #. Modify the `dkms.conf` file in a text editor so that ``PACKAGE_VERSION`` is set to a value. .. code-block:: PACKAGE_NAME="librem_ec_acpi" PACKAGE_VERSION="1.0" BUILT_MODULE_NAME[0]="librem_ec_acpi" DEST_MODULE_LOCATION[0]="/updates/dkms" AUTOINSTALL="yes" #. Add and build the module using ``dkms``. .. code-block:: bash sudo dkms add ./ sudo dkms build librem_ec_acpi/1.0 sudo dkms install librem_ec_acpi/1.0 #. Reboot your computer. #. ``lsmod`` should show the ``librem_ec_acpi`` module. .. code-block:: bash lsmod | grep librem_ec_acpi librem_ec_acpi 20480 0 #. You should also see new files to control the battery: * ``/sys/class/power_supply/BAT0/charge_control_start_threshold`` * ``/sys/class/power_supply/BAT0/charge_control_end_threshold`` #. You can check the values with the commands: * .. code-block:: bash cat /sys/class/power_supply/BAT0/charge_control_start_threshold 40 * .. code-block:: bash cat /sys/class/power_supply/BAT0/charge_control_end_threshold 95