Using only 1 of 2 installed GPUs in X via config files

(EDIT - I'm asking this because I'm not sure if creating an explicit config file means X ignores cards not listed)

I did some searching and putting things together from the handbook and a few other sources I think I'm right. Would appreciate a double check from someone else though before tearing open my box again.

I'm running 14.3 with xfce. I originally had a 7900XT card in the box when I was getting the system up and running. However, I want to use this card for GPU passthru in a virtual machine. So my plan was to put a WX7100 where the 7900XT was and move the 7900XT to another slot.

After replacing the 7900XT with the WX7100 (but not installing the 7900XT into another slot), it did boot into xfce (although I lost my wallpaper and had to put it back). Then when I added the 7900XT back in the machine, I got a black screen with a small cursor-like rectangle in the upper left corner. When I took the 7900XT card out, it took a reboot but xfce boots again.

Just for reference, the first pci slot in my computer is 129 per pciconf
Code:
vgapci0@pci0:129:0:0:    class=0x030000 rev=0x00 hdr=0x00 vendor=0x1002 device=0x67c4 subvendor=0x1028 subdevice=0x0b0d
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Ellesmere [Radeon Pro WX 7100]'
    class      = display
--
    subclass   = HOST-PCI

So, if I want X to use just the WX7100 as the only graphics card, I think I want to create a config file in the /usr/local/etc/X11/xorg.conf.d directory with the following contents to explicitly tell it "just use the WX7100":

Code:
Section "Device"
     Identifier "Card0"
     Driver "radeon"
     BusID "pci0:129:0:0"
EndSection

Is this the way I want to go about this? Between the handbook and some other sources I believe this is right, but I want to make sure before putting the second card back in. I guess that's the good and bad thing when you start with a basic setup and "it just works"- you never have to config anything... until you do lol.

Anyway, thanks in advance for anyone who can confirm this is correct and by explicitly listing one card it ignores the other one.
 
Ok I need some help. That didn't work with both "radeon" and "amdgpu" set as the driver. In both cases x11/lightdm doesn't start and starting with startx fails. I did find another source that doesn't include pci0 in the BusID line. Might try that next.

edit- changing the BusID line to 129:0:0 didn't work either. nor does PCI:129:0:0
 
Ok maybe this specific question will get a response....

I've been doing some more digging and found a man page for xorg.conf.d() and in that page it says:

BusID "bus-id"
This specifies the bus location of the graphics card. For
PCI/AGP cards, the bus-id string has the form
PCI:bus@domain:device:function (e.g., “PCI:1@0:0:0” might be
appropriate for an AGP card). The "@domain" part can be left out
for PCI domain 0.

