Long boot time when using NVIDIA driver / after kernel upgrade

Hi! My F33 is starting up very slowly after some kernel upgrades (as far as I remember). The monitor is turning off multiple times during boot and buzzer on the motherboard beeps several times with long (10-20s) intervals, then the login screen shows up. After entering the password, the buzzer beeps again after some time before showing the desktop. Here’s some info about my system:

Info
❯ systemd-analyze <---- With nvidia driver installed
Startup finished in 1.085s (kernel) + 1.572s (initrd) + 2min 25.102s (userspace) = 2min 27.761s 
graphical.target reached after 2min 25.094s in userspace
❯ systemd-analyze <---- After removing the driver
Startup finished in 1.074s (kernel) + 3.618s (initrd) + 9.898s (userspace) = 14.592s 
graphical.target reached after 9.887s in userspace
❯ uname -r
5.9.12-200.fc33.x86_64
❯ modinfo -F version nvidia
455.45.01
❯ /sbin/lspci | grep -e VGA
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] (rev a1)

After removing previously installed NVIDIA driver the problem disappeared. The driver was installed from RPMFusion using this guide.
Before uninstalling the driver, I tried sudo akmods --force and it finished without any errors, so I believe that akmod is being built without any issues, moreover, the driver works fine after these long startups:

Spoiler
❯ lspci -nk
...
01:00.0 0300: 10de:13c2 (rev a1)
	Subsystem: 1458:3670
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia
...

I tried to find something in system logs and found this:

From journalctl -b
CPU: 5 PID: 367 Comm: plymouthd Tainted: P           OE     5.9.12-200.fc33.x86_64 #1
Hardware name: Gigabyte Technology Co., Ltd. H97M-HD3/H97M-HD3, BIOS F8 09/18/2015
RIP: 0010:_nv040899rm+0x25/0x30 [nvidia]
Code: 0f 1f 44 00 00 48 83 ec 08 e8 47 b1 ff ff f6 05 ac 7b 15 01 01 74 09 66 98 66 01 05 9d 7b 15 01 81 25 a7 7b 15 01 80 f9 ff ff <48> 83 c4 08 c3 66 0f 1f 44 00 00 48 83 ec 08 e8 17 b1 ff ff f6 05
RSP: 0018:ffffb393004db828 EFLAGS: 00000246
RAX: 000000000000fff5 RBX: ffff9dfaa1232a50 RCX: 00000000000c0000
RDX: 00000000000000f5 RSI: 00000000000c33c3 RDI: 00000000000033c3
RBP: ffff9dfaa1232a10 R08: ffffffffc227cb20 R09: 0000000000000282
R10: 0000000000000000 R11: 0000000000000001 R12: ffff9dfaa1232a5c
R13: ffff9dfaa1232a58 R14: ffff9dfaa1232a54 R15: 0000000000000000
FS:  00007f7b1e696f40(0000) GS:ffff9dfaa6b40000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000559c03b51608 CR3: 000000021d262005 CR4: 00000000001706e0
Call Trace:
 ? _nv040908rm+0x30/0x30 [nvidia]
 ? _nv000828rm+0x4f/0x130 [nvidia]
 ? _nv030234rm+0x18b/0x250 [nvidia]
 ? _nv031965rm+0x2c/0x160 [nvidia]
 ? _nv000730rm+0x315/0x450 [nvidia]
 ? _nv000629rm+0x1db/0x3f0 [nvidia]
 ? _nv013592rm+0xdf/0x2d0 [nvidia]
 ? _nv035314rm+0x290/0x2a0 [nvidia]
 ? _nv036854rm+0x251/0x2b0 [nvidia]
 ? _nv008635rm+0x329/0x3f0 [nvidia]
 ? _nv035427rm+0x4d/0x90 [nvidia]
 ? _nv035428rm+0x57/0x100 [nvidia]
 ? _nv035428rm+0x37/0x100 [nvidia]
 ? _nv000672kms+0x90/0x90 [nvidia_modeset]
 ? _nv007655rm+0x58/0xc0 [nvidia]
 ? _nv007655rm+0x37/0xc0 [nvidia]
 ? rm_kernel_rmapi_op+0x159/0x1b0 [nvidia]
 ? _nv000672kms+0x90/0x90 [nvidia_modeset]
 ? nvkms_call_rm+0x3b/0x60 [nvidia_modeset]
 ? _nv002779kms+0x51/0x60 [nvidia_modeset]
 ? _nv002821kms+0x3e/0x90 [nvidia_modeset]
 ? _nv000368kms+0x1cf/0x200 [nvidia_modeset]
 ? _nv002601kms+0x85/0xf0 [nvidia_modeset]
 ? _nv000018kms+0x3f2/0x530 [nvidia_modeset]
 ? _nv002576kms+0x476/0x1080 [nvidia_modeset]
 ? _nv000018kms+0x3f2/0x530 [nvidia_modeset]
 ? _nv000018kms+0x3f2/0x530 [nvidia_modeset]
 ? nv_drm_atomic_commit+0x223/0x340 [nvidia_drm]
 ? nv_drm_atomic_commit+0x223/0x340 [nvidia_drm]
 ? _nv000677kms+0x38/0x50 [nvidia_modeset]
 ? _nv000672kms+0x6b/0x90 [nvidia_modeset]
 ? nvKmsIoctl+0x96/0x1d0 [nvidia_modeset]
 ? kfree+0xb0/0x3c0
 ? nvkms_ioctl_from_kapi+0x40/0x80 [nvidia_modeset]
 ? _nv000673kms+0x3c/0x50 [nvidia_modeset]
 ? nv_drm_master_drop+0x2e/0x60 [nvidia_drm]
 ? _nv000092kms+0x50/0x50 [nvidia_modeset]
 ? drm_drop_master+0x1b/0x60 [drm]
 ? drm_dropmaster_ioctl+0x9e/0xc0 [drm]
 ? drm_setmaster_ioctl+0x160/0x160 [drm]
 ? drm_ioctl_kernel+0x86/0xd0 [drm]
 ? drm_ioctl+0x20f/0x3a0 [drm]
 ? drm_setmaster_ioctl+0x160/0x160 [drm]
 ? selinux_file_ioctl+0x122/0x1c0
 ? kmem_cache_free+0xf3/0x400
 ? _cond_resched+0xb/0x40
 ? __x64_sys_ioctl+0x83/0xb0
 ? do_syscall_64+0x33/0x40
 ? entry_SYSCALL_64_after_hwframe+0x44/0xa9

