You are not logged in.

#1 2022-08-24 08:45:58

tomadojuice
Member
Registered: 2022-08-24
Posts: 8

NVIDIA driver not loading after booting with rEFInd

Hello everyone!
I'm having issues with rEFInd, after booting and logging in, xorg tells me that no screens could be found which is because apparently no nvidia drivers could be found. But when booting with my current grub installation everything works just fine.

I'm quickly going to explain my system setup... I have two SSD's one of them is dedicated to Windows and contains the efi partition and on the other drive I have Arch and Ubuntu installed. I have recently discovered that my current bootloader (grub) is installed into the Ubuntu partition and since I don't need Ubuntu anymore and I want to uninstall it I want to change my bootloader to rEFInd and put it into my Arch partition.

I've installed rEFInd with the refind-install script which worked fine, it discovered all of my three operating systems and I can boot into Ubuntu and Windows without a problem but Arch did not boot. I then changed the Arch menuentry in my refind.conf too look like this.

menuentry "Arch Linux" {
    icon     /EFI/refind/icons/os_arch.png
    volume   "/dev/sdb3"
    loader   /boot/vmlinuz-linux-zen
    initrd   /boot/initramfs-linux-zen.img
    options  "root=PARTUUID=4d08eac6-6938-45de-966f-e1889e09f890 rw add_efi_memmap"
    submenuentry "Boot using fallback initramfs" {
        initrd /boot/initramfs-linux-fallback.img
    }
    submenuentry "Boot to terminal" {
        add_options "systemd.unit=multi-user.target"
    }
    disabled
}