I'm looking at the handbook examples as well as my own configuration and I'm having difficulty translating the example from the man into my own configuration. The handbook's notation on this makes sense but the man page does not. Was my BusID line that I listed above the correct syntax, or has something changed where the man page is correct but the handbook hasn't updated yet? I remember seeing another post (can't find it now) where someone said to use (what would be in my case) "PCI:129:0:0" or does X recognize both formats?
 
After replacing the 7900XT with the WX7100 (but not installing the 7900XT into another slot), it did boot into xfce (although I lost my wallpaper and had to put it back).
When XFCE worked fine and the PRO WX 7100 was the only graphics card, what did you have as an Xorg conf file, and what was the full path filename of that config file?
 
When XFCE worked fine and the PRO WX 7100 was the only graphics card, what did you have as an Xorg conf file, and what was the full path filename of that config file?

Thanks for checking in.

I didn't have to do anything with config files. Everything worked correctly automatically from the package installs.

One thing I did notice this morning when I was playing with the different display ports.

I was looking through the handbook about graphics cards and displays, and it turns out using xrandr that I was in the 4th display port on the card. As an experiment I moved the display to the first port. A reboot put me back at the "login" prompt without[ports]x11/lightdm[/ports] firing up. Putting it back in the 4th portand rebooting gave me the black screen with a solid cursor in the upperleft corner, then another reboot brought things back to normal.

But to come back to your question, I didn't have to configure anything as it worked out of the box.
 
Also you have radeon listed in your conf file, shouldnt it be amdgpu ?
Use ppt to block one device from being loaded during boot process.
PCI:129:0:0 sometimes does not work, sometimes you have to use pci0:129:0:0 - dont know why.
I usually dont swap gpu`s as for some reasons i have issues with rest of the pci devices and loosing network connectivity.
I have 3 gpus in my current rig.
nVidia P600 , AMD Radeon Pro W5500 and Titan V - in this particular order - i plugged in DP to P600 was no screen and screen comes up only with AMD gpu ( middle card )
In my experience - if i have 2-3 gpus and my xorg is configured with middle one - boot process, bios and everything else goes to that gpu ... i dont know why, maybe the way power goes to PCI lanes, maybe something else ... there is always something with my WS.
 
(Apart from monwarez 's suggestion, I have hardly any passthru experience.)
If you want to explore getting both cards to work with XFCE (non-passthru), see below.

When XFCE worked fine and the PRO WX 7100 was the only graphics card, what did you have as an Xorg conf file, and what was the full path filename of that config file?
I didn't have to do anything with config files. Everything worked correctly automatically from the package installs.
That's promising, that means that the PRO WX 7100 works fine with the default Xorg KMS driver: modesetting(4). If I understand correctly, the more modern one, the 7900XT alone, also seems to work fine without any user defined Xorg .conf file set up: that means it also runs fine on the modesetting driver.

Just to be sure what driver version exactly are you using, please post the result of: pkg query -x '[%R] %n %v' '^drm(-|-510-|-515-|-61-)kmod'
 
Since you want to passthru the device, just use ppt to mask it from Xorg.
Then it will be like there is only one gpu devices.
Yeah, that may be an option. IIRC, # devctl set driver -f pci0:1:0:0 ppt (pci id is from my system) would work for OP for temporary testing.
 
I'm looking at the handbook examples as well as my own configuration and I'm having difficulty translating the example from the man into my own configuration.
https://docs.freebsd.org/en/books/handbook/x11/#x-config-gpu - Example 6,
the current active Handbook documentation is wrong:
Rich (BB code):
The output should be similar to the following:

vgapci0@pci0:0:2:0:     class=0x030000 rev=0x0c hdr=0x00 vendor=0x8086 device=0x46a6 subvendor=0x1028 subdevice=0x0b29
    vendor     = 'Intel Corporation'
    device     = 'Alder Lake-P GT2 [Iris Xe Graphics]'
    class      = display
--
vgapci0@pci0:1:0:0:     class=0x030200 rev=0xa1 hdr=0x00 vendor=0x10de device=0x25b9 subvendor=0x1028 subdevice=0x0b29
    vendor     = 'NVIDIA Corporation'
    device     = 'GA107GLM [RTX A1000 Laptop GPU]'
    class      = display

Example 6. Select Intel® Graphics Driver and NVIDIA® Graphics Driver in a File

/usr/local/etc/X11/xorg.conf.d/20-drivers.conf

Section "Device"
    Identifier "Card0"
    Driver     "intel"
    BusID     "pci0:0:2:0"
EndSection

Section "Device"
    Identifier "Card1"
    Driver     "nvidia-modeset"
    BusID     "pci0:0:2:1"
EndSection
Commit - 2025-07-14 - handbook/x11/_index.adoc rectifies that; I expect that commit will be reflected in the Handbook soon.

I don't know of any "long form" specification for BusID as used in the Handbook, that is: using 4 numbers without the @-sign. I haven't found any documentation about that. For more details, I wrote more extensively about that here.
 
Thank you all for the input. I'm a bit sudafeded up (nasty summer cold thats been bothering me for days) but let me try to answer all of you then I'll get to some testing.

Since you want to passthru the device, just use ppt to mask it from Xorg.
Then it will be like there is only one gpu devices.

That was my plan, and it probably would work if I went and did it straight away. My motivation for doing this "step by step" was to ensure this (used) card was functioning correctly and rule out flaky hardware versus configuration mistakes.. The handbook made it seem like selecting a graphics card was very straightforward which is why I went this route.

Also you have radeon listed in your conf file, shouldnt it be amdgpu ?
Use ppt to block one device from being loaded during boot process.
PCI:129:0:0 sometimes does not work, sometimes you have to use pci0:129:0:0 - dont know why.
I usually dont swap gpu`s as for some reasons i have issues with rest of the pci devices and loosing network connectivity.
I have 3 gpus in my current rig.
nVidia P600 , AMD Radeon Pro W5500 and Titan V - in this particular order - i plugged in DP to P600 was no screen and screen comes up only with AMD gpu ( middle card )
In my experience - if i have 2-3 gpus and my xorg is configured with middle one - boot process, bios and everything else goes to that gpu ... i dont know why, maybe the way power goes to PCI lanes, maybe something else ... there is always something with my WS.

Yes, I saw that too and corrected it to amdgpu. Maybe I missed mentioning that in a reply (I'll blame that on the sudafed) but I tried that with no luck. I also tried both formats (the short form and the explicit version in the handbook though the handbooks seems to be in error based on another response in this thread).

I figured making a "20-" file and explicitly listing the WX7100 would give me some flexibility with the other graphic card. I should have left both cards in and played with plugging the monitor into the 2nd card just to see the behaviour, but I want Xorg to explicitly use the WX7100 leaving the 7900XT free for virtual machines.

(Apart from monwarez 's suggestion, I have hardly any passthru experience.)
If you want to explore getting both cards to work with XFCE (non-passthru), see below.


That's promising, that means that the PRO WX 7100 works fine with the default Xorg KMS driver: modesetting(4). If I understand correctly, the more modern one, the 7900XT alone, also seems to work fine without any user defined Xorg .conf file set up: that means it also runs fine on the modesetting driver.

Just to be sure what driver version exactly are you using, please post the result of: pkg query -x '[%R] %n %v' '^drm(-|-510-|-515-|-61-)kmod'

Your understanding is correct. The 7900XT was the "original" card in the box and Xorg worked no problem. When I had both cards in (moving the 7900XT to another slot) I had the weird behaviour. When I removed the 7900XT (leaving the WX7100 in where the 7900XT originally was) it worked fine after 2 reboots.

the result of the query is:
Code:
[FreeBSD-kmods] drm-61-kmod 6.1.128.1403000_5
[FreeBSD] drm-kmod 20250428


Yeah, that may be an option. IIRC, # devctl set driver -f pci0:1:0:0 ppt (pci id is from my system) would work for OP for temporary testing.
That might be a route to go. I'd comment out the lightdm line in my /etc/rc.conf and install the 7900XT back in so I can get the PCI information for both cards. Still, its troubling me that the default driver works fine but a config file that should be saying the same thing does not. I'd like to get that sorted first.

https://docs.freebsd.org/en/books/handbook/x11/#x-config-gpu - Example 6,
the current active Handbook documentation is wrong:
<snip>
Commit - 2025-07-14 - handbook/x11/_index.adoc rectifies that; I expect that commit will be reflected in the Handbook soon.

I don't know of any "long form" specification for BusID as used in the Handbook, that is: using 4 numbers without the @-sign. I haven't found any documentation about that. For more details, I wrote more extensively about that here.

Thank you for this. I read through both links you provided and reviewed modesetting(). Based on those, the short form of "PCI:129:0:0" should work in my case. I'll do some tweaking in a bit and let you know what happens.
 
So I tried to place a file 20-drivers.conf into the /usr/local/etc/X11/xorg.conf.d directly with the following:
Code:
Section "Device"
Identifier "Card0"
Driver "amdgpu"
BusID "PCI:129:0:0"
EndSection

and the go to startx. Here's whats in Xorg.0.log
Code:
X.Org X Server 1.21.1.18
X Protocol Version 11, Revision 0
[    38.981]
[    38.981] Current version of pixman: 0.46.2
[    38.981]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[    38.981] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    39.002] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[    39.002] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[    39.055] (==) No Layout section.  Using the first Screen section.
[    39.055] (==) No screen section available. Using defaults.
[    39.055] (**) |-->Screen "Default Screen Section" (0)
[    39.055] (**) |   |-->Monitor "<default monitor>"
[    39.056] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[    39.056] (**) |   |-->Device "Card0"
[    39.056] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[    39.056] (**) Allowing byte-swapped clients
[    39.056] (==) Automatically adding devices
[    39.056] (==) Automatically enabling devices
[    39.056] (==) Automatically adding GPU devices
[    39.056] (==) Automatically binding GPU devices
[    39.056] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    39.148] (==) FontPath set to:
    /usr/local/share/fonts/misc/,
    /usr/local/share/fonts/TTF/,
    /usr/local/share/fonts/OTF/,
    /usr/local/share/fonts/Type1/,
    /usr/local/share/fonts/100dpi/,
    /usr/local/share/fonts/75dpi/,
    catalogue:/usr/local/etc/X11/fontpath.d
[    39.148] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[    39.148] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[    39.148] (II) Module ABI versions:
[    39.148]     X.Org ANSI C Emulation: 0.4
[    39.148]     X.Org Video Driver: 25.2
[    39.148]     X.Org XInput driver : 24.4
[    39.148]     X.Org Server Extension : 10.0
[    39.162] (II) xfree86: Adding drm device (/dev/dri/card0)
[    39.162] (II) Platform probe for /dev/dri/card0
[    39.176] (--) PCI:*(129@0:0:0) 1002:67c4:1028:0b0d rev 0, Mem @ 0x10200000000/8589934592, 0x10400000000/2097152, 0xf0000000/262144, I/O @ 0x00003000/256, BIOS @ 0x????????/65536
[    39.177] (II) LoadModule: "glx"
[    39.177] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[    39.247] (II) Module glx: vendor="X.Org Foundation"
[    39.247]     compiled for 1.21.1.18, module version = 1.0.0
[    39.247]     ABI class: X.Org Server Extension, version 10.0
[    39.247] (II) LoadModule: "amdgpu"
[    39.257] (WW) Warning, couldn't open module amdgpu
[    39.257] (EE) Failed to load module "amdgpu" (module does not exist, 0)
[    39.257] (EE) No drivers available.
[    39.257] (EE)
Fatal server error:
[    39.257] (EE) no screens found(EE)
[    39.257] (EE)
Please consult the The X.Org Foundation support
     at http://wiki.x.org
 for help.
[    39.257] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    39.257] (EE)
[    39.257] (EE) Server terminated with error (1). Closing log file.