And after this, when GNOME is already started and I’ve entered the password:

CPU: 6 PID: 1047 Comm: systemd-logind Tainted: P           OEL    5.9.12-200.fc33.x86_64 #1
Hardware name: Gigabyte Technology Co., Ltd. H97M-HD3/H97M-HD3, BIOS F8 09/18/2015
RIP: 0010:os_io_write_dword+0xa/0x10 [nvidia]
Code: 0f 1f 44 00 00 89 f0 89 fa ee c3 0f 1f 44 00 00 0f 1f 44 00 00 89 f0 89 fa 66 ef c3 0f 1f 40 00 0f 1f 44 00 00 89 f0 89 fa ef <c3> 0f 1f 44 00 00 0f 1f 44 00 00 89 fa ec c3 0f 1f 80 00 00 00 00
RSP: 0018:ffffb39300ea7820 EFLAGS: 00000202
RAX: 0000000000009400 RBX: ffff9dfa61582a50 RCX: 00000000000c0000
RDX: 000000000000e008 RSI: 0000000000009400 RDI: 000000000000e008
RBP: ffff9dfa61582a10 R08: ffffffffc227cb20 R09: 0000000000000282
R10: 0000000000000000 R11: 0000000000000001 R12: ffff9dfa61582a5c
R13: ffff9dfa61582a58 R14: ffff9dfa61582a54 R15: 0000000000000000
FS:  00007f7ef2fa2080(0000) GS:ffff9dfaa6b80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005634af45e528 CR3: 000000022052c001 CR4: 00000000001706e0
Call Trace:
 _nv040980rm+0x52/0x70 [nvidia]
 ? _nv040978rm+0x30/0x30 [nvidia]
 ? _nv000828rm+0x4f/0x130 [nvidia]
 ? _nv030234rm+0x18b/0x250 [nvidia]
 ? _nv031965rm+0x2c/0x160 [nvidia]
 ? _nv000730rm+0x315/0x450 [nvidia]
 ? _nv000629rm+0x1db/0x3f0 [nvidia]
 ? _nv013592rm+0xdf/0x2d0 [nvidia]
 ? _nv035314rm+0x290/0x2a0 [nvidia]
 ? _nv036854rm+0x251/0x2b0 [nvidia]
 ? _nv008635rm+0x329/0x3f0 [nvidia]
 ? _nv035427rm+0x4d/0x90 [nvidia]
 ? _nv035428rm+0x57/0x100 [nvidia]
 ? _nv035428rm+0x37/0x100 [nvidia]
 ? _nv000672kms+0x90/0x90 [nvidia_modeset]
 ? _nv007655rm+0x58/0xc0 [nvidia]
 ? _nv007655rm+0x37/0xc0 [nvidia]
 ? rm_kernel_rmapi_op+0x159/0x1b0 [nvidia]
 ? _nv000672kms+0x90/0x90 [nvidia_modeset]
 ? nvkms_call_rm+0x3b/0x60 [nvidia_modeset]
 ? _nv002779kms+0x51/0x60 [nvidia_modeset]
 ? _nv002821kms+0x3e/0x90 [nvidia_modeset]
 ? _nv000368kms+0x1cf/0x200 [nvidia_modeset]
 ? _nv002601kms+0x85/0xf0 [nvidia_modeset]
 ? _nv000018kms+0x3f2/0x530 [nvidia_modeset]
 ? _nv002576kms+0x476/0x1080 [nvidia_modeset]
 ? _nv000018kms+0x3f2/0x530 [nvidia_modeset]
 ? _nv000018kms+0x3f2/0x530 [nvidia_modeset]
 ? nv_drm_atomic_commit+0x223/0x340 [nvidia_drm]
 ? nv_drm_atomic_commit+0x223/0x340 [nvidia_drm]
 ? _nv000677kms+0x38/0x50 [nvidia_modeset]
 ? _nv000672kms+0x6b/0x90 [nvidia_modeset]
 ? nvKmsIoctl+0x96/0x1d0 [nvidia_modeset]
 ? kfree+0xb0/0x3c0
 ? nvkms_ioctl_from_kapi+0x40/0x80 [nvidia_modeset]
 ? _nv000673kms+0x3c/0x50 [nvidia_modeset]
 ? nv_drm_master_drop+0x2e/0x60 [nvidia_drm]
 ? _nv000092kms+0x50/0x50 [nvidia_modeset]
 ? drm_drop_master+0x1b/0x60 [drm]
 ? drm_dropmaster_ioctl+0x9e/0xc0 [drm]
 ? drm_setmaster_ioctl+0x160/0x160 [drm]
 ? drm_ioctl_kernel+0x86/0xd0 [drm]
 ? drm_ioctl+0x20f/0x3a0 [drm]
 ? drm_setmaster_ioctl+0x160/0x160 [drm]
 ? selinux_file_ioctl+0x122/0x1c0
 ? __x64_sys_ioctl+0x83/0xb0
 ? do_syscall_64+0x33/0x40
 ? entry_SYSCALL_64_after_hwframe+0x44/0xa9