It loads my kernel image (I'm using zen) on my Arch partition (/dev/sdb3). FYI: the PARTUUID shown is the UUID of /dev/sdb3
And with this setting it booted but as already mentioned, without the nvidia drivers.

This is my refind_linux.conf on /boot which I did not edit. It was created automatically.

"Boot with standard options"  "root=UUID=4d08eac6-6938-45de-966f-e1889e09f890 rw loglevel=3 quiet"
"Boot to single-user mode"    "root=UUID=4d08eac6-6938-45de-966f-e1889e09f890 rw loglevel=3 quiet single"
"Boot with minimal options"   "ro root=UUID=4d08eac6-6938-45de-966f-e1889e09f890"

I've already tried adding nvidia modules to my /etc/mkinitcpio.conf like this:

MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

and then recreating the images by caling sudo mkinitcpio -P but then it said module nvidia not found which I find weird because the nvidia drivers do work on my system. It might have something to do with my zen kernel because I actually had to install nvidia-dkms and don't have the nvidia package installed anymore.

Tell me if you need any other config files and I will post them here.
Thanks in advance

Offline

#2 2022-08-24 08:50:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,231

Re: NVIDIA driver not loading after booting with rEFInd

For DKMS packages to work correctly you need all the headers of the kernel you intend to compile the module for. Make sure linux-zen-headers is installed, maybe also post the output of

sudo dkms status
pacman -Q linux-zen{,-headers}
uname -a

Offline

#3 2022-08-24 08:58:48

tomadojuice
Member
Registered: 2022-08-24
Posts: 8

Re: NVIDIA driver not loading after booting with rEFInd

V1del wrote:

For DKMS packages to work correctly you need all the headers of the kernel you intend to compile the module for. Make sure linux-zen-headers is installed, maybe also post the output of

sudo dkms status
pacman -Q linux-zen{,-headers}
uname -a

I already have the headers installed that's why it works with grub.

linux-zen 5.19.3.zen1-1
linux-zen-headers 5.19.3.zen1-1

nvidia/515.65.01, 5.19.3-zen1-1-zen, x86_64: installed

Linux tomato-arch 5.19.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 21 Aug 2022 18:55:22 +0000 x86_64 GNU/Linux

Offline

#4 2022-08-24 09:03:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,231

Re: NVIDIA driver not loading after booting with rEFInd

Things are correct here, what's your definition of nvidia driver not loading? Did you check dmesg? Does your GRUB have the ibt=off kernel parameter that you didn't/forgot to carry over?

Offline

#5 2022-08-24 09:28:26

tomadojuice
Member
Registered: 2022-08-24
Posts: 8

Re: NVIDIA driver not loading after booting with rEFInd

I now changed my refind_linux.conf to look like this:

"Boot with standard options"  "root=UUID=4d08eac6-6938-45de-966f-e1889e09f890 rw add_efi_memmap"
"Boot using fallback initramfs"    "root=UUID=4d08eac6-6938-45de-966f-e1889e09f890 rw add_efi_memmap initrd=/boot/initramfs-%v-fallback.img"
"Boot to terminal"   "ro root=UUID=4d08eac6-6938-45de-966f-e1889e09f890 systemd.unit=multi-user.target"

and added this line into my refind.conf on the efi partition:

extra_kernel_version_strings linux, linux-zen

If I boot into the zen kernel everything (including nvidia) works now but I get the same error when booting into normal linux.
This is my (part of) xorg log if I boot into the normal linux kernel:

[    12.546] (II) LoadModule: "nvidia"
[    12.547] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[    12.553] (II) Module nvidia: vendor="NVIDIA Corporation"
[    12.553] 	compiled for 1.6.99.901, module version = 1.0.0
[    12.553] 	Module class: X.Org Video Driver
[    12.554] (II) NVIDIA dlloader X Driver  515.65.01  Wed Jul 20 13:50:46 UTC 2022
[    12.554] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    12.555] (II) Loading sub module "fb"
[    12.555] (II) LoadModule: "fb"
[    12.555] (II) Module "fb" already built-in
[    12.555] (II) Loading sub module "wfb"
[    12.555] (II) LoadModule: "wfb"
[    12.555] (II) Loading /usr/lib/xorg/modules/libwfb.so
[    12.557] (II) Module wfb: vendor="X.Org Foundation"
[    12.557] 	compiled for 1.21.1.4, module version = 1.0.0
[    12.557] 	ABI class: X.Org ANSI C Emulation, version 0.4
[    12.557] (II) Loading sub module "ramdac"
[    12.557] (II) LoadModule: "ramdac"
[    12.557] (II) Module "ramdac" already built-in
[    12.565] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[    12.565] (EE) NVIDIA:     system's kernel log for additional error messages and
[    12.565] (EE) NVIDIA:     consult the NVIDIA README for details.
[    12.565] (EE) No devices detected.
[    12.565] (EE)
Fatal server error:
[    12.565] (EE) no screens found(EE)
[    12.565] (EE)
Please consult the The X.Org Foundation support
	 at http://wiki.x.org
 for help.
[    12.565] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    12.565] (EE)
[    12.568] (EE) Server terminated with error (1). Closing log file.

Last edited by tomadojuice (2022-08-24 09:29:17)

Offline

#6 2022-08-24 10:46:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,231

Re: NVIDIA driver not loading after booting with rEFInd

the xorg log says an error with the kernel module, check/post dmesg. FWIW if your output above is any indication and you didn't omit stuff the nvidia module is not there for the standard kernel currently in which case you're likely lacking linux-headers.

Offline

#7 2022-08-24 11:52:46

seth
Member
Registered: 2012-09-03
Posts: 58,750

Re: NVIDIA driver not loading after booting with rEFInd

Online

#8 2022-08-24 11:55:26

tomadojuice
Member
Registered: 2022-08-24
Posts: 8

Re: NVIDIA driver not loading after booting with rEFInd

V1del wrote:

the xorg log says an error with the kernel module, check/post dmesg. FWIW if your output above is any indication and you didn't omit stuff the nvidia module is not there for the standard kernel currently in which case you're likely lacking linux-headers.

I installed linux-headers now and if I run dkms-status the headers are there but it still doesn't work.

dmesg gives me this error:

[    2.486482] nvidia: module verification failed: signature and/or required key missing - tainting kernel

