Amdgpu and HDMI output not working on ROG Strix G15

Hello everyone,

I'm new to FreeBSD and *nix operating systems, but have been enjoying learning how to use the operating system. I am currently running FreeBSD 13.2.

Unfortunately, I have been having trouble getting the my Xfce desktop display over HDMI. If I have amdgpu included in the kld_list the external monitor works and displays an output from the laptop, but xorg does not load and the desktop environment doesn't display.
But if amdgpu is excluded from kld_list in /etc/rc.conf the Xorg and xfce display correctly.

My laptop, a ROG Strix G15 G513 has two GPUs: 1) an integrated GPU in the AMD Ryzen 9 5900HX and 2) a GeForce RTX 3050 Mobile

When I run pciconf -lv | grep -B4 display I receive the following :

Code:
$ pciconf -lv | grep -B4 display

    subclass   = HOST-PCI
vgapci0@pci0:1:0:0:    class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x25a2 subvendor=0x1043 subdevice=0x10ec
    vendor     = 'NVIDIA Corporation'
    device     = 'GA107M [GeForce RTX 3050 Mobile]'
    class      = display
--
    subclass   = NVM
vgapci1@pci0:6:0:0:    class=0x030000 rev=0xc4 hdr=0x00 vendor=0x1002 device=0x1638 subvendor=0x1043 subdevice=0x10ec
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Cezanne [Radeon Vega Series / Radeon Vega Mobile Series]'
    class      = display

I followed the instructions in the wiki for installing the amdgpu driversusing pkg install drm-kmod and the NVIDIA drivers using pkg install nvidia-driver.

Additionally I made sure that my user profile is included in the "video" group and made sure not to include root in this group.

Currently I do not have amdgpu listed in kld_list. My rc.conf is as follows:
Code:
hostname="jh.home.bsd"
ifconfig_re0="DHCP"
ifconfig_re0_ipv6="inet6 accept_rtadv"
sshd_enable="YES"

dumpdev="AUTO"
zfs_enable="YES"
kld_list="fusefs nvidia-modeset"

powerd_enable="YES"


moused_port=/dev/ums0

moused_enable="YES"

ntpdate_enable="YES"

ntpdate_flags="-u pool.ntp.org"

ntpd_enable="YES"

nfs_client_enable="YES"

rpc_statd_enable="YES"

rpc_lockd_enable="YES"

autofs_enable="YES"

devd_enable="YES"

devfs_system_ruleset="system"

dbus_enable="YES"

linux_enable="YES"



wlans_iwlwifi0="wlan1"
ifconfig_wlan1="WPA DHCP"
ifconfig_ue0="DHCP"

I have attached the Xorg log when it is working to this message.


If I add "amdgpu" to my rc.conf with it showing as kld_list="fusefs nvidia-modeset amdgpu" and reboot, Xorg and the desktop do not load and instead the command line login. When I sign in as my main user profile and try startx, it doesn't load and instead displays: Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices

The full Xorg log file has been included as an attachment.


At this point I am at a loss and unsure what to do next. Does anyone have any recommendations?

I have been trying to read the documentation and doing my best to understand all of it, but as I said I am still new to FreeBSD and *NIX systems, so some of it has definitely been going over my head. Any help and instructions would be greatly appreciated
 

Attachments

  • NOT_working_Xorg_log.txt
    6.3 KB · Views: 75
  • working_Xorg_log.txt
    22.2 KB · Views: 70
Last edited by a moderator:
I am unsure if FreeBSD supports hybrid graphics with AMD and Nvidia.
You might have to choose in only using the integrated GPU or only the Nvidia GPU.
In your case the Nvidia-only approach already seems to work, right?
 
As it is your first post, welcome to the FreeBSD forum!

FreeBSD is able to support multiple graphics cards. In principle FreeBSD should be able to work with both, however, it may be the case that your Ryzen 9 5900HX GPU is not (yet) supported by the current FreeBSD driver you've specified.

With two graphics cards/chipsets the system must be able to differentiate between each one; as the message Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices suggests (those framebuffer devices are your graphics cards). The solution for that lies In your given output:
Rich (BB code):
$ pciconf -lv | grep -B4 display

