Akmods error when installing Nvidia drivers

Hello, I am trying to install Nvidia drivers on my Kinoite system as per this guide, but having some trouble doing so:

> sudo rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda xorg-x11-drv-nvidia-power xorg-x11-drv-nvidia-cuda-libs nvidia-vaapi-driver libva-utils vdpauinfo
Checking out tree cdf29f4... done
Enabled rpm-md repositories: fedora-cisco-openh264 updates fedora rpmfusion-free-updates rpmfusion-free rpmfusion-nonfree-updates rpmfusion-nonfree copr:copr.fedorainfracloud.org:phracek:PyCharm google-chrome rpmfusion-nonfree-steam rpmfusion-nonfree-nvidia-driver updates-archive
Importing rpm-md... done
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2025-03-19T16:53:39Z solvables: 6
rpm-md repo 'updates' (cached); generated: 2025-10-12T01:03:02Z solvables: 25138
rpm-md repo 'fedora' (cached); generated: 2025-04-09T11:06:59Z solvables: 76879
rpm-md repo 'rpmfusion-free-updates' (cached); generated: 2025-10-10T23:21:26Z solvables: 118
rpm-md repo 'rpmfusion-free' (cached); generated: 2025-04-12T09:12:27Z solvables: 358
rpm-md repo 'rpmfusion-nonfree-updates' (cached); generated: 2025-10-10T23:43:57Z solvables: 69
rpm-md repo 'rpmfusion-nonfree' (cached); generated: 2025-04-12T09:32:45Z solvables: 218
rpm-md repo 'copr:copr.fedorainfracloud.org:phracek:PyCharm' (cached); generated: 2025-10-09T05:56:40Z solvables: 10
rpm-md repo 'google-chrome' (cached); generated: 2025-10-11T21:01:49Z solvables: 4
rpm-md repo 'rpmfusion-nonfree-steam' (cached); generated: 2025-09-19T05:53:30Z solvables: 1
rpm-md repo 'rpmfusion-nonfree-nvidia-driver' (cached); generated: 2025-10-11T00:09:19Z solvables: 17
rpm-md repo 'updates-archive' (cached); generated: 2025-10-12T02:29:14Z solvables: 46385
Resolving dependencies... done
Will download: 11 packages (407.3 MB)
Downloading from 'updates'... done
Downloading from 'rpmfusion-nonfree-updates'... done
Importing packages... done
Applying 1 override and 146 overlays
Processing packages... done
Running systemd-sysusers... done
Running pre scripts... done
Running post scripts... done
error: While applying overrides for pkg akmods: Could not find group 'akmods' in group file

Relevant journalctl logs from that duration:

Oct 12 14:35:28 nan-af-fedora sudo[3320]:    afnan : TTY=pts/1 ; PWD=/var/home/afnan ; USER=root ; COMMAND=/usr/sbin/rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda xorg-x11-drv-nvidia-power xorg-x11-drv-nv>
Oct 12 14:35:28 nan-af-fedora rpm-ostree[2264]: client(id:cli dbus:1.124 unit:session-c3.scope uid:0) added; new total=1
Oct 12 14:35:28 nan-af-fedora rpm-ostree[2264]: Loaded sysroot
Oct 12 14:35:28 nan-af-fedora rpm-ostree[2264]: Locked sysroot
Oct 12 14:35:28 nan-af-fedora rpm-ostree[2264]: Initiated txn PkgChange for client(id:cli dbus:1.124 unit:session-c3.scope uid:0): /org/projectatomic/rpmostree1/fedora
Oct 12 14:35:28 nan-af-fedora rpm-ostree[2264]: Process [pid: 3345 uid: 0 unit: session-c3.scope] connected to transaction progress
Oct 12 14:35:44 nan-af-fedora rpm-ostree[2264]: Preparing pkg txn; enabled repos: ['fedora-cisco-openh264', 'updates', 'fedora', 'rpmfusion-free-updates', 'rpmfusion-free', 'rpmfusion-nonfree-updates', 'rpmfusion-nonfree', 'copr:copr.f>
Oct 12 14:35:44 nan-af-fedora rpm-ostree[2264]: Downloading: <...several lines of download URLs...>
Oct 12 14:47:12 nan-af-fedora rpm-ostree[2264]: Starting syncfs for system repo
Oct 12 14:47:13 nan-af-fedora rpm-ostree[2264]: Completed syncfs() for system repo in 806 ms
Oct 12 14:47:13 nan-af-fedora rpm-ostree[2264]: Imported 11 pkgs
Oct 12 14:47:16 nan-af-fedora rpm-ostree[2264]: Executed %prein for xorg-x11-drv-nvidia in 55 ms
Oct 12 14:47:16 nan-af-fedora rpm-ostree[2264]: Executed %post for grubby in 61 ms
Oct 12 14:47:16 nan-af-fedora rpm-ostree[2264]: Executed %post for nvidia-persistenced in 129 ms
Oct 12 14:47:16 nan-af-fedora rpm-ostree[2264]: Executed %post for fakeroot in 90 ms
Oct 12 14:47:16 nan-af-fedora rpm-ostree[2264]: Executed %post for kernel-devel in 50 ms
Oct 12 14:47:16 nan-af-fedora rpm-ostree[2264]: Txn PkgChange on /org/projectatomic/rpmostree1/fedora failed: While applying overrides for pkg akmods: Could not find group 'akmods' in group file
Oct 12 14:47:16 nan-af-fedora rpm-ostree[2264]: Unlocked sysroot
Oct 12 14:47:16 nan-af-fedora rpm-ostree[2264]: Process [pid: 3345 uid: 0 unit: session-c3.scope] disconnected from transaction progress
Oct 12 14:47:16 nan-af-fedora rpm-ostree[2264]: client(id:cli dbus:1.124 unit:session-c3.scope uid:0) vanished; remaining=0
Oct 12 14:47:16 nan-af-fedora rpm-ostree[2264]: In idle state; will auto-exit in 62 seconds
Oct 12 14:48:19 nan-af-fedora systemd[1]: rpm-ostreed.service: Deactivated successfully.
Oct 12 14:48:19 nan-af-fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=rpm-ostreed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succe>
Oct 12 14:48:19 nan-af-fedora systemd[1]: rpm-ostreed.service: Consumed 37.571s CPU time, 2.4G memory peak.

I have already tried manually creating the akmods user and group, but that did not help either. These are my current /etc/group and /usr/lib/group files:

> cat /etc/group
root:x:0:
wheel:x:10:afnan
afnan:x:1000:
akmods:x:995:
> cat /usr/lib/group
bin:x:1:
daemon:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
lp:x:7:
mem:x:8:
kmem:x:9:
wheel:x:10:
cdrom:x:11:
mail:x:12:
man:x:15:
dialout:x:18:
floppy:x:19:
games:x:20:
tape:x:33:
video:x:39:
ftp:x:50:
lock:x:54:
audio:x:63:
nobody:x:99:
users:x:100:
utmp:x:22:
utempter:x:35:
ssh_keys:x:999:
systemd-journal:x:190:
dbus:x:81:
polkitd:x:998:
etcd:x:997:
dip:x:40:
cgred:x:996:
tss:x:59:
avahi-autoipd:x:170:
rpc:x:32:
sssd:x:993:
dockerroot:x:986:
rpcuser:x:29:
nfsnobody:x:65534:
kube:x:994:
sshd:x:74:
chrony:x:992:
tcpdump:x:72:
input:x:104:
systemd-timesync:x:991:
systemd-network:x:990:
systemd-resolve:x:989:
systemd-bus-proxy:x:988:
cockpit-ws:x:987:
kvm:x:36:
clock:x:103:
render:x:105:
sgx:x:106:
brlapi:x:985:
gamemode:x:984:
plocate:x:983:
usershares:x:982:
printadmin:x:981:
power:x:980:
usbmuxd:x:113:
vboxsf:x:979:
colord:x:978:
dnsmasq:x:977:
flatpak:x:976:
geoclue:x:975:
mysql:x:974:
openvpn:x:973:
passim:x:972:
pipewire:x:971:
rtkit:x:172:
sddm:x:970:
systemd-coredump:x:969:
systemd-oom:x:968:
unbound:x:967:
avahi:x:70:
nm-openconnect:x:966:
nm-openvpn:x:965:

The default akmods group number and userid was 973 when I installed akmods on my system (Workstation). I don’t know if that may be an issue or not, but it might since installing the akmods package created that user and group for me.

Several user/group IDs are specifically designated to avoid conflicts

$ grep akmods /etc/passwd
akmods:x:973:973:User is used by akmods to build akmod packages:/var/cache/akmods/:/sbin/nologin

$ grep akmods /etc/group
akmods:x:973:

More rpm-ostree induced issues, they have had forever to fix this, many packages depend on user and groups setup.

I doubt the number matters.

leigh@leigh-pc:~$ grep akmods /etc/passwd
akmods:x:980:977:User is used by akmods to build akmod packages:/var/cache/akmods/:/sbin/nologin
leigh@leigh-pc:~$ grep akmods /etc/group
akmods:x:977:
leigh@leigh-pc:~$ 

akmods does not have a fixed uid/gid assigned.

$ cat /usr/lib/sysusers.d/akmods.conf 
#Type  Name  ID  GECOS  Home directory  Shell
g  akmods  -  -  -  -
u  akmods  -  'User is used by akmods to build akmod packages' /var/cache/akmods/ -

$ getent passwd  akmods
akmods:x:980:976:User is used by akmods to build akmod packages:/var/cache/akmods/:/sbin/nologin

It’s probably some rpm-ostree related issue. What is /usr/lib/group? Never seen such a file.

If you still struggle, I highly recommend switchint to universal blue images with nvidia. This is way better for stability and also update speed

With atomic systems that is the default group file that non-atomic systems find in /etc/group.
To add additional groups for users the user must then create the /etc/group file and use the usermod command to add users to groups in that file.

1 Like

See:

1 Like

I ran into this error today while updating F42 fedora/42/x86_64/kinoite after a few months of being offline (applying all system updates from 2025-04-19 to 2025-11-04).

Feels crude, but these steps worked for me:

  1. Pin the current deployment, just in case: sudo ostree admin pin 0
  2. Remove nVidia drivers wholesale: rpm-ostree uninstall xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda xorg-x11-drv-nvidia-cuda-libs. This will yoink akmods and a whole lot of build dependencies. Then reboot.
  3. Run full update to latest image for whatever version of Fedora you’re running, now without drivers: rpm-ostree update. Reboot again.
  4. Now do the final update to add drivers back again: rpm-ostree install xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda xorg-x11-drv-nvidia-cuda-libs. Reboot again. Verify the drivers are working (glxinfo | grep -e OpenGL.vendor -e OpenGL.renderer) and now pin this deployment, too. sudo ostree admin pin 0

I didn’t edit any system config. This whole uninstall-update-reinstall-back-again dance sufficed for making akmod install scripts work again.

P.S. In case you run out of space on boot from doing all this - like I did - and updates start failing with error Installing kernel: regfile copy: No space left on device try removing older unneeded deployments (rpm-ostree status for overview, ostree admin undeploy <number> to remove them).