How to disable Nvidia drivers?

Hi guys.
I’m using portable Manjaro between two machines.
Machine one: AMD Vega 8 Integrated Graphics
Machine two: No Integrated Graphics and Nvidia GTX 760
When I installed Nvidia nonfree drivers, there’s no way to boot into desktop on machine one.
Can I disable the Nvidia Graphics Driver so that I can use the system on machine one?
I know that is a wired demand, but if you have the solution, please give me a hand. Thanks!

do both machines have secure boot disabled?
are they both running in uefi or bios mode?

1 Like

I’m not sure the second machine’s security boot is disabled. Because its BIOS is so limited.
Both of the machines are running in UEFI mode.
Thank you for your reply!

Hello @Kare_Udon :wink:

Not at all. It is a configuration. Just a hint:

You can create prioritized xorg configs at /etc/X11/xorg.conf.d/. So lets say:

  • 91-nvidia.conf
  • 92-amd.conf

Now when loading xorg, it will first use 92-nvidia.conf, if the device is not there, then it checks 91-amd.conf. So the number is the key.

At bare minimum it could look like:

File: 92-nvidia.conf

Section "Device"
    Identifier "nvidia card"
    Driver "nvidia"
    #BusID "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "nvidia card"
EndSection

File: 91-amd.conf

Section "Device"
    Identifier "amd card"
    Driver "amdgpu" # or modesetting
    #BusID "PCI:0:1:0"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "amd card"
EndSection

Also rename the 90-mhwd.conf to 90-mhwd.conf.backup to deactivate it if there.

1 Like

Hi! Wonderful reply!
After adding these settings, I can successfully boot into machine two, but still can not boot into desktop environment on machine one.
The graphic card info of machine one:

04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev ce) (prog-if 00 [VGA controller])
	Subsystem: Lenovo Device 3813
	Flags: bus master, fast devsel, latency 0, IRQ 39, IOMMU group 5
	Memory at b0000000 (64-bit, prefetchable) [size=256M]
	Memory at c0000000 (64-bit, prefetchable) [size=2M]
	I/O ports at 1000 [size=256]
	Memory at c0500000 (32-bit, non-prefetchable) [size=512K]
	Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
	Capabilities: [48] Vendor Specific Information: Len=08 <?>
	Capabilities: [50] Power Management version 3
	Capabilities: [64] Express Legacy Endpoint, MSI 00
	Capabilities: [a0] MSI: Enable- Count=1/4 Maskable- 64bit+
	Capabilities: [c0] MSI-X: Enable+ Count=4 Masked-
	Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
	Capabilities: [270] Secondary PCI Express
	Capabilities: [2b0] Address Translation Service (ATS)
	Capabilities: [2c0] Page Request Interface (PRI)
	Capabilities: [2d0] Process Address Space ID (PASID)
	Capabilities: [400] Data Link Feature <?>
	Capabilities: [410] Physical Layer 16.0 GT/s <?>
	Capabilities: [440] Lane Margining at the Receiver <?>
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

I have tried to change the setting ‘Driver’ to ‘amdgpu’ and ‘linux’ but none of them works.

Maybe I was wrong about the numbers… switch them:

91-nvidia.conf92-nvidia.conf
92-amd.conf - 91-amd.conf

Also rename the 90-mhwd.conf to 90-mhwd.conf.backup to deactivate it.

1 Like

I disabled 90-mhwd.conf,
adjust the numbers and change the ‘Driver’ setting to ‘amdgpu’,
and it finally worked!
Thank you so much for your help!

Great :wink:

I switched the solution tag and corrected my advice accordingly. Is that correct so far? I mean is it the way you managed it?

Some bad news :smiling_face_with_tear:
When I set 91-amd.conf and 92-nvidia.conf, machine one (AMD) works but machine two (Nvidia) not.
When it is 91-nvidia.conf and 92-amd.conf, machine two works (but the desktop looks a little wired, not as smooth as before, but graphic card works fine) and machine one do not.
So I think it is a solution but not the perfect one :rofl:
By the way, I am using KDE Plasma.

Hm… it was while since I did it…

maybe both needs the same number?

That are the system configs: /usr/share/X11/xorg.conf.d/. Don’t change them. Add a OutputClass here: /etc/X11/xorg.conf.d/.

Maybe an OutputClass is just enough?

File: 10-nvidia.conf

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

File: 10-amd.conf

Section "OutputClass"
    Identifier "AMDgpu"
    MatchDriver "amdgpu"
    Driver "amdgpu"
EndSection

Just test it. 10 is here then high priority.

3 Likes

Nice, it is the best solution!
Both of the machines can boot into Desktop environment.
Thank you so much :blush:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.