Offline

#9 2022-08-24 11:56:42

tomadojuice
Member
Registered: 2022-08-24
Posts: 8

Re: NVIDIA driver not loading after booting with rEFInd

seth wrote:

This could be it

Offline

#10 2022-08-24 11:57:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,231

Re: NVIDIA driver not loading after booting with rEFInd

That's not an error, if that's all you see then things should/would be working as expected, post more context/a new xorg log.

Regarding the BTF issue, I'd expect linux-zen to be affected by that as well if this was the underlying issue, no?

Last edited by V1del (2022-08-24 11:58:05)

Offline

#11 2022-08-24 11:57:47

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,090

Re: NVIDIA driver not loading after booting with rEFInd

Could be, but the single line from dmesg you posted isn't a problem, it simply means it's tainting the kernel which is normal.

Offline

#12 2022-08-24 11:58:53

tomadojuice
Member
Registered: 2022-08-24
Posts: 8

Re: NVIDIA driver not loading after booting with rEFInd

[    2.473140] nvidia: loading out-of-tree module taints kernel.
[    2.473148] nvidia: module license 'NVIDIA' taints kernel.
[    2.486482] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    2.782509] failed to validate module [nvidia] BTF: -22
[    2.884697] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input15
[    2.884788] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input16
[    2.884873] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input17
[    2.884956] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input18
[    2.885054] input: HDA NVidia HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input19
[    2.885138] input: HDA NVidia HDMI/DP,pcm=11 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input20
[    2.885843] input: HDA NVidia HDMI/DP,pcm=12 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input21
[    3.198290] failed to validate module [nvidia] BTF: -22
[    3.651599] failed to validate module [nvidia] BTF: -22
[    4.050682] failed to validate module [nvidia] BTF: -22
[   13.115796] failed to validate module [nvidia] BTF: -22

This is everything in dmesg that mentions nvidia

Offline

#13 2022-08-24 12:00:16

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,090

Re: NVIDIA driver not loading after booting with rEFInd

"failed to validate module [nvidia] BTF: -22"

That points to the same problem, but it's still only part of the error. Nobody said to use grep.

Offline

#14 2022-08-24 12:00:56

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,231

Re: NVIDIA driver not loading after booting with rEFInd

That is the same as linked above, follow the script advice mentioned in https://www.reddit.com/r/archlinux/comm … x_gcc_122/

Offline

#15 2022-08-24 12:06:45

tomadojuice
Member
Registered: 2022-08-24
Posts: 8

Re: NVIDIA driver not loading after booting with rEFInd

V1del wrote:

That is the same as linked above, follow the script advice mentioned in https://www.reddit.com/r/archlinux/comm … x_gcc_122/

That works yes. Thanks!

Offline

#16 2022-08-24 12:11:02

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,090

Re: NVIDIA driver not loading after booting with rEFInd

For information gathering purposes, what CPU do you have?

Offline

#17 2022-08-24 12:14:03

tomadojuice
Member
Registered: 2022-08-24
Posts: 8

Re: NVIDIA driver not loading after booting with rEFInd

Scimmia wrote:

For information gathering purposes, what CPU do you have?

Intel i7-7700K

Offline

#18 2022-08-24 12:15:19

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,090

Re: NVIDIA driver not loading after booting with rEFInd

Well that shoots my theory. Don't know what's triggering this.

Offline

#19 2022-08-24 12:18:10

lquidfire
Member
From: South Africa
Registered: 2017-07-26
Posts: 74

Re: NVIDIA driver not loading after booting with rEFInd

V1del wrote:

That is the same as linked above, follow the script advice mentioned in https://www.reddit.com/r/archlinux/comm … x_gcc_122/

That worked for me as well (I had been following this to fix my problem).

FYI: CPU is Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz

Offline

#20 2022-08-24 13:14:36

seth
Member
Registered: 2012-09-03
Posts: 58,750

Online

Board footer

Powered by FluxBB