# [Xorg] Uninstalling Nvidia drivers

## Neuromancien

Hello,

I have many system Freezes, maybe caused by the Nvidia driver. So I would like to uninstall it in order to user 'nv" or "nouveau" driver.

I have recompiled x11-base/xorg-drivers with VIDEO_CARDS="nv" and updated the xorg.conf file :

But I am unable to restart X with the "nv" driver :

Xorg log

xorg.conf

----------

## [n00b@localhost]

Did you also uninstall x11-drivers/nvidia-driver?  If you have changed VIDEO_CARDS in make.conf then an emerge --depclean should get rid of it.  If not, an emerge -C x11-drivers/nvidia-driver will definitely get rid of it.

From the output of Xorg.0.log it looks like the nvidia module is still around and being loaded before the nv module.

----------

## Neuromancien

I removed x11-drivers/nvidia-drivers but it does not work...

----------

## Naib

is nvidia still listed in lsmod

what is the output of find "/lib/modules/$(uname -r)" | grep nvidia

Also why is the nvidia causing issues? what driver version and what hardware? nvidia drivers have always been good for me, but I do upgrade my card every few years - if you are using legacy drivers then yes you may have issues

----------

## Neuromancien

 *Naib wrote:*   

> is nvidia still listed in lsmod

 

Yes. I don't know how to prevent form loading :

I tried with 

```
blacklist nvidia
```

 under /etc/modprobe.d/blacklist.conf but it does not work.

I have to do 

```
modprobe -r nvidia
```

 each time I start the computer.

 *Naib wrote:*   

> what is the output of find "/lib/modules/$(uname -r)" | grep nvidia

 

/lib/modules/2.6.38-gentoo-r6/video/nvidia.ko

 *Naib wrote:*   

> Also why is the nvidia causing issues?

 

I am not sure but I don't see another explanation.

----------

## Naib

when you emerge -C the nvidia driver, it might still have been in a different kernel that you are booting.

----------

## Neuromancien

 *Naib wrote:*   

> when you emerge -C the nvidia driver, it might still have been in a different kernel that you are booting.

 

I don't understand. I only have 1 kernel, the lastest version.

----------

## Naib

well emerge -C only removes the nvidia.ko from the /lib/modules/### for the kernel linked by /usr/src/linux

When you upgrade kernel's the /usr/src linux symlink is re-linked and an emerge nvidia is required for the new kernel BUT the old kernel still has the nvidia.ko

This is why I am asking about any other kernels - you might say you only have 1 kernel but from the information you provided that wasn't made clear, I am explaining how/where nvidia.ko can reside.

so either you are booting an old kernel w.r.t. what /usr/src/linux is pointing to (and thus emerge -C didn't actually remove the nvidia.ko module) or you didn't actually emerge -C

output of:

uname -r

readlink /usr/src/linux 

ls /usr/src

ls /lib/modules

should help clear this up.

You could just delete /lib/modules/2.6.38-gentoo-r6/video/nvidia.ko if you really don't want nvidia driver

----------

## Neuromancien

Actually you were right : there was still a nvidia.ko in /lib/modules/2.6.37-gentoo-r4.

----------

