View previous topic :: View next topic |
Author |
Message |
guanzd88 n00b
Joined: 17 Feb 2024 Posts: 5
|
Posted: Sat Feb 17, 2024 10:23 am Post subject: [SOLVED] FATAL: Module nvidia not found in director |
|
|
I am currently deploying my Gentoo (systemd). Everything goes well, but nvidia-driver.
Here are operations that I did so far:
1. To avoid issues caused by inappropriate kernel configuration, the gentoo-kernel-bin was currently installed. Here is the output of command `uname -a`:
Code: |
Linux ubuntu.lan 6.7.4-gentoo-dist #1 SMP PREEMPT_DYNAMIC Tue Feb 6 12:44:25 -00 2024 x86_64 Intel(R) Core(TM) i9-9900 CPU @ 3.10GHz GenuineIntel GNU/Linux
|
2. USE="dist-kernel" has been set in make.conf to make sure that nvidia driver auto rebuild will be triggered in every kernel update.
3. Manually map "/usr/src/linux" symbolink to make sure that it points to the correct kernel that I want to build against. Here is the output of `ls -l /usr/src`
Code: |
guanzd@ubuntu /usr/src $ ls -l
total 4
drwxr-xr-x 1 root root 36 Feb 16 23:11 config
lrwxrwxrwx 1 root root 23 Feb 17 12:44 linux -> linux-6.7.4-gentoo-dist
drwxr-xr-x 1 root root 2038 Feb 17 00:27 linux-6.2.12-gentoo
drwxr-xr-x 1 root root 2054 Feb 17 11:50 linux-6.7.4-gentoo
drwxr-xr-x 1 root root 346 Feb 17 16:22 linux-6.7.4-gentoo-dist
|
As you may see that, I have more than 1 kernel have been installed historically. It is because I start my installation in virtual box in April, 2023. Last week, I decided to migrate Gentoo to host machine. On kernel "linux-6.2.12-gentoo", I tried to installed latest version of nvidia-drivers. Fortunately, it worked! I found "video" folder in '/lib/modules/linux-6.2.12-gentoo" ! Then, and tried to configure "linux-6.7.4-gentoo" kernel and compile it for the latest nvidia-drivers, but failed with "Module nvidia not found in directory". Finally, I installed the distribution kernel "linux-6.7.4-gentoo-dist" and removed the above 2 kernels, but failed with "FATAL: Module nvidia not found in directory".
Here is list for kernel installed on my system:
Code: |
guanzd@ubuntu /usr/src $ eselect kernel list
Available kernel symlink targets:
[1] linux-6.7.4-gentoo-dist *
|
4. Running compilation on target kernel. Currently, I am running compilation on linux-6.7.4-gentoo-dist for nvidia driver kernel module.
5. I have tried to run "emerge -e nvidia-drivers", failed with "module nvidia not found"
6. Put USE flag "modules" into make.conf, and re-compiled nvidia-drivers. Nothing changed.
Here is my make.conf file:
Code: |
# /usr/share/portage/config/make.conf.example
# GCC
CFLAGS="-march=haswell -O2 -pipe"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
MAKEOPTS="-j15"
# USE
SUPPORT="pulseaudio btrfs mtp git chromium udev alsa dist-kernel gtk2 gtk3 modules"
DESKTOP="infinality emoji cjk"
FUCK="-bindist -grub -plymouth -systemd consolekit -modemmanager -gnome-shell -gnome -gnome-keyring -nautilus -modules -pulseaudio"
ELSE="client icu sudo python suid dbus X"
USE="${SUPPORT} ${DESKTOP} ${FUCK} ${ELSE}"
# Portage
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
# GENTOO_MIRRORS="https://mirrors.tuna.tsinghua.edu.cn/gentoo/"
GENTOO_MIRRORS="https://mirrors.ustc.edu.cn/gentoo/"
EMERGE_DEFAULT_OPTS="--ask --verbose=y --keep-going --with-bdeps=y --load-average"
# FEATURES="${FEATURES} -userpriv -usersandbox -sandbox"
PORTAGE_REPO_DUPLICATE_WARN="0"
# PORTAGE_TMPDIR="/var/tmp/notmpfs"
PORTDIR_OVERLAY=/usr/local/portage
ACCEPT_KEYWORDS="~amd64"
ACCEPT_LICENSE="*"
# Language
L10N="en-US zh-CN en zh"
LINGUAS="en_US zh_CN en zh"
# Else
INPUT_DEVICES="libinput synaptics"
VIDEO_CARDS="nvidia"
RUBY_TARGETS="ruby24 ruby25"
LLVM_TARGETS="X86"
QEMU_SOFTMMU_TARGETS="alpha aarch64 arm i386 mips mips64 mips64el mipsel ppc ppc64 s390x sh4 sh4eb sparc sparc64 x86_64"
QEMU_USER_TARGETS="alpha aarch64 arm armeb i386 mips mipsel ppc ppc64 ppc64abi32 s390x sh4 sh4eb sparc sparc32plus sparc64"
# ABI_X86="64 32"
|
What else should I do to get nvidia-drivers working?
Thanks!
Last edited by guanzd88 on Sat Feb 17, 2024 2:10 pm; edited 4 times in total |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2892
|
Posted: Sat Feb 17, 2024 10:40 am Post subject: |
|
|
Your make.conf has:
Code: | =" ... -modules ..." | USE=-modules on nvidia-drivers will unsurprisingly not give you modules (disabling that is intended for chroot or prefix where the modules were installed some other way). |
|
Back to top |
|
|
guanzd88 n00b
Joined: 17 Feb 2024 Posts: 5
|
Posted: Sat Feb 17, 2024 10:55 am Post subject: |
|
|
Ionen wrote: | Your make.conf has:
Code: | =" ... -modules ..." | USE=-modules on nvidia-drivers will unsurprisingly not give you modules (disabling that is intended for chroot or prefix where the modules were installed some other way). |
Thanks for your reply! I forgot to mention that I put "USE=modules" intentionally to see if there are any changes will be made. Because, in wiki(https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers), it says that USE flags "modules" represents "Build the kernel modules".
As expected, it failed with "Module nvidia not found in directory". |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2892
|
Posted: Sat Feb 17, 2024 12:33 pm Post subject: |
|
|
You're currently doing "modules -modules" (aka enable it then disable it)
I'd suggest looking at the portage output to see whether it is really enabled with -v/--verbose, e.g.
Code: | $ emerge -pvq nvidia-drivers
[ebuild R ] x11-drivers/nvidia-drivers-550.40.07 USE="X dist-kernel modules static-libs strip tools -kernel-open -modules-compress -modules-sign -persistenced -powerd -wayland" ABI_X86="32 (64)" | shows modules rather than -modules.
Also it's enabled by default, so there's no need to add "modules" to your make.conf. The problem is that you are explicitly disabling it. |
|
Back to top |
|
|
guanzd88 n00b
Joined: 17 Feb 2024 Posts: 5
|
Posted: Sat Feb 17, 2024 2:03 pm Post subject: |
|
|
Ionen wrote: | You're currently doing "modules -modules" (aka enable it then disable it)
I'd suggest looking at the portage output to see whether it is really enabled with -v/--verbose, e.g.
Code: | $ emerge -pvq nvidia-drivers
[ebuild R ] x11-drivers/nvidia-drivers-550.40.07 USE="X dist-kernel modules static-libs strip tools -kernel-open -modules-compress -modules-sign -persistenced -powerd -wayland" ABI_X86="32 (64)" | shows modules rather than -modules.
Also it's enabled by default, so there's no need to add "modules" to your make.conf. The problem is that you are explicitly disabling it. |
Ah... got it! I just copied make.conf from online source without careful review.
I figured it out! Thank you soooo much! |
|
Back to top |
|
|
|