How to temporarily disable Nvidia driver without uninstall it?

I am using openSUSE 12.3 with Nvidia graphic driver installed on my ThinkPad T430 with discrete video card (not optimus/bumblebee).
Here is my question: How to temporarily disable nvidia, enable nouveau instead, without uninstall nvidia driver?

I find that nvidia driver brings a file ‘nvidia-desktop.conf’, which only contains one line ‘blacklist nouveau’, into the folder /etc/modprobe.d/ .And another file, 50-nvidia.conf, shows a command

options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660

. At the same time, /etc/modprobe.d/50-blacklist.conf also blacklists intelfb, intelfbhw, intelfbdrv and radeon.

If I remove the blacklist of nouveau, and make the codes in nvidia-desktop.conf and 50-nvidia.conf into comment, can I use nouveau instead of nvidia?

Don’t remove the line in 50-nvidia.conf, that’s independent of the nvidia driver.
Just comment the blacklist line in nvidia-desktop.conf.

If you don’t have an /etc/X11/xorg.conf, nouveau should be used then because nvidia cannot be loaded. (if you do have /etc/X11/xorg.conf that specifies nvidia to load, X will fail to start)

But there is one problem:
The nvidia driver overrides some Mesa libraries with its own versions that only work when the nvidia driver is in use.
So you could have problems with OpenGL/direct rendering…

I’m curious, what’s the reason for this?

On 2013-11-18 22:56, hank se wrote:

> I’m curious, what’s the reason for this?

I don’t know about him, but I do have a reason for that. Some time ago,
when I tried, I could not hibernate with the closed source driver, and
hibernation is part of my daily routine. So I use the nouveau driver
instead. However, I would like to now and then play some games that need
acceleration using the nvidia driver.

I would like to be able to run a quick command, disable nouveau and
enable nvidia, reboot, play, run the script again to enable nouveau
again, and power off or reboot for the normal usage pattern.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

I’m quite sure that can be done, at least if nvidia is installed the easy way, but I don’t have nvidia installed the easy way right now, I’m on 13.1-RC1, I’ll return on this when i have 13.1 GM after tomorrow.

On 2013-11-19 00:36, hank se wrote:

>
> I’m quite sure that can be done, at least if nvidia is installed the
> easy way, but I don’t have nvidia installed the easy way right now, I’m
> on 13.1-RC1, I’ll return on this when i have 13.1 GM after tomorrow.

It is not a simple configuration change, it also needs rewriting some
libraries. If you can figure it out, we’ll owe you a virtual beer or tea
or coffee :wink:

Maybe it is “just” a matter of keeping local copy of a few rpms and
installing one set or the other on a command.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

No one only has to play around with some symlinks as I showed in this thread: http://forums.opensuse.org/english/get-technical-help-here/laptop/490016-fatal-module-nvidia-not-found-but-nvidia-gpu-switched-off-bios-how-get-rid-warn.html

Now that example was for switching between Intel and Nvidia on a muxed Optimus system, but the logic for OpenGL would be the same for switching between Nvidia and nouveau, the nvidia module can actually be removed in boot.local and xorg will use nouveau.

AFAICS the nvidia RPMs do the following that could interfere with nouveau:

  • install a new libGL to /usr/X11R6/lib(64) and add that directory to the linker path in /etc/ld.so.conf.d/nvidia-gfxG03.conf
  • install a new libglx to /usr/lib(64)/xorg/modules/updates/extensions/ which is preferred by X over the standard /usr/lib(64)/xorg/modules/extensions/

So if you undo those changes, nouveau should fully work:
Move /etc/ld.so.conf.d/nvidia-gfxG03.conf to somewhere else (or remove read permissions), and move /usr/lib(64)/xorg/modules/updates/extensions/libglx.so* (or maybe just rename the whole directory).

And another thing:
/etc/modprobe.d/50-nvidia.conf is not included in the standard distro anymore starting with 13.1, it’s part of the nvidia driver rpm there. But it shouldn’t give problems with nouveau since up to 12.3 it was part of a normal openSUSE install.

On 2013-11-19 10:06, wolfi323 wrote:
>
> hank_se;2598718 Wrote:
>> I’m quite sure that can be done, at least if nvidia is installed the
>> easy way, but I don’t have nvidia installed the easy way right now, I’m
>> on 13.1-RC1, I’ll return on this when i have 13.1 GM after tomorrow.
> AFAICS the nvidia RPMs do the following that could interfere with
> nouveau:
> - install a new libGL to /usr/X11R6/lib(64) and add that directory to
> the linker path in /etc/ld.so.conf.d/nvidia-gfxG03.conf
> - install a new libglx to /usr/lib(64)/xorg/modules/updates/extensions/
> which is preferred by X over the standard
> /usr/lib(64)/xorg/modules/extensions/

That could be handled keeping both copies somewhere else and symlinking
the appropriate one as needed.

> So if you undo those changes, nouveau should fully work:
> Move /etc/ld.so.conf.d/nvidia-gfxG03.conf to somewhere else (or remove
> read permissions), and move
> /usr/lib(64)/xorg/modules/updates/extensions/libglx.so* (or maybe just
> rename the whole directory).

script and move

> And another thing:
> /etc/modprobe.d/50-nvidia.conf is not included in the standard distro
> anymore starting with 13.1, it’s part of the nvidia driver rpm there.
> But it shouldn’t give problems with nouveau since up to 12.3 it was part
> of a normal openSUSE install.

It should be doable. But any update touching any of those files means
extra work.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)