but a snippet of kldstat shows
Code:
Id Refs Address                Size Name
 7    1 0xffffffff83800000   6648d8 amdgpu.ko
14    1 0xffffffff837b7000     a0c0 amdgpu_polaris10_mc_bin.ko
15    1 0xffffffff837c2000     6378 amdgpu_polaris10_pfp_2_bin.ko
16    1 0xffffffff837c9000     6378 amdgpu_polaris10_me_2_bin.ko
17    1 0xffffffff837d0000     4378 amdgpu_polaris10_ce_2_bin.ko
18    1 0xffffffff837d5000     7ca0 amdgpu_polaris10_rlc_bin.ko
19    1 0xffffffff83e65000    42388 amdgpu_polaris10_mec_2_bin.ko
20    1 0xffffffff83ea8000    42388 amdgpu_polaris10_mec2_2_bin.ko
21    1 0xffffffff837dd000     5278 amdgpu_polaris10_sdma_bin.ko
22    1 0xffffffff837e3000     5278 amdgpu_polaris10_sdma1_bin.ko
23    1 0xffffffff83eeb000    5db60 amdgpu_polaris10_uvd_bin.ko
24    1 0xffffffff83f49000    2ac80 amdgpu_polaris10_vce_bin.ko
25    1 0xffffffff83f74000    21d88 amdgpu_polaris10_smc_bin.ko