subclass = HOST-PCI
vgapci0@pci0:1:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x25a2 subvendor=0x1043 subdevice=0x10ec
vendor = 'NVIDIA Corporation'
device = 'GA107M [GeForce RTX 3050 Mobile]'
class = display
--
subclass = NVM
vgapci1@pci0:6:0:0: class=0x030000 rev=0xc4 hdr=0x00 vendor=0x1002 device=0x1638 subvendor=0x1043 subdevice=0x10ec
vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device = 'Cezanne [Radeon Vega Series / Radeon Vega Mobile Series]'
class = display

Check your Xorg configuration directory /usr/local/etc/X11/xorg.conf.d/ (if no such directory exists, create one). There should be a configuration file (if not, create one); the filename is not important (any name will do); it is the directory it's in that counts. In that configuration file you'll have to specify the bus id's of both graphics cards seperately like the example given in the FreeBSD Handbook at 5.4.3. Video Cards ("To configure multiple video cards, the BusID can be added."):
Code:
Section "Device"
    Identifier "Card0"
    Driver     "nvidia"
    BusID      "pci0:1:0:0"
EndSection

Section "Device"
    Identifier "Card1"
    Driver     "amd"
    BusID      "pci0:6:0:0"
EndSection
Verify the lines for Driver and BusID (your quoted output) (as far as I know—and judging by the example given in the Handbook—the lines for Identifier are not necessary to be different; edit: based upon DEVICE SECTION, I'd choose unique names for Identifier) and see what happens when you issue startx.

If this doesn't fully work, then first look at the two situations seperately: use either kld_list="fusefs nvidia-modeset" or kld_list="fusefs amdgpu" (edit: and comment out/delete not relevant settings of the Xorg configuration file accordingly). For the situation that does not work post the related Xorg log file.
 
Thank you both for the warm welcome to the forum!

In your case the Nvidia-only approach already seems to work, right?

It works for displaying a desktop environment, but only on the laptop screen and not with an HMDI output to the monitor.
It seems that only with amdgpu does the HDMI output work, but Xorg and the desktop environment does not.

As it is your first post, welcome to the FreeBSD forum!

FreeBSD is able to support multiple graphics cards. In principle FreeBSD should be able to work with both, however, it may be the case that your Ryzen 9 5900HX GPU is not (yet) supported by the current FreeBSD driver you've specified.

With two graphics cards/chipsets the system must be able to differentiate between each one; as the message Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices suggests (those framebuffer devices are your graphics cards). The solution for that lies In your given output:
Rich (BB code):
$ pciconf -lv | grep -B4 display

subclass = HOST-PCI
vgapci0@pci0:1:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x25a2 subvendor=0x1043 subdevice=0x10ec
vendor = 'NVIDIA Corporation'
device = 'GA107M [GeForce RTX 3050 Mobile]'
class = display
--
subclass = NVM
vgapci1@pci0:6:0:0: class=0x030000 rev=0xc4 hdr=0x00 vendor=0x1002 device=0x1638 subvendor=0x1043 subdevice=0x10ec
vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device = 'Cezanne [Radeon Vega Series / Radeon Vega Mobile Series]'
class = display

Check your Xorg configuration directory /usr/local/etc/X11/xorg.conf.d/ (if no such directory exists, create one). There should be a configuration file (if not, create one); the filename is not important (any name will do); it is the directory it's in that counts. In that configuration file you'll have to specify the bus id's of both graphics cards seperately like the example given in the FreeBSD Handbook at 5.4.3. Video Cards ("To configure multiple video cards, the BusID can be added."):
Code:
Section "Device"
    Identifier "Card0"
    Driver     "nvidia"
    BusID      "pci0:1:0:0"
EndSection

Section "Device"
    Identifier "Card1"
    Driver     "amd"
    BusID      "pci0:6:0:0"
EndSection
Verify the lines for Driver and BusID (your quoted output) (as far as I know—and judging by the example given in the Handbook—the lines for Identifier are not necessary to be different; edit: based upon DEVICE SECTION, I'd choose unique names for Identifier) and see what happens when you issue startx.

If this doesn't fully work, then first look at the two situations seperately: use either kld_list="fusefs nvidia-modeset" or kld_list="fusefs amdgpu" (edit: and comment out/delete not relevant settings of the Xorg configuration file accordingly). For the situation that does not work post the related Xorg log file.

I followed your suggestion and created a driver.conf file in /usr/local/etc/X11/xorg.conf.d/ with the two device sections you suggested, double checking that the BusID matched with the info I received from pciconf -lv. I then added "amdgpu" back to /etc/rc.conf so that it read kld_list="fusefs nvidia-modeset"
and rebooted the computer.

The HDMI output to the monitor worked, but Xorg did not start. When the login prompt appeared, the monitor automatically displayed:
Sept 5 10:23:50 jh dhclient[2381]: send_packet: No buffer space available
pressing enter allowed me to move down a line and the login prompt reappeared.

I have attached the Xorg log for this boot as the attachment both - Xorg.0.log.txt

I then tried again with /etc/rc.conf specifiying kld_list="fusefs nvidia=modeset" or kld_list="fusefs amdgpu"/i]. With either of these configurations, Xorg would not load and would give me an error.

The Xorg log when kld_list="fusefs nvidia=modeset" has been attached to this post as nvidia only - Xorg.0.log.txt

The Xorg log whenkld_list="fusefs amdgpu" has been attached to this post as amdgpu- Xorg.0.log.txt


As I mentioned, with both of the above configurations I could not get my desktop environment to load. I was able to bring myself back to square one and load the desktop environment once again by deleting the driver.conf file I had created in /usr/local/etc/X11/xorg.conf.d/ and restoring kld_list="fusefs nvidia=modeset" in /etc/rc.conf.
 

Attachments

  • both - Xorg.0.log.txt
    4.2 KB · Views: 70
  • nvidia only - Xorg.0.log.txt
    4.1 KB · Views: 71
  • amdgpu - Xorg.0.log.txt
    4.2 KB · Views: 75
Just an update:

I noticed while reviewing the logs which I posted that Xorg said it couldn't find the module "amd". Specifically it said:

Code:
[  1210.070] (II) LoadModule: "amd"
[  1210.071] (WW) Warning, couldn't open module amd
[  1210.071] (EE) Failed to load module "amd" (module does not exist, 0)

As a test, I repeated this experiment but revised the driver.conf so that it looked for "amdgpu" rather than just "amd" as was in Erichans recommendation. The [driver.conf] file read as follows:

Code:
Section "Device"
    Identifier "Card0"
    Driver "nvidia"
    BusID  "pci0:1:0:0"
EndSection

Section "Device"
    Identifier "Card1"
    Driver "amdgpu"
    BusID  "pci0:6:0:0"
EndSection

I then repeated the experiments with the different configurations for kld_list in /etc/rc.conf

The Xorg log when kld_list="fusefs nvidia=modeset amdgpu" has been attached to this post as revised-both-Xorg.0.log.txt

The Xorg log when kld_list="fusefs nvidia=modeset" has been attached to this post as revised-nvidia-Xorg.0.log.txt

The Xorg log when kld_list="fusefs amdgpu" has been attached to this post as revised-amdgpu-Xorg.0.log.txt


Once again, to get back to a desktop environment I had to remove driver.conf from /usr/local/etc/X11/xorg.conf.d/
 

Attachments

  • revised-amdgpu-Xorg.0.log.txt
    4.5 KB · Views: 63
  • revised-both-Xorg.0.log.txt
    4.5 KB · Views: 66
  • revised-nvidia-Xorg.0.log.txt
    4.4 KB · Views: 84
Hello elgrande, thank you as well for the warm welcome.

I tried to load nvidia-settings from the application list, but it would not load.

I tried again from a terminal and these were my results:

$ nvidia-settings

ERROR: Unable to load info from any available system

$ sudo nvidia-settings
Authorization required, but no authorization protocol specified


ERROR: The control display is undefined; please run
`/usr/local/libexec/nvidia-settings --help` for usage information.

$

I have attached a copy of my Xorg log. Currently I have Xorg configured as I did in my original post, that is without the config.rc file added to /usr/local/etc/X11/xorg.conf.d/ and kld_list="fusefs nvidia=modeset" in /etc/rc.conf.


-----Edit-----

As an experiment I added the configuration file driver.conf back to /usr/local/etc/X11/xorg.conf.d/ and updated/etc/rc.conf to say kld_list="fusefs nvidia=modeset". I restarted the computer and as expected, Xorg did not load.

On the command line I tried nvidia-settings and received the same response as found in the above quote.

Both /usr/local/etc/X11/xorg.conf.d/ and /etc/rc.conf were reset to their original configuration so that I could log into the desktop and post this update.
 

Attachments

  • wednesday_Xorg.0.log.txt
    22.2 KB · Views: 59
Just to make sure:
You repeatedly wrote 'nvidia=modeset' but it should be 'nvidia-modeset'.
Maybe it does not load the module due to the typo?
 
[...] As a test, I repeated this experiment but revised the driver.conf so that it looked for "amdgpu" rather than just "amd" as was in Erichans recommendation.
good catch, I'll say more on amd at the end. For now concentrate on getting the nvidia driver running (don't load the amdgpu driver).

