Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] NVIDIA initialization failure after system update.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ImErina
n00b
n00b


Joined: 10 Feb 2022
Posts: 51

PostPosted: Wed Jun 14, 2023 9:17 am    Post subject: [Solved] NVIDIA initialization failure after system update. Reply with quote

Due to a typo(A quite serious one, mistyping ACCEPT_KEYWORDS without the 'S') I have corrected I have to update the system.

After the update I found that startx stopped working. A brief look at the log tells me "NVIDIA: Failed to initialize the NVIDIA kernel module."I have recompiled the kernel (GCC was updated with the system) and nvidia-drivers but no luck.

Dmesg didn't yield important notes either. What info should I attach? How may I fix this?

Note: important updates happened includes kernel(6.1.17 to 6.3.7), GCC(12.2.1 to 13.1.1), nvidia-drivers (515.105 to 530.41, which are both applicable to my hardware according to NVIDIA's website)

IBT is set to off. There's no nouveau installed.


Last edited by ImErina on Thu Jun 15, 2023 5:49 am; edited 1 time in total
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2695

PostPosted: Wed Jun 14, 2023 10:02 am    Post subject: Reply with quote

Nvidia drivers consist of two parts - a kernel module and a library. Those two need to be in sync.
You need to either select the kernel you intend to run from eselect prior to updating nvidia drivers or supply KERNEL_DIR on the command line for a kernel that you intend to use but is not selected.

Make sure both components are in sync. If you want to have it for more than one kernel, just run the corresponding number of emerges of nvidia-drivers with the corresponding KERNEL_DIR on the command line for the kernels you want it to be installed.

Also attach emerge --info, dmesg and Xorg logs. We are not psychics :)

Best Regards,
Georgi
Back to top
View user's profile Send private message
ImErina
n00b
n00b


Joined: 10 Feb 2022
Posts: 51

PostPosted: Wed Jun 14, 2023 10:26 am    Post subject: Reply with quote

logrusx wrote:
Nvidia drivers consist of two parts - a kernel module and a library. Those two need to be in sync.
You need to either select the kernel you intend to run from eselect prior to updating nvidia drivers or supply KERNEL_DIR on the command line for a kernel that you intend to use but is not selected.

Welp, I have already selected the newer kernel(6.3.7 in this case) and done all the recompiling stuff(with the newer version of GCC).

I'll attach the information you asked in a minute.

Emerge --info: https://bpa.st/2HYGS
Dmesg: https://bpa.st/FARTW
Xorg.0.log: https://bpa.st/QULSI
.config: https://dpaste.com/EWWHHBBY5

p.s. You may see the config was not handmade. I used an Arch Linux config(which was ready on hand) with some options toggled to suit Nvidia(such as IBT)...... Just to make sure it is not something in my kernel that was too wrong.

Are these useful?
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1889
Location: Germany

PostPosted: Wed Jun 14, 2023 12:07 pm    Post subject: Reply with quote

Did you execute emerge @x11-module-rebuild -av https://wiki.gentoo.org/wiki/Package_sets#.40x11-module-rebuild
Because you need to rebuild the nvidia module to match your kernel.

Or better, run emerge --ask @module-rebuild as described here: https://wiki.gentoo.org/wiki/Kernel/Upgrade
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2892

PostPosted: Wed Jun 14, 2023 12:24 pm    Post subject: Reply with quote

Quote:
Dmesg: https://bpa.st/FARTW
Look at the contents, your kernel configs probably disallow using dmesg as non-root.
Quote:
Xorg.0.log: https://bpa.st/QULSI
404
Back to top
View user's profile Send private message
ImErina
n00b
n00b


Joined: 10 Feb 2022
Posts: 51

PostPosted: Wed Jun 14, 2023 12:36 pm    Post subject: Reply with quote

Banana wrote:
Or better, run emerge --ask @module-rebuild as described here: https://wiki.gentoo.org/wiki/Kernel/Upgrade


Yes I did. I've rebuilt everything in correct order. The compilers first, the kernel second, and then the modules.

Updated xorg.0.conf: https://bpa.st/APEU6

Updated dmesg: https://bpa.st/F3NVO

I wonder why the break happened in an update :? I kind of fear that it's some other packages that was broken. I'll try a fresh installation to see if it works and then work on mine, just to make sure it is not hardware-related issues.

A fresh install on a spare disk worked. (The GCC update took quite a while tho.) Most configs are the same.
Back to top
View user's profile Send private message
ImErina
n00b
n00b


Joined: 10 Feb 2022
Posts: 51

PostPosted: Thu Jun 15, 2023 5:53 am    Post subject: Reply with quote

Solved by recompiling kernel and module again.

I'm curious what it actually means by saying Nvidia failed to initialize. I guess it is not that the module failed to work since
Code:
modprobe
and
Code:
nvidia_modprobe
works without issue.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum