You are not logged in.

#1 2016-02-04 16:30:11

nose
Member
Registered: 2014-09-22
Posts: 5

2 GPUs, nVidia + AMD - how to set primary device (how to setup X11).

Hey guys,
this is my first post and i am sorry for my bad english!
status quo:
I got two graphics cards in my desktop one nvidia and one amd:

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii PRO [Radeon R9 290] (rev 80)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device aac8
...
05:00.0 VGA compatible controller: NVIDIA Corporation GK107GL [Quadro K600] (rev a1)
05:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)

The AMD one is installed in my first PCI-E x16 slot the nVidia in 2nd x16 slot.

Goal:
use the nVidia as the primary graphics card
and use the amd for PCI-Passthrough via libvirt.

i got this working the otherway around (AMD host, and NVIDIA guest) - but this is not the question, its just that my system does not use the nvidia card execpt if i take the amd out of my mainboard.
My idea was to let linux ignore the AMD card so it will use the nVidia.
What i did:
I used vfio-pci to bind to the AMD device at boot

/etc/modprobe.d/vfio.conf
options vfio-pci ids=8086:0151,1002:67b1,1002:aac8

And i loaded vfio early in the boot process.

/etc/mkinitcpio.conf
...
MODULES="vfio vfio_iommu_type1 vfio_pci vfio_virqfd"
...

the good thing is it works:

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii PRO [Radeon R9 290] (rev 80)
	Subsystem: PC Partner Limited / Sapphire Technology Device e324
	Kernel driver in use: vfio-pci
	Kernel modules: radeon
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device aac8
	Subsystem: PC Partner Limited / Sapphire Technology Device aac8
	Kernel driver in use: vfio-pci
	Kernel modules: snd_hda_intel


------------------------------Back to the question:-----------------------------------

Why does my nvidia card nothing?
nouveau loads and is binded:

05:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107GL [Quadro K600] [10de:0ffa] (rev a1)
	Subsystem: NVIDIA Corporation Device [10de:094b]
	Kernel driver in use: nouveau
	Kernel modules: nouveau
05:00.1 Audio device [0403]: NVIDIA Corporation GK107 HDMI Audio Controller [10de:0e1b] (rev a1)
	Subsystem: NVIDIA Corporation Device [10de:094b]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

here is my Xorg.0.log:

[     6.800] 
X.Org X Server 1.18.0
Release Date: 2015-11-09
[     6.800] X Protocol Version 11, Revision 0
[     6.800] Build Operating System: Linux 4.2.5-1-ARCH x86_64 
[     6.800] Current Operating System: Linux nose-xeon-arch 4.3.3-3-ARCH #1 SMP PREEMPT Wed Jan 20 08:12:23 CET 2016 x86_64
[     6.800] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=f18c5d59-f6a6-426e-851b-f9d890fd9f65 rw quiet intel_iommu=on
[     6.800] Build Date: 08 January 2016  05:56:16PM
[     6.800]  
[     6.800] Current version of pixman: 0.32.8
[     6.800] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[     6.800] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     6.800] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Feb  4 16:47:21 2016
[     6.800] (==) Using config directory: "/etc/X11/xorg.conf.d"
[     6.800] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     6.800] (==) No Layout section.  Using the first Screen section.
[     6.800] (==) No screen section available. Using defaults.
[     6.800] (**) |-->Screen "Default Screen Section" (0)
[     6.800] (**) |   |-->Monitor "<default monitor>"
[     6.800] (==) No device specified for screen "Default Screen Section".
	Using the first device section listed.