I'd be hesitant in using nvidia-xconfig as it is known to throw various settings in various files that may complicate manual settings; I don't know the specifics how to undo that.

As elgrande also wrote, you've mentioned nvidia=modeset, that should be nvidia-modeset . Please verify that, especially in /etc/rc.conf

From your revised-nvidia-Xorg.0.log.txt from message #5:
Code:
[    88.675] (II) NVIDIA dlloader X Driver  525.116.03  Wed Apr 19 23:15:04 UTC 2023
I see that nvidia driver Version 525.116.03 is loaded. At FreeBSD x64 Graphics Driver Archive you see a list of Nvidia produced drivers for FreeBSD; don't use these directly: use the package x11/nvidia-driver

x11/nvidia-driver at Freshports at section Packages shows that the version 525.116.03 for FreeBSD:13:amd64 is used for the quarterly branch from the ports repository. Please change to latest to get version 535.98_1. As explained in 4.4.2. Quarterly and Latest Ports Branches, in /usr/local/etc/pkg/repos/FreeBSD.conf change "quarterly" to "latest"; don't forget to update all packages as mentioned. (With using the "latest" branch of the Ports repository for your packages your chances are also better to get "amdgpu" working.)

At FreeBSD Display Driver – x64 I see:
Version: 535.98
Release Date: 2023.8.8
and at the tab "Supported products" I see:
Rich (BB code):
GeForce RTX 30 Series (Notebooks):

GeForce RTX 3080 Ti Laptop GPU, GeForce RTX 3080 Laptop GPU, GeForce RTX 3070 Ti Laptop GPU, GeForce RTX 3070 Laptop GPU, GeForce RTX 3060 Laptop GPU, 
GeForce RTX 3050 Ti Laptop GPU, GeForce RTX 3050 Laptop GPU
So, as for support for your nvidia graphics card that looks good.

Then I'd suggest only specifying the nvidia card in your /usr/local/etc/X11/xorg.conf.d/driver.conf. I don't have a laptop with hybrid graphics with FreeBSD running to compare, but IMO it's necessary to use an explicit configuration with BusID because you have two graphics cards (there might be a workaround for that, I don't know).

I tried to load nvidia-settings from the application list, but it would not load.
I think it It is necessary when using x11/nvidia-settings, that X is running and is using the Nvidia driver. What is the exact error message you're getting here?

Before starting X with startx please show the output of:
pkg info nvidia-driver | grep Version
sysrc kld_list
kldstat -vn nvidia-modeset

First try with only your laptop screen without any external monitor connected.

Now try startx and provide the Xorg log output.
See if nvidia-settings starts, if only with one screen.

I think, when your external monitor is attached and nvidia-settings works correctly, it should provide a configuration setting for two monitors (TwinView).


-- AMD GPU
From what I have seen on the forum I cannot confirm that the GPU of your AMD Ryzen is supported on 13.2-RELEASE right now, you'll have to try and see. I think at the moment your best bet at getting that to work is wait a little for the first 14.0-RELEASE to come out, combined with the drm driver from ports (i.e. install the package graphics/drm-kmod/). Contrary to what you might think, (functioning of) that package *for* 14.0-RELEASE is actually (rather) different from the one for 13.x-RELEASE. Without going into details, that's in part because the 14.0-RELEASE kernel is different from the 13.x-kernel. For now I'd refrain from using both the amdgpu and nvidia-modeset drivers at the same time; it should be possible to get both working at the same time but from what I've read Xorg is hard to configure that way. With the nvidia driver it should also be possible to get that one driver to drive your laptop screen and one external screen together as a joined, single desktop screen.