(WW) Falling back to old probe method for modesetting
(WW) Falling back to old probe method for fbdev
(II) Loading sub module "fbdevhw"
(II) LoadModule: "fbdevhw"

Looks like there are some problems with loading the driver but I don’t understand such things in details, so I don’t know how to solve this problem. Can someone help me? Thanks in advance!

P.S. I apologize in advance for any mistakes, English is not my native language :slight_smile:

2 Likes

Hi @idkwhy,

The probable reasons that I can think of for slow boot after kernel upgrades is because new kernel modules are generated right after the installation gets over (if enough time is provided before reboot) or on boot up (if enough time is not provided before reboot). Of course, it can be forced explicitly but please note that Akmods is resource-intensive. The Akmods section of the RPM Fusion documentation listed has the following information.

An akmod is a type of package similar to dkms. As you start your computer, the akmod system will check if there are any missing kmods and if so, rebuild a new kmod for you. Akmods have more overhead than regular kmod packages as they require a few development tools such as gcc and automake in order to be able to build new kmods locally.

Some delays are normal but if its too long, then it can point towards something going wrong. How long is your average waiting time?

What was posted shows both a very old kernel and a very old nvidia driver.

Has your system been updated to the newest kernel (5.11.16) ?
Has the nvidia driver been updated to the latest (465.24.02) ?
Is the delayed boot still present?