Configure X to ignore Nvidia card

Issues related to applications and software problems
Post Reply
Elliott
Posts: 44
Joined: 2018/09/14 01:30:14

Configure X to ignore Nvidia card

Post by Elliott » 2018/11/14 18:33:41

I'm building a machine with an Nvidia GPU for CUDA processing using the Nvidia proprietary driver. I want X to run on the integrated VGA, so when the Nvidia installer asks if I want to run nvidia-xconfig I say no. Now after a reboot I get a gray screen saying "Oh no! Something has gone wrong".
I have already blacklisted nouveau in /etc/modprobe.d/blacklist.conf. This is my typical process when setting up a machine with an Nvidia card.

I tried X -configure but the file it creates is no good, because it tries to use nouveau. I just don't know enough about X to fix it. Below is the automatically generated file. Before installing the Nvidia driver, it was working fine on VGA.

Code: Select all

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/lib64/xorg/modules"
	FontPath     "catalogue:/etc/X11/fontpath.d"
	FontPath     "built-ins"
EndSection

Section "Module"
	Load  "glx"
	Load  "glxserver_nvidia"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"           	# [<bool>]
        #Option     "HWcursor"           	# [<bool>]
        #Option     "NoAccel"            	# [<bool>]
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "VideoKey"           	# <i>
        #Option     "WrappedFB"          	# [<bool>]
        #Option     "GLXVBlank"          	# [<bool>]
        #Option     "ZaphodHeads"        	# <str>
        #Option     "PageFlip"           	# [<bool>]
        #Option     "SwapLimit"          	# <i>
        #Option     "AsyncUTSDFS"        	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "DRI"                	# <i>
	Identifier  "Card0"
	Driver      "nouveau"
	BusID       "PCI:59:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Configure X to ignore Nvidia card

Post by jlehtone » 2018/11/14 19:35:45

"Nvidia installer"?

Binary blob? Not the RPM-package from ELRepo? The package would be more convenient to cope with.

It does add:

Code: Select all

Section "Device"
	Driver      "nvidia"
EndSection
and disables nouveau (from loading as kernel module).

You can edit that file to choose a different driver.

By "integrated" you probably mean IGP in the CPU?
Is the IGP enabled when there is discrete card? (Laptops tend to use both.)
Perhaps there is BIOS option to have both active?


Current X does not "need" any config files. It autodetects everything by default. It allows overriding details of configuration. Hence the "one section only" config.
You can have multiple files in /etc/X11/xorg.conf.d/.

/var/log/Xorg*.log do show what the X did detect&do.

Elliott
Posts: 44
Joined: 2018/09/14 01:30:14

Re: Configure X to ignore Nvidia card

Post by Elliott » 2018/11/14 19:46:37

jlehtone wrote:
2018/11/14 19:35:45
"Nvidia installer"?
By "integrated" you probably mean IGP in the CPU?
Is the IGP enabled when there is discrete card? (Laptops tend to use both.)
Perhaps there is BIOS option to have both active?
I always install the latest long lived branch version from https://www.nvidia.com/object/unix.html and I blacklist nouveau. Seems cleaner that way.
The only BIOS option here is to enable the embedded video controller, which I have done. X works fine on VGA before I installed the Nvidia driver, even though the configuration should not have changed. I think that without an xorg.conf file, it tries to run on the Nvidia card, but I want to force it to run on the integrated VGA. This is a Dell 7920 and the integrated video according to lspci is like this. It's an Intel CPU, so I was surprised to see Matrox video.

Code: Select all

03:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. Device 0536 (rev 04) (prog-if 00 [VGA controller])
	Subsystem: Dell Device 0718
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 64 (4000ns min, 8000ns max)
	Interrupt: pin A routed to IRQ 16
	NUMA node: 0
	Region 0: Memory at 91000000 (32-bit, prefetchable) [size=16M]
	Region 1: Memory at 92808000 (32-bit, non-prefetchable) [size=16K]
	Region 2: Memory at 92000000 (32-bit, non-prefetchable) [size=8M]
	Expansion ROM at <unassigned> [disabled]
	Capabilities: [dc] Power Management version 3
		Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Kernel driver in use: mgag200
	Kernel modules: mgag200
I have been trying various driver options in xorg.conf including vesa, fbdev, mgag200, intel, and modesetting, but I don't know which is the correct one to use. It seems like modesetting gets me the farthest. This is my latest attempt:

Code: Select all

Section "Device"
	Identifier "IntegratedVGA"
	Driver "modesetting"
	BusID "PCI:03:00:0"
EndSection
This gives an error: (EE) modeset: Failed to load module "glamoregl" (module does not exist, 0)
Maybe that's okay, because it continues to correctly detect my VGA display model and supported timings and then it fails like this:
(EE) AIGLX error: dlopen of /usr/lib64/dri/swrast_dri.so failed (/usr/lib64/dri/swrast_dri.so: undefined symbol: _glapi_tls_Dispatch)
(EE) GLX: could not load software renderer
(II) GLX: no usable GL providers found for screen 0



By the way, can anyone tell me how to read the symbols in xorg log file? Each line has something like (**) or (==) and I don't know what that means.

Post Reply