P.S. edit: I started with "card0" but perhaps, as the Identifier is used in the log files, a more "ïdentifying name" could be useful:
Code:
Section        "Device"
    Identifier "RTX-3050"
    Driver     "nvidia"
    BusID      "pci0:1:0:0"
EndSection
 
Last edited:
An additional idea:
To remove complexity, maybe your UEFI setup has an option to disable hybrid graphics and switch to "Nvidia only" - at least for testing purposes.
 
Good morning everyone, thank you again for all of your help.

My apologies for the late response, I am afraid I was too busy with classes last few days to get back to this (coincidentally, most of the time was spent on a class on operating systems).


Just to make sure:
You repeatedly wrote 'nvidia=modeset' but it should be 'nvidia-modeset'.
Maybe it does not load the module due to the typo?

The typo was purely in the messages here on the forum.
When I was typing up my messages to this chat I had to crank my head down at an awkward angle to look at the screen, so I made a few typos. Then I got lazy making sure I had the formatting in my posts so I would copy and paste from my earlier messages, duplicating my typo.

There's probably a lesson there about taking shortcuts that I should learn.


An additional idea:
To remove complexity, maybe your UEFI setup has an option to disable hybrid graphics and switch to "Nvidia only" - at least for testing purposes.

Unfortunately my laptop's UEFI setup does not allow me to disable hybrid graphics.


good catch, I'll say more on amd at the end. For now concentrate on getting the nvidia driver running (don't load the amdgpu driver).

I'd be hesitant in using nvidia-xconfig as it is known to throw various settings in various files that may complicate manual settings; I don't know the specifics how to undo that.

As elgrande also wrote, you've mentioned nvidia=modeset, that should be nvidia-modeset . Please verify that, especially in /etc/rc.conf

From your revised-nvidia-Xorg.0.log.txt from message #5:
Code:
[    88.675] (II) NVIDIA dlloader X Driver  525.116.03  Wed Apr 19 23:15:04 UTC 2023
I see that nvidia driver Version 525.116.03 is loaded. At FreeBSD x64 Graphics Driver Archive you see a list of Nvidia produced drivers for FreeBSD; don't use these directly: use the package x11/nvidia-driver

x11/nvidia-driver at Freshports at section Packages shows that the version 525.116.03 for FreeBSD:13:amd64 is used for the quarterly branch from the ports repository. Please change to latest to get version 535.98_1. As explained in 4.4.2. Quarterly and Latest Ports Branches, in /usr/local/etc/pkg/repos/FreeBSD.conf change "quarterly" to "latest"; don't forget to update all packages as mentioned. (With using the "latest" branch of the Ports repository for your packages your chances are also better to get "amdgpu" working.)

At FreeBSD Display Driver – x64 I see:
Version: 535.98
Release Date: 2023.8.8
and at the tab "Supported products" I see:
Rich (BB code):
GeForce RTX 30 Series (Notebooks):

GeForce RTX 3080 Ti Laptop GPU, GeForce RTX 3080 Laptop GPU, GeForce RTX 3070 Ti Laptop GPU, GeForce RTX 3070 Laptop GPU, GeForce RTX 3060 Laptop GPU,
GeForce RTX 3050 Ti Laptop GPU, GeForce RTX 3050 Laptop GPU
So, as for support for your nvidia graphics card that looks good.

Then I'd suggest only specifying the nvidia card in your /usr/local/etc/X11/xorg.conf.d/driver.conf. I don't have a laptop with hybrid graphics with FreeBSD running to compare, but IMO it's necessary to use an explicit configuration with BusID because you have two graphics cards (there might be a workaround for that, I don't know).


I think it It is necessary when using x11/nvidia-settings, that X is running and is using the Nvidia driver. What is the exact error message you're getting here?

Before starting X with startx please show the output of:
pkg info nvidia-driver | grep Version
sysrc kld_list
kldstat -vn nvidia-modeset

First try with only your laptop screen without any external monitor connected.

Now try startx and provide the Xorg log output.
See if nvidia-settings starts, if only with one screen.

I think, when your external monitor is attached and nvidia-settings works correctly, it should provide a configuration setting for two monitors (TwinView).


