Nvidia driver nvidia.ko problem! (SOLVED)

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
silentwind
Posts: 24
Joined: 2. Jun 2015, 11:23

Nvidia driver nvidia.ko problem! (SOLVED)

Post by silentwind »

I’ve followed the steps from:
https://docs.salixos.org/wiki/How_to_In ... DIA_driver

The graphic card is Nvidia GT 240. The driver is NVIDIA-Linux-x86_64-340.102.run

Problems:

1. After running
sudo slapt-get -i xf86-video-nouveau-blacklist

the terminal said:

Reading Package Lists...Done
No such package: xf86-video-nouveau-blacklist

I’ve decided to continue anyway.

2. After running:

sh NVIDIA-Linux-*.run

Nvidia offered to blacklist nouveau. I agreed.

Then Nvidia started installing, but after a while it gave the error:

ERROR: Unable to load the kernel module 'nvidia.ko'. This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb, nvidiafb, or nouveau is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release

After a system reboot,I’ve tried to run again

sh NVIDIA-Linux-*.run

but the same thing happened.

What can be done?
Last edited by silentwind on 18. Sep 2017, 20:43, edited 1 time in total.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Nvidia driver nvidia.ko problem!

Post by gapan »

Do you get any errors when building the nvidia driver?

If you don't, try:

Code: Select all

sudo spkg -d xf86-video-nouveau
to completely remove the nouveau driver and reboot.
Image
Image
silentwind
Posts: 24
Joined: 2. Jun 2015, 11:23

Re: Nvidia driver nvidia.ko problem!

Post by silentwind »

gapan wrote:Do you get any errors when building the nvidia driver?

If you don't, try:

Code: Select all

sudo spkg -d xf86-video-nouveau
to completely remove the nouveau driver and reboot.
This is what happens after starting sh NVIDIA-Linux-*.run:
1.Nvidia license accept appears
2..'Build nvidia kernel module' screen appears and goes to 100%completion
3.'Build unified memory kernel module' screen appears and goes to 100%completion
4.The "nvidia.ko" error appears

I've completely removed the nouveau driver with the command you've provided, and then rebooted and tried again and same things happened.

Here is the content of the /var/log/nvidia-installer.log:
https://gist.github.com/anonymous/43973 ... 527fb39b9f

I'm using Salix Xfce 64 bit and the driver is for 64 bit also.
DidierSpaier
Posts: 518
Joined: 20. Jun 2016, 20:15

Re: Nvidia driver nvidia.ko problem!

Post by DidierSpaier »

In yur log I see:

Code: Select all

   make[1]: Entering directory '/usr/src/linux-4.4.75'
   test -e include/generated/autoconf.h -a -e include/config/auto.conf || (		\
   echo >&2;							\
   echo >&2 "  ERROR: Kernel configuration is invalid.";		\
   echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
   echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
   echo >&2 ;							\
/bin/false)
Shot in the dark: check that you have kernel-source for kernel 4.4.75 properly installed.
silentwind
Posts: 24
Joined: 2. Jun 2015, 11:23

Re: Nvidia driver nvidia.ko problem!

Post by silentwind »

DidierSpaier wrote:Shot in the dark: check that you have kernel-source for kernel 4.4.75 properly installed.
Ok, but how do I do that? Sorry, I'm still at the very beginning with Gnu/Linux.

If I run in Terminal:

Code: Select all

uname -r
it lists:

4.4.29

Does that mean the kernel did not update correctly? I've followed the wiki to the letter so far, so I have no clue what the problem might be...
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Nvidia driver nvidia.ko problem!

Post by gapan »

You are running kernel 4.4.29 and you have the kernel source for 4.4.75. These need to match. Run:

Code: Select all

sudo slapt-get --upgrade
You'll see a list of kernel packages that are being excluded. For each of them run:

Code: Select all

sudo slapt-get -i kernel_package_name
Don't forget to update lilo or elilo after you do that or your system won't boot if you use any of them.

For lilo:

Code: Select all

sudo lilo -v
For elilo, just copy /boot/vmlinuz to your /boot/efi/EFI/Salix-Xfce-14.2/
Image
Image
silentwind
Posts: 24
Joined: 2. Jun 2015, 11:23

Re: Nvidia driver nvidia.ko problem!

Post by silentwind »

That solved it, gapan!
You guys are fantastic. I've never received such fast and accurate help before with concern to computer problems. And maybe with Salix it's no more distro-hopping for me :)

Since I have grub, I've run

Code: Select all

sudo update-grub
as last line and then rebooted.

The Nvidia logo appeared. Now videos and apps work fine.

There is still the matter of the login screen resolution being different than what I've set for the desktop, but we could address that in the "newbie guide" post. Should I mark this topic solved?

Many thanks, again.
silentwind
Posts: 24
Joined: 2. Jun 2015, 11:23

Re: Nvidia driver nvidia.ko problem!

Post by silentwind »

Oh, sorry, but I forgot to ask the most important questions:

Did the above driver & kernel problem happen due to any error on my part? Did I do something wrong?
-If yes, how can I prevent it in a future Salix install?
-If no, then I suppose it will be fixed in future Salix versions? And/or a wiki update maybe?
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Nvidia driver nvidia.ko problem!

Post by gapan »

slientwind wrote:Oh, sorry, but I forgot to ask the most important questions:

Did the above driver & kernel problem happen due to any error on my part? Did I do something wrong?
-If yes, how can I prevent it in a future Salix install?
-If no, then I suppose it will be fixed in future Salix versions? And/or a wiki update maybe?
Well, this was definitely not a bug. And it's not that you did something particularly wrong either. You should have just paid more attention at which kernel version you have installed and which kernel-source package you were installing to go with it. Ideally, you should have upgraded your kernel before you installed the kernel-source package and tried to build the nvidia driver. I have added a note in the wiki about it.
Image
Image
Post Reply