[     6.800] (**) |   |-->Device "nouveau"
[     6.800] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[     6.800] (==) Automatically adding devices
[     6.800] (==) Automatically enabling devices
[     6.800] (==) Automatically adding GPU devices
[     6.800] (==) Max clients allowed: 256, resource mask: 0x1fffff
[     6.800] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[     6.800] 	Entry deleted from font path.
[     6.800] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[     6.800] 	Entry deleted from font path.
[     6.800] 	(Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[     6.800] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[     6.800] 	Entry deleted from font path.
[     6.800] 	(Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[     6.800] (==) FontPath set to:
	/usr/share/fonts/misc/,
	/usr/share/fonts/TTF/,
	/usr/share/fonts/OTF/
[     6.800] (==) ModulePath set to "/usr/lib/xorg/modules"
[     6.800] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[     6.800] (II) Loader magic: 0x819d40
[     6.800] (II) Module ABI versions:
[     6.800] 	X.Org ANSI C Emulation: 0.4
[     6.800] 	X.Org Video Driver: 20.0
[     6.800] 	X.Org XInput driver : 22.1
[     6.800] 	X.Org Server Extension : 9.0
[     6.801] (++) using VT number 1

[     6.801] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[     6.801] (II) xfree86: Adding drm device (/dev/dri/card0)
[     6.802] (--) PCI:*(0:1:0:0) 1002:67b1:174b:e324 rev 128, Mem @ 0xe0000000/268435456, 0xf0000000/8388608, 0xf7300000/262144, I/O @ 0x0000e000/256, BIOS @ 0x????????/131072
[     6.802] (--) PCI: (0:5:0:0) 10de:0ffa:10de:094b rev 161, Mem @ 0xf6000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000b000/128, BIOS @ 0x????????/524288
[     6.802] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[     6.802] (II) LoadModule: "glx"
[     6.802] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[     6.803] (II) Module glx: vendor="X.Org Foundation"
[     6.803] 	compiled for 1.18.0, module version = 1.0.0
[     6.803] 	ABI class: X.Org Server Extension, version 9.0
[     6.803] (==) AIGLX enabled
[     6.803] (II) LoadModule: "nouveau"
[     6.803] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so
[     6.803] (II) Module nouveau: vendor="X.Org Foundation"
[     6.803] 	compiled for 1.18.0, module version = 1.0.12
[     6.803] 	Module class: X.Org Video Driver
[     6.803] 	ABI class: X.Org Video Driver, version 20.0
[     6.803] (II) NOUVEAU driver 
[     6.803] (II) NOUVEAU driver for NVIDIA chipset families :
[     6.803] 	RIVA TNT        (NV04)
[     6.803] 	RIVA TNT2       (NV05)
[     6.803] 	GeForce 256     (NV10)
[     6.803] 	GeForce 2       (NV11, NV15)
[     6.803] 	GeForce 4MX     (NV17, NV18)
[     6.803] 	GeForce 3       (NV20)
[     6.804] 	GeForce 4Ti     (NV25, NV28)
[     6.804] 	GeForce FX      (NV3x)
[     6.804] 	GeForce 6       (NV4x)
[     6.804] 	GeForce 7       (G7x)
[     6.804] 	GeForce 8       (G8x)
[     6.804] 	GeForce GTX 200 (NVA0)
[     6.804] 	GeForce GTX 400 (NVC0)
[     6.804] (II) [drm] nouveau interface version: 1.3.0
[     6.804] (EE) No devices detected.
[     6.804] (EE) 
Fatal server error:
[     6.804] (EE) no screens found(EE) 
[     6.804] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[     6.804] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[     6.804] (EE)

My i got a simple xorg config (20-nouveau.conf), but it changes nothing:

Section "Device"
  Identifier "nouveau"
  Driver "nouveau"
EndSection

Has anyone an idea?
The passthorugh stuff is no the point i think i need help to configure X11.

thanks for taking time to read this!
nose

Offline

#2 2016-02-06 01:36:22

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,552

Re: 2 GPUs, nVidia + AMD - how to set primary device (how to setup X11).

not sure if 2 different discrete cards will work, but let's see what x autodetection gives.

please post full lspci -k so we can see all hardware linux detects.

remove all x configuration files , run startx and post xorg log.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2016-02-06 01:46:04

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: 2 GPUs, nVidia + AMD - how to set primary device (how to setup X11).

Seems to me the most foolproof solution would be to swap the cards (nVidia in PCIe 1 and AMD in PCIe 2). If that's not an option, see if your BIOS/UEFI gives you the option to specify "primary display" or such. If the option exists, it should allow selecting a particular PCIe slot.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

Board footer

Powered by FluxBB