[L14 Battery] Constant discharge + Charge in Qubes

I can confirm that installing the librem_ec_acpi DKMS driver resolved the above problems. My guess is the bugs mentioned above, where the embedded controller gets into a stuck state, is what was happening. Nicole’s driver handles all ACPI notifications (see librem_ec_notify method). It would be nice if this driver made it to the upstream kernel particularly if the laptop is going to be marketed as the “best qubes laptop”.

For others, I used the following commands from dom0 (I tried to build a package to be copied and installed from dom0 using a fedora-25 template but ran into problem after problem so I went the direct DKMS route):

$ sudo qubes-dom0-update kernel-devel dkms gcc
$
$ sudo mkdir /usr/src/librem_ec_acpi-1.0.0 
$
$ # Create the following file with the contents below
$ sudo vim /usr/src/librem_ec_acpi-1.0.0/dkms.conf 
PACKAGE_NAME="librem_ec_acpi"
PACKAGE_VERSION="1.0.0"
BUILT_MODULE_NAME[0]="librem_ec_acpi"
DEST_MODULE_LOCATION[0]="/extra/"
AUTOINSTALL="yes"
$
$ sudo vim /usr/src/librem_ec_acpi-1.0.0/Makefile
obj-m                       += librem_ec_acpi.o

clean:
	rm -f *.o *.ko *~
	rm -f .librem_ec_acpi.* *.mod.c Module.symvers modules.order
	rm -fr .tmp_versions
	rm -f Makefile.xen
$
$ sudo vim /usr/src/librem_ec_acpi-1.0.0/librem_ec_acpi.c
<contents from https://source.puri.sm/nicole.faerber/librem-ec-acpi-dkms/-/blob/master/librem_ec_acpi.c>
$
$ sudo dkms build librem_ec_acpi/1.0.0
$
$ sudo dkms install librem_ec_acpi/1.0.0
5 Likes