Removing the file I created makes everything start up normally.
 
So far, we've seen that both your AMD graphics cards work with the default Xorg modesetting driver, I see no particular reason for trying to use the Xorg amdgpu driver. Note that the amdgpu-s in kld_list="amdgpu" and in
Rich (BB code):
Section "Device"
Identifier "Card0"
Driver "amdgpu"
BusID "PCI:129:0:0"
EndSection
are not the same:
Rich (BB code):
[1-0] # pkg query -x '[%R] %n %v' '^drm(-|-510-|-515-|-61-)kmod|xf86-video-amdgpu' | column -t
[FreeBSD-kmods]  drm-61-kmod        6.1.128.1403000_5
[FreeBSD]        xf86-video-amdgpu  22.0.0_2
[2-0] # pkg which /boot/modules/amdgpu.ko
/boot/modules/amdgpu.ko was installed by package drm-61-kmod-6.1.128.1403000_5
[3-0] # pkg which /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so
/usr/local/lib/xorg/modules/drivers/amdgpu_drv.so was installed by package xf86-video-amdgpu-22.0.0_2
  1. amdgpu.ko is the DRM-KMS driver that is referenced in kld_list="amdgpu"
  2. amdgpu_drv.so is the Xorg driver that is referenced in Driver "amdgpu" and in your log file:
    Code:
    [    39.247] (II) LoadModule: "amdgpu"
    [    39.257] (WW) Warning, couldn't open module amdgpu