-- AMD GPU
From what I have seen on the forum I cannot confirm that the GPU of your AMD Ryzen is supported on 13.2-RELEASE right now, you'll have to try and see. I think at the moment your best bet at getting that to work is wait a little for the first 14.0-RELEASE to come out, combined with the drm driver from ports (i.e. install the package graphics/drm-kmod/). Contrary to what you might think, (functioning of) that package *for* 14.0-RELEASE is actually (rather) different from the one for 13.x-RELEASE. Without going into details, that's in part because the 14.0-RELEASE kernel is different from the 13.x-kernel. For now I'd refrain from using both the amdgpu and nvidia-modeset drivers at the same time; it should be possible to get both working at the same time but from what I've read Xorg is hard to configure that way. With the nvidia driver it should also be possible to get that one driver to drive your laptop screen and one external screen together as a joined, single desktop screen.

P.S. edit: I started with "card0" but perhaps, as the Identifier is used in the log files, a more "ïdentifying name" could be useful:
Code:
Section        "Device"
    Identifier "RTX-3050"
    Driver     "nvidia"
    BusID      "pci0:1:0:0"
EndSection


I tried some of the recommended tests. I created a test conf file which only specified the Nvidia card and kld_list="fusefs nvidia-modeset" in my /etc/rc.conf, trying it with both the HDMI monitor attached and unattached.

driver.conf had the following information:

Section "Device"
Identifier "Card0"
Driver "nvidia"
BusID "pci0:1:0:0"
EndSection


Without the monitor attached I ran the command pkg info nvidia-driver | grep Version and received the following output:
$ pkg info nvidia-driver | grep Version
Version : 535.98_1
$ sysrc kld_list
kld_list: fusefs nvidia-modeset
$ kldstat -vn nvidia-modeset
Id Refs Address Size Name
17 1 0xffffffff8333c000 11e630 nvidia-modeset.ko (/boot/modules/nvidia-modeset.ko)
Contains modules:
Id Name
526 nvidia-modeset
$

I tested this both with and without the HDMI monitor attached and the output of the above command was the same.


Without the monitor attached I produced the attached Xorg log no_mon_nvidia_only_Xorg_log.txt.

With the monitor attached I produced the log file with-monitor-nvidia-only.txt
As before, with a driver.conf Xorg did not start even with only the Nvidia drivers enabled.



I did another test specifying amdgpu with the following for driver.conf:
Section "Device"
Identifier "Card0"
Driver "amdgpu"
BusID "pci0:6:0:0"
EndSection


During these tests, in /etc/rc.conf I had kld_list="fusefs amdgpu"

Again, Xorg did not start, and I copied over the two logs files produced with and without the monitors.

Without the monitor I produced the attached file amdput_only.txt

With the monitor I produced the log file with-monitor-amdgpu-only.txt
 

Attachments

  • no_mon_nvidia_only_xorg_log.txt
    22.2 KB · Views: 61
  • with-monitor-nvidia-only.txt
    28.4 KB · Views: 64
  • amdgpu_only.txt
    6.3 KB · Views: 62
  • with-monitor-amdgpu-only.txt
    6.3 KB · Views: 52
Since you cannot disable hybrid graphics, there might be some constraints with the laptops wiring…
Maybe the HDMI output is e.g. always routed over the Nvidia GPU - I had such case with an Alienware laptop.
In such case you cannot get the external display working over amdgpu.
 
It's looking like I might just be unable to get the HDMI output running with laptop and FreeBSD, it's a bit of a bummer but not the end of the world. Hopefully when FreeBSD 14.0-Release comes out I'll be able to get things working for the HDMI output, but if not c'est la vie.

I threw FreeBSD on my laptop to learn, and even working with everyone to troubleshoot I've learned a bunch!

Just for fun I plugged in my HDMI monitor, set kld_list="fusefs nvidia-modeset amdgpu" in my /etc/rc.conf, ran Xorg -configure and took a look at the conf file that it auto generated. When I tried the test to see if it would run it crashed, saying
Amdgpu: os_same_file description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen.

I also noticed that when Xorg was trying to start, it stated that it was enabling two amdgpus, stating
(II) AMDGPU(0): [KMS] Kernal modesetting enabled.
(II) AMDGPU(1): [KMS] Kernal modesetting enabled.

When I looked at the conf file it produced it listed three devices, three monitors and three screens.

