Problem installing librem-ec-acpi-dkms in qubes 4.1

I’m trying to follow these instructions to install librem-ec-acpi-dkms on a librem 14 in qubes 4.1 Install librem-ec-acpi-dkms in Qubes ($1170) · Snippets · Snippets · GitLab

The instructions say:

sudo qubes-dom0-update dkms kernel-devel
sudo qubes-dom0-update flex bison
sudo cp /boot/config-`uname -r` /usr/src/kernels/`uname -r`/.config

but my uname -r equals to 5.10.90-1.qubes.x86_64 and the folder /usr/src/kernels/5.10.90-1.qubes.x86_64 doesn’t exist, only the folder /usr/src/kernels/5.10.112-1.fc32.qubes.x86_64

Anyone knows how to fix this?

You’re booting with old kernel 5.10.90-1.qubes.x86_64 in dom0 instead new 5.10.112-1.fc32.qubes.x86_64.
Check your grub config to see if the new kernel is there or not.
If you’ve installed Qubes in BIOS mode then check this file:
/boot/grub2/grub.cfg
For UEFI check this file:
/boot/efi/EFI/qubes/grub.cfg
If the new kernel is missing in boot menu options then try to regenerate grub in dom0:
grub2-mkconfig -o /boot/grub2/grub.cfg
or
grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg

UPD:
If you really need to use old kernel then you can install kernel-devel package for older kernel like this:
sudo qubes-dom0-update kernel-devel-1000:5.10.90-1.fc32.qubes

I did both

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg

and restarted and uname -r still gives 5.10.90-1.qubes.x86_64

I dont need to use any specific kernel except to install librem-ec-acpi-dkms

I just tried with a fresh install too and still have the same problem

Check if you’re using UEFI or BIOS:
ls /sys/firmware/efi
Do you have this directory?

no, I don’t.

Then you’re using BIOS mode and you need to run this command to regenerate your grub:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Did you reboot your Qubes after running grub2-mkconfig?
If not then reboot and check if you have new kernel now:
uname -r

I did
sudo qubes-dom0-update dkms kernel-devel
it said kernel-devel-1000:5.10.112.1.fc32.qubes.x86_64 is already installed
then I did sudo grub2-mkconfig -o /boot/grub2/grub.cfg
it said

generating grub configuration files ...
found theme: /boot/grub2/themes/qubes/theme.txt
found linux image /boot/vmlinuz-5.10.90-1.fc32.qubes.x86_64
found initrd image: /boot/initramfs-5.10.90-1.fc32.qubes.x86_64.img
found linux image /boot/vmlinuz-5.10.90-1.fc32.qubes.x86_64
found initrd image: /boot/initramfs-5.10.90-1.fc32.qubes.x86_64.img
done

then I did sudo reboot and after reboot uname -r and it’s still 5.10.90-1.fc32.qubes.x86_64

Did you update your dom0 to the latest updates?
Check if you have kernel 5.10.112.1.fc32.qubes.x86_64 installed:
dnf list | grep kernel.x86_64

it’s a fresh install, I didnt do anything other than sudo qubes-dom0-update dkms kernel-devel and sudo qubes-dom0-update flex bison . so I guess not?

the output of dnf list | grep kernel.x86_64 is

kernel.x86_64     1000:5.10.90-1.fc32.qubes      @anaconda

Then update your dom0 and reboot so you’ll have latest kernel used by dom0 then you can continue with your librem-ec-acpi-dkms install:

sudo cp /boot/config-`uname -r` /usr/src/kernels/`uname -r`/.config
...
1 Like

that worked thanks