#1 is a kernel driver, #2 is not; both are vendor specific. The Xorg modesetting driver is not vendor-specific.

[ 39.257] (WW) Warning, couldn't open module amdgpu
[ 39.257] (EE) Failed to load module "amdgpu" (module does not exist, 0)
I suspect that you do not have amdgpu_drv.so because you do not have the package x11-drivers/xf86-video-amdgpu installed.
 
Erichans Thank you for the reply and the driver clarification.

Indeed, x11-drivers/xf86-video-amdgpu was not installed as I did not have the amdgpu_drv.so on my system.

Question 1: would be be able to use "modesetting" as the driver in a config file if I so chose?
Question 2: Did I miss the need for x11-drivers/xf86-video-amdgpu in the handbook? I was looking through there and in the other links you provided previously, and didn't see that package listed (in particular, Section 5.2 Table 1) nor did it come up searching for "xf86-video-amdgpu" in the pdf version of the handbook.

I added the package to my system, put the file back in and tried to startx. It did load the driver (thank you for this) but still no joy. The log file has some interesting information (what I think is the relevant snippet):
Code:
[   101.950] (II) xfree86: Adding drm device (/dev/dri/card0)
[   101.950] (II) Platform probe for /dev/dri/card0
[   101.964] (--) PCI:*(129@0:0:0) 1002:67c4:1028:0b0d rev 0, Mem @ 0x10200000000/8589934592, 0x10400000000/2097152, 0xf0000000/262144, I/O @ 0x00003000/256, BIOS @ 0x????????/65536
[   101.964] (II) LoadModule: "glx"
[   101.964] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   101.965] (II) Module glx: vendor="X.Org Foundation"
[   101.965]     compiled for 1.21.1.18, module version = 1.0.0
[   101.965]     ABI class: X.Org Server Extension, version 10.0
[   101.965] (II) LoadModule: "amdgpu"
[   101.965] (II) Loading /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so
[   101.965] (II) Module amdgpu: vendor="X.Org Foundation"
[   101.965]     compiled for 1.21.1.18, module version = 22.0.0
[   101.965]     Module class: X.Org Video Driver
[   101.965]     ABI class: X.Org Video Driver, version 25.2
[   101.965] (II) AMDGPU: Driver for AMD Radeon:
    All GPUs supported by the amdgpu kernel driver
[   101.966] (--) Using syscons driver with X support (version 2.0)
[   101.966] (--) using VT number 9