There were the original two devices with the amdgpu at PCI0:6:0:0, the nvidia device at PCI0:1:0:0, but now an additional amdgpu at PCI:6:0:1

Additionally, the file produced detected three monitors and screens, despite the computer only having two screens attached, the laptop monitor and the HDMI monitor I had plugged in.

I attached a copy of the conf file produced from Xorg -configure as well at the log file produced when I tried to test the conf file produced. Any idea what would be causing Xorg -configure to detect a third device at PCI6:0:1 or a third screen and monitor?

Even without solving the HDMI output issue, I am having fun seeing what is going on with all of these experiments and attempts to fix things.
 

Attachments

  • xorg -configure output.txt
    4.9 KB · Views: 51
  • xorg log.txt
    6.3 KB · Views: 52
Have you ever tried to run Xorg without (deprecated) xorg.conf?
For the graphics only enable them in xorg.conf.d directory.
Example:
 
Have you tried hw.syscons.disable=1 in /boot/loader.conf? This is suggested in the graphics wiki. One downside is that if it messes things up, you'll have to SSH into your laptop to comment that line out...

There were the original two devices with the amdgpu at PCI0:6:0:0, the nvidia device at PCI0:1:0:0, but now an additional amdgpu at PCI:6:0:1

Additionally, the file produced detected three monitors and screens, despite the computer only having two screens attached, the laptop monitor and the HDMI monitor I had plugged in.

I attached a copy of the conf file produced from Xorg -configure as well at the log file produced when I tried to test the conf file produced. Any idea what would be causing Xorg -configure to detect a third device at PCI6:0:1 or a third screen and monitor?
Sometimes, the 'Third device' is actually a 'virtual' monitor that pretends that two physical monitors are one single monitor.
 
Have you tried hw.syscons.disable=1 in /boot/loader.conf? This is suggested in the graphics wiki. One downside is that if it messes things up, you'll have to SSH into your laptop to comment that line out...


Sometimes, the 'Third device' is actually a 'virtual' monitor that pretends that two physical monitors are one single monitor.
Just tried adding it in /boot/loader.conf...looks like I'm going to have to SSH into the machine when I get home.
Good thing I am dual booting with a Windows hard drive so that I can use my machine during class.

----Edit----
A classmate was kind enough to lend me his laptop to SSH into mine and fix things. Coincidentally its during my OS class.
 
TBF, if you're just learning about UNIX OSes, I'd recommend a VirtualBox VM on Windows - a ROG Strix is definitely enough metal to handle that. I have a 2022 ROG Zephyrus AMD Advantage with similar specs (but the built-in keyboard wouldn't work 😭 on bare metal under FreeBSD), so I'd know...
 
Haha, we're suppose to be running Windows 10 Education Edition and Ubuntu 16 in VMWare for the class. I'm learning FreeBSD on my extra hard drive on my own for fun!
 
I got it!!!

I got some hints from Thread how-to-enable-graphics-on-latest-amd-ryzen-cpu-and-gpu-7-8-9-family.85401/

Since I'm doing this for fun, I installed the Freebsd 14.0-BETA onto my laptop, then I ran the following commands:

Code:
cd /usr/ports/graphics/gpu-firmware-amd-kmod/ && FLAVOR=green_sardine make install clean

cd /usr/ports/graphics/drm-515-kmod/ && make install clean

 cd /usr/ports/x11-drivers/xf86-video-amdgpu
 make extract
 make install clean

That took a while to compile and install, but everything worked out.

Following that, I was able to install the /x11/nvidia-hybrid-graphics.

In /etc/rc.conf I set kld_list="nvidia-modeset amdgpu

Finally I installed Xorg, created a new /usr/local/etc/X11/xorg.conf.d/driver.conf and filled in as much information as I could get. I copied a lot from the Xorg -configure template posted above as it was saying screens couldn't be found and a few other hiccups.
I have attached the current conf file I am using to this message.

Finally I was able to install Xfce, plug in an HDMI monitor and have it detected! Mirror and expand desktop worked well. It took a lot of effort, but at least I learned a lot about what to do, how things work, etc. Now I can finally rest easy.

Thank you everyone for all of your help!

Now to install Doom onto this laptop...
 

Attachments

  • driver.conf.txt
    4.9 KB · Views: 63
Back
Top