# Messing up again with NVIDIA



## hazz (Feb 4, 2015)

Hi there iI own an Asus laptop N56VZ iI've tried to installed NVIDIA driver but as shown on the thread title it's not working, iI'm getting in kernel panic.
Tthose are the line seen on the screen at boot time:

```
Freebsd/amd64 EFI loader, Revision 1.1
Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0xf8e518 data=0x124a30=0x2055c0 syms=[0x8+0x140520+0x8+0x15aefd]
/boot/modules/nvidia.ko size 0xb60f50
panic:free: guard1 fail @ 0x7993d300 from /usr/src/lib/libstand/close.c:79
Press a key to reboot<--
```
But it hangs and it's not rebooting.
I read the manual and googled for almost 10 hours right now no chance to run the X.
I've tried the NVIDIA source as well and during installations it gave me this error:

```
Segmentation fault kernel too old
```
FreeBSD distro 10.1, iI've tried the freebsdFreeBSD porting of NVIDIA as well.
Thanks in advance.


----------



## SirDice (Feb 4, 2015)

Use the port x11/nvidia-driver and make sure the sources in /usr/src/ reflect the exact version you're using. The error seems to come from building the NVidia driver using a different version of the kernel sources.


----------



## hazz (Feb 5, 2015)

Thanks for answering back I will try to install the 340 version
Anyone got an idea how to deinstall the version give by the NVIDIA company?
In Ubuntu there's an `nvidia-uninstall`command


----------



## protocelt (Feb 5, 2015)

That particular notebook pc has Nvidia Optimus. I owned that or at least similar model for a short while before selling it. There was no BIOS or physical switch option on mine and I could not get it to work with either Intel or Nvidia graphics at the time. This was with 9.0-RELEASE IIRC though so things may have changed since then.


----------



## hazz (Feb 8, 2015)

SirDice said:


> Use the port x11/nvidia-driver and make sure the sources in /usr/src/ reflect the exact version you're using. The error seems to come from building the NVidia driver using a different version of the kernel sources.


Any tips howto debug it ?
I tried version 304 and 340 no chance of a working driver


----------



## abishai (Feb 8, 2015)

If you are not sure your sources version, you can entirely drop /usr/src and fetch right sources from http://svn.freebsd.org/base/


----------



## hazz (Feb 8, 2015)

abishai said:


> If you are not sure your sources version, you can entirely drop /usr/src and fetch right sources from http://svn.freebsd.org/base/


Well iI first tried freebsdFreeBSD 10.1, then iI've switched to 11 and build the KERNEL, but the problem persist.
Is there anyone who can point me how to debug all this with kgbd(1)?
Thanks in advance to all of you about your tips.
Grazie


----------



## ppenzin (Feb 22, 2015)

I get the kernel too old error too, when I try to install a version of nvidia-driver through pkg:

```
[1/2] Deinstalling nvidia-driver-346.35...
[1/2] Deleting files for nvidia-driver-346.35: 100%
FATAL: kernel too old
Segmentation fault (core dumped)
[2/2] Installing nvidia-driver-340-340.76...
[2/2] Extracting nvidia-driver-340-340.76: 100%
FATAL: kernel too old
Segmentation fault (core dumped)
```
`Kernel too old' error can be triggered by Linux emulation:
Thread debian-jail-fatal-kernel-too-old.35523


----------



## zodias (Feb 28, 2015)

Hi,
You will want to set `# sysctl compat.linux.osrelease=2.6.18` and to add 
	
	



```
compat.linux.osrelease=2.6.18
```
 in  /etc/sysctl.conf. 
After that just reinstall the nvidia driver with `#pkg upgrade nvidia-driver-*`. Replace * with your driver version, e.g. 304. Then load the driver with `#kldload nvidia`.


----------

