Bruno
12/22/2025, 2:48 PMquay.io/fedora-ostree-desktops/sway-atomic, and in the docs it says the akmods module is only supported on ublue base images.
I'm a bit lost here, I've never done anything with kernel modules, if I could get any example I could modify to make the kernel module work in my image it would really help me.
This is my image: https://github.com/obispobruno/ublueAnswer Overflow
12/22/2025, 2:48 PMgmpinder
12/22/2025, 3:20 PMgmpinder
12/22/2025, 3:20 PMgmpinder
12/22/2025, 3:23 PMBruno
12/22/2025, 3:31 PMbash
#!/usr/bin/env bash
git clone https://github.com/Fred78290/nct6687d
cd nct6687d
make akmod
sorry if the question is too basic, as I said I'm a bit lost with kernel modsgmpinder
12/22/2025, 3:36 PMBruno
12/22/2025, 3:37 PMgmpinder
12/22/2025, 3:37 PMBruno
12/22/2025, 3:38 PMBruno
12/22/2025, 3:38 PMgmpinder
12/22/2025, 3:45 PMgmpinder
12/22/2025, 3:45 PMBruno
12/22/2025, 3:46 PMBruno
12/22/2025, 3:46 PMgmpinder
12/22/2025, 3:46 PMBruno
12/22/2025, 3:51 PMBruno
12/22/2025, 4:03 PM[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 After this operation, 140 KiB extra will be used (install 140 KiB, remove 0 B).
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 Is this ok [y/N]: Package Arch Version Repository Size
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 Installing:
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 akmod-nct6687d x86_64 1.0.155-git2f40c7e @commandline 29.5 KiB
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 kmod-nct6687d x86_64 1.0.155-git2f40c7e @commandline 0.0 B
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 nct6687d noarch 1.0.155-git2f40c7e @commandline 8.0 B
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 Installing dependencies:
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 akmods noarch 0.6.2-3.fc42 updates 65.3 KiB
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 grubby x86_64 8.40-82.fc42 fedora 45.4 KiB
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 kernel-devel-matched x86_64 6.17.13-200.fc42 updates 0.0 B
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 Transaction Summary:
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 Installing: 6 packages
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.65 Operation aborted by the user.
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.67 make: *** [Makefile:44: akmod/install] Error 1
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 40.67 ============================ Failed 'script' Module ============================
[15:55:14 g.i/o/ublue-sway-custom:latest] => #79 ERROR: process "/bin/sh -c /tmp/scripts/run_module.sh 'script'Bruno
12/22/2025, 4:03 PMBruno
12/22/2025, 4:03 PMBruno
12/22/2025, 4:11 PMgmpinder
12/22/2025, 4:13 PMsudo dnf install /tmp/files/scripts/nct6687d/.tmp/rpmbuild/RPMS/*/*.rpmgmpinder
12/22/2025, 4:13 PM-ygmpinder
12/22/2025, 4:19 PMbash
cp /etc/dnf/dnf.conf /etc/dnf/dnf.conf.bak
echo 'assumeyes=True' | tee -a /etc/dnf/dnf.conf
# other code ...
# Reset config
rm -f /etc/dnf/dnf.conf
mv /et/etc/dnf/dnf.conf.bak /etc/dnf/dnf.confBruno
12/22/2025, 4:24 PMBruno
12/22/2025, 4:24 PMBruno
12/22/2025, 6:30 PMbash
#!/usr/bin/env bash
set -oue pipefail
cp /etc/dnf/dnf.conf /etc/dnf/dnf.conf.bak
echo 'assumeyes=True' | tee -a /etc/dnf/dnf.conf
git clone https://github.com/Fred78290/nct6687d
cd nct6687d
make akmod
cd ..
rm -rf nct6687d
rm -f /etc/dnf/dnf.conf
mv /etc/dnf/dnf.conf.bak /etc/dnf/dnf.conf
but when I run sensors the system fans do not appear. do I need to load the kernel module? in the docs it says:
markdown
## Load(prob) Sensors on boot
To make it loaded after system boots
Just add nct6687 into /etc/modules
`sudo sh -c 'echo "nct6687" >> /etc/modules'`
### Arch-Linux with systemd
`sudo sh -c 'echo "nct6687" >> /etc/modules-load.d/nct6687.conf'`
I run the arch systemd command and rebooted but it does not appear on kmod list | grep nct6687.
I can see it installed correctly with:
bash
$ dnf ls --installed | grep nct6687
akmod-nct6687d.x86_64 1.0.155-git2f40c7e @commandline
kmod-nct6687d.x86_64 1.0.155-git2f40c7e @commandline
nct6687d.noarch 1.0.155-git2f40c7e @commandlinegmpinder
12/22/2025, 6:32 PMecho "nct6687" >> /etc/modules to your script should workBruno
12/22/2025, 6:33 PMgmpinder
12/22/2025, 6:35 PMBruno
12/22/2025, 7:34 PM/lib/modules/6.17.13-200.fc42.x86_64 . Any idea why? it shows as installed with dnf thoughgmpinder
12/22/2025, 7:41 PMinitramfs module](https://blue-build.org/reference/modules/initramfs/) afterwardsgmpinder
12/22/2025, 7:41 PMBruno
12/22/2025, 7:42 PMgmpinder
12/22/2025, 7:42 PMBruno
12/22/2025, 7:43 PM[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.44 >>> Created symlink '/etc/systemd/system/multi-user.target.wants/akmods.service'
[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.44 >>>
[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.46 [6/8] Installing akmod-nct6687d-0:1.0.1 100% | 1.5 MiB/s | 30.0 KiB | 00m00s
[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.46 >>> Running %post scriptlet: akmod-nct6687d-0:1.0.155-git2f40c7e.x86_64
[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.46 >>> Non-critical error in %post scriptlet: akmod-nct6687d-0:1.0.155-git2f40c7e.x
[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.46 >>> Scriptlet output:
[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.46 >>> Building /usr/src/akmods/nct6687d-kmod-1.0.155-git2f40c7e.src.rpm for kernel
[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.46 >>> ERROR: Not to be used as root; start as user or 'akmodsbuild' instead.
[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.46 >>>
[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.46 >>> [RPM] %post(akmod-nct6687d-1.0.155-git2f40c7e.x86_64) scriptlet failed, exit
[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.46 [7/8] Installing nct6687d-0:1.0.155-git 100% | 136.7 KiB/s | 280.0 B | 00m00s
[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.83 [8/8] Installing kmod-nct6687d-0:1.0.15 100% | 339.0 B/s | 124.0 B | 00m00s
[18:42:35 g.i/o/ublue-sway-custom:latest] => #79 39.83 Warning: skipped OpenPGP checks for 3 packages from repository: @commandline
[18:42:36 g.i/o/ublue-sway-custom:latest] => #79 39.83 Complete!gmpinder
12/22/2025, 7:46 PMfiftydinar
12/22/2025, 8:35 PMBruno
12/22/2025, 9:53 PMbash
#!/usr/bin/env bash
set -euo pipefail
REPO_URL="https://github.com/Fred78290/nct6687d"
WORKDIR="$(mktemp -d)"
cleanup() {
rm -rf "${WORKDIR}"
}
trap cleanup EXIT
# IMPORTANT:
# - This script runs during the image build, inside a container.
# - `uname -r` would report the GitHub runner kernel, not the kernel shipped in the image.
# So we derive the target kernel version from the image's /usr/lib/modules instead.
if [[ -d /usr/lib/modules ]]; then
KVER="$(ls -1 /usr/lib/modules | sort -V | tail -n1)"
else
echo "ERROR: /usr/lib/modules not found; cannot determine target kernel version" >&2
exit 1
fi
dnf -y install \
gcc \
git \
kmod \
make \
elfutils-libelf-devel \
"kernel-devel-${KVER}" \
kernel-core
cd "${WORKDIR}"
git clone --depth=1 "${REPO_URL}" nct6687d
cd nct6687d
# Build against the kernel shipped in the image (KVER), not the build host kernel.
make -C "/usr/lib/modules/${KVER}/build" M="$PWD" modules
KO_SRC="$(find . -maxdepth 2 -type f -name '*.ko' | head -n1 || true)"
if [[ -z "${KO_SRC}" ]]; then
echo "ERROR: build succeeded but no .ko file was produced" >&2
exit 1
fi
KO_DEST="/usr/lib/modules/${KVER}/extra/$(basename "${KO_SRC}")"
install -D -m 0644 "${KO_SRC}" "${KO_DEST}"
depmod -a "${KVER}"
# Ensure the module is loaded on boot (Fedora uses systemd-modules-load, not /etc/modules).
MODNAME="$(modinfo -F name "${KO_DEST}" 2>/dev/null || true)"
if [[ -n "${MODNAME}" ]]; then
install -D -m 0644 /dev/stdin "/usr/lib/modules-load.d/${MODNAME}.conf" <<<"${MODNAME}"
fi