[   101.981] (EE) No devices detected.
[   101.981] (EE) 
Fatal server error:
[   101.981] (EE) no screens found(EE) 
[   101.981] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[   101.981] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   101.981] (EE) 
[   101.981] (EE) Server terminated with error (1). Closing log file.

Question 3: If configuring graphics per handbook section 5.5.2, is it also a requirement to configure a screen per section 5.5.3.2?

Thanks again for the help. I'm off to get some tea and some more decongestant.
 
My AMD GPU is not supported ( in some ways, firmware is ) , i was unable to use Xorg but was able to use Wayland but there was a issue - crashes , 2-3 times a day and other issues.
YOUR GPU , firmware for gpu . As you can see is not really supported by freebsd gpu firmware-kmod etc. As far as i can see. I have same issue with my AMD PRO W5500 even knowing part of firmware etc is supported.
There is things like gcn, vcn, dcn etc.
Few times my gpu was able to log in to my window Manager etc. but on a rare occasion and even then once you reboot-refresh it - crashes. I dont know why, how etc. also KMOD versions too ... i think there is some topic on how they managed to run less supported/unsupported gpu at that time by compiling, patching stuff.
Like your GPu`s System DMA: 3.0.0 and when you install gpu-kmod lowest gpu-firmware-amd-kmod-sdma-5-2-6>0
Some of these stuff are provided by Xorg driver xf86-video-amd ( i think i spelled correctly ) but for some reasons, it does not help ... like with lates kmod i have black screen but i can ssh into it and so forth. or i just going to buy AMD RX570/580 gpu so i know it will work :)

P.s.: Your gpu code name is: Ellesmere, no firmware-kmod found by this name.
EDIT: some gpu`s are not supported, so better to check before buying one to make sure it is.
 
My AMD GPU is not supported ( in some ways, firmware is ) , i was unable to use Xorg but was able to use Wayland but there was a issue - crashes , 2-3 times a day and other issues.
YOUR GPU , firmware for gpu . As you can see is not really supported by freebsd gpu firmware-kmod etc. As far as i can see. I have same issue with my AMD PRO W5500 even knowing part of firmware etc is supported.
There is things like gcn, vcn, dcn etc.
Few times my gpu was able to log in to my window Manager etc. but on a rare occasion and even then once you reboot-refresh it - crashes. I dont know why, how etc. also KMOD versions too ... i think there is some topic on how they managed to run less supported/unsupported gpu at that time by compiling, patching stuff.
Like your GPu`s System DMA: 3.0.0 and when you install gpu-kmod lowest gpu-firmware-amd-kmod-sdma-5-2-6>0
Some of these stuff are provided by Xorg driver xf86-video-amd ( i think i spelled correctly ) but for some reasons, it does not help ... like with lates kmod i have black screen but i can ssh into it and so forth. or i just going to buy AMD RX570/580 gpu so i know it will work :)

P.s.: Your gpu code name is: Ellesmere, no firmware-kmod found by this name.
EDIT: some gpu`s are not supported, so better to check before buying one to make sure it is.

Thanks for the heads up. I tried this card because it was a single slot card so it was easier to fit into my box. I think one of the things that has been tripping me up is that I'm not distinguishing support for FreeBSD versus support for Xorg. My reference for determining if this card was ok was the freebsd wiki at https://wiki.freebsd.org/Graphics/AMD-GPU-Matrix but again, it says there to use amdgpu for the kernel module which is not the same as support in Xorg.

I still find it curious that the card is "half supported" i.e. using a default configuration works but any attempt at tweaking does not. When I get time I'm going to do some more research just for my own satisfaction for understanding this. The card was not a huge expense fortunately and since it

Fortunately I do have a pair of RX580's here (perks of being a hardware packrat) and I think I have the space to shoehorn one in which I might try instead, but that's going to wait until tomorrow.
 
Question 1: would be be able to use "modesetting" as the driver in a config file if I so chose?
Question 2: Did I miss the need for rivers/xf86-video-amdgpux11-drivers/xf86-video-amdgpu in the handbook? I was looking through there and in the other links you provided previously, and didn't see that package listed (in particular, Section 5.2 Table 1) nor did it come up searching for "xf86-video-amdgpu" in the pdf version of the handbook.
Starting with the last item. The general trend in graphcs drivers wrt Xorg drivers is to move from vendor specific drivers (such as x11-drivers/xf86-video-amdgpu) to a generalised driver model, i.e. the Xorg modesetting driver. I'm guessing, that might be the reason it isn't mentioned in the Handbook. Mostly, when using for AMD graphics, if Xorg amdgpu works, then modesetting also works and vice versa; the AMD PRO graphics however seem to be an exception to that as I've seen them nowhere being mentioned specifically in FreeBSD documentation.

Without any specific Xorg conf files added by you, you've shown that each AMD card individually, works: that means that they are using the Xorg modesetting driver: you're Xorg log will show that. When testing with the modesetting driver, delete x11-drivers/xf86-video-amdgpu.

Ideally, your two cards both installed at the same time should work automatically.
When testing your dual setup, you could set up two distinct targetted sets of Xorg config setting, made specific by means of their BusID and unique identifier. In dual test setup, please provide complete Xorg logs of both graphics cards. Please do not post mere snippets, but, for example, use cat /var/log/Xorg.0.log | nc termbin.com 9999 (there might be an additional log, like Xorg.1.log) and post the resulting link(s) (it wouldn't be the first time that an interesting part of the log happens to be just-out-of-the-view of what is being offered by the snippet). Of course each time accompanied with your individual Xorg config files.

The main problem that you seem to have is with getting both cards functioning when both are installed. It seems that finding or defining a specific config setting that manages to output video as intended to the connecting screen cable, i.e. physical DP connector, of all your graphics cards gave problems. In part you seem to have solved this by changing the DP cable to another output port.

My reference for determining if this card was ok was the freebsd wiki at https://wiki.freebsd.org/Graphics/AMD-GPU-Matrix but again, it says there to use amdgpu for the kernel module which is not the same as support in Xorg.
Again, not the same, but easily confused:
"radeonkms" and "amdgpu" in the wiki are referring to what you specify as kld_list="radeonkms" and kld_list="amdgpu"
x11-drivers/xf86-video-amdgpu (amdgpu_drv.so specified in an Xorg Section Device as Driver "amdgpu"), as in an Xorg Section DeviceDriver "amdgpu") is an open source Xorg driver, yet vendor specific, amdgpu(4):
Code:
DESCRIPTION
       amdgpu is an Xorg driver	for AMD	RADEON-based video cards with the fol-
       lowing features:
 
Last edited:
Ideally, your two cards both installed at the same time should work automatically.
When testing you dual setup, you could set up two distinct targetted sets of Xorg config setting, made specific by means of their BusID and unique identifier. In dual test setup, please provide complete Xorg logs of both graphics cards. Please do not post mere snippets, but, for example, use cat /var/log/Xorg.0.log | nc termbin.com 9999 (there might be an additional log, like Xorg.1.log) and post the resulting link(s) (it wouldn't be the first time that an interesting part of the log happens to be just-out-of-the-view of what is being offered by the snippet). Of course each time accompanied with your individual Xorg config files.

Thank you again for such a detailed explanation of things. Although GlitchyDot 's post indicates the WX may not be fully supported, I'm going to go head and put the other card back in and give it a go and print some logs. After that if things are a dead end I'll shoehorn the RX580 into the first slot and see what happens.

I'll keep all of you posted.

To everyone who took time to read and/or reply: THANK YOU. I genuinely appreciate your time.
 
Well, Erichans , I'm not sure why it worked, but it worked.

I put my second card back in, and created a config file to put in /usr/local/etc/X11/xorg.conf.d/ directory. Here's what the (final) file looked like:
Code:
Section "Device"
    Identifier "Card0"
    BusID "PCI:129:0:0"
EndSection

My thought process for only putting one card in the file was to say to Xorg "yes, I know there are two cards in here, but this is the only one I want to use." I had an error in the file the first time I tried to startx so it splutted- I used the wrong syntax in the BusID line. For some reason my file I had archived still had the incorrect handbook formatting, not the "short form" discussed earlier in this thread.

When I changed it to the short form format shown above, I got the black screen with the solid cursor in the upper left corner. My first thought was "oh <bleep> I'm either editing this file again or taking this card out again" but then the screen went totally black and the system found its way. I got a mouse and a display and I'm typing this to you with both cards in the machine.

Though I'm satisfied that things are working, (and hence can move to the next step of creating the passthru for my other card since I know its PCI address), I'm not satisfied with my understanding of why it worked and what capabilities of the card are supported. From what I see in the Xorg.0.log file (link is below, don't worry), it loaded the kms, vesa, scfb and a few other bits and bobs. It then recognized the WX7100 and enabled glamor X acceleration for it, grabbed the EDID information of the display, then unloaded the scfb and vesa modules, and near the end of the log it said:

Code:
[   587.829] (II) modeset(G0): [DRI2] Setup complete
[   587.829] (II) modeset(G0): [DRI2]   DRI driver: radeonsi
[   587.829] (II) modeset(G0): [DRI2]   VDPAU driver: radeonsi

So it looks like I have at least 2D hardware acceleration through the WX7100 card. If you have a moment of time and want to help clarify exactly what drivers it settled on, the requested log file is here (only my machine name and time/date stamp of the log are redacted):


The Xorg.1.log was short and didn't seem to have any relevant information, but I can post that as well.

I really appreciate you and everyone else taking the time out to help me with this. I learned a lot and I'm going to edit the title of the thread once my knowedge of this is a little more sorted to make it easier to find this in search queries.

GlitchyDot - Did you do something similar and it still didn't work for your card?
 
Well I started experimenting with GPU passthrough by using nxjoseph 's suggestion of devctl set driver -f pci0:1:0:0 ppt to do testing, and every time I go to exit out of X it crashes with a single character in the corner that does vary.

So, I went ahead and hardcoded some things into /boot/loader.conf and as a result X is far more unstable. One boot gave me the solid cursor in upper left corner and hung. 2nd boot let me in but then locked up. 3rd boot did the cursor trick, 4th boot cursor, and 5th boot is where I am now trying things and so far X is seeming stable. Just thought I would update as I have to probably start a thread in virtualization because I can't get GPU passthrough to work.
 
or i just going to buy AMD RX570/580 gpu so i know it will work :)

P.s.: Your gpu code name is: Ellesmere, no firmware-kmod found by this name.
EDIT: some gpu`s are not supported, so better to check before buying one to make sure it is.

Something I found you might be interested in. I swapped out the WX7100 for an RX580 due to instability issues I was having when trying to passthru in case what you're saying is correct and wanted to rule out GPU. When I was looking at vm passthru when my guest was active these two lines stuck out:

Code:
vgapci0    129/0/0      No           Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
hdac0      129/0/1      No           Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]

So the RX580 is also an Ellesmere.

Just thought you might find this interesting.
 
Your gpu code name is: Ellesmere,
So the RX580 is also an Ellesmere.
FYI, as reported by Tech Powerup:

Release dateCardGenerationCodenameOld codename
2016-Nov 10thAMD Radeon Pro WX 7100Radeon Pro PolarisPolaris 10/20/30Cozumel / Hawaii Refresh
2017-Apr 18thAMD Radeon RX 580PolarisEllesmere-
2020-Feb 10thAMD Radeon Pro W5500Radeon Pro NaviGaming (sic!)-

Looking at Radeon™ PRO WX 7100 Drivers & Support and Radeon™ PRO W5500 Drivers & Support it seems clear that PRO variants are set apart from non-PRO-s, also wrt driver support.
 
Witch graphic card / graphic settings I must use in VM (UTM/QEMU or VMware Fusion) on an M1 (Apple Silicone) MacMini?
 
Back
Top