# XOrg issues with detecting hardware, display and GPU



## hyp0dermic (Jul 11, 2020)

I am having issues with xorg + gnome not detecting my gpu + display. It works when I have no configuration files in xorg.conf.d, but only sees a generic display, and graphics output is terribly sluggish. When it is run with a xorg.conf.d file as shown:

```
Section "Device"
    Identifier "Card0"
    Driver "amdgpu"
    BusID "PCI:0:10:0:0"
EndSection
```
it spits out this log file after immediately halting:
Xorg.0.log

```
[    34.852]
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[    34.852] Build Operating System: FreeBSD 12.1-RELEASE amd64
[    34.852] Current Operating System: FreeBSD hestia 12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC amd64
[    34.852] Build Date: 11 July 2020  05:21:06AM
[    34.852] 
[    34.852] Current version of pixman: 0.40.0
[    34.852]     Before reporting problems, check [URL]http://wiki.x.org[/URL]
    to make sure that you have the latest version.
[    34.852] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    34.852] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Jul 11 05:58:58 2020
[    34.852] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[    34.852] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[    34.853] (==) No Layout section.  Using the first Screen section.
[    34.853] (==) No screen section available. Using defaults.
[    34.853] (**) |-->Screen "Default Screen Section" (0)
[    34.853] (**) |   |-->Monitor "<default monitor>"
[    34.853] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[    34.853] (**) |   |-->Device "Card0"
[    34.853] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[    34.853] (==) Automatically adding devices
[    34.853] (==) Automatically enabling devices
[    34.853] (==) Not automatically adding GPU devices
[    34.853] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    34.853] (==) 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
[    34.853] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[    34.853] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[    34.853] (II) Loader magic: 0x42e020
[    34.853] (II) Module ABI versions:
[    34.853]     X.Org ANSI C Emulation: 0.4
[    34.853]     X.Org Video Driver: 24.1
[    34.853]     X.Org XInput driver : 24.1
[    34.853]     X.Org Server Extension : 10.0
[    34.853] (--) PCI:*(10@0:0:0) 1002:731f:1da2:e411 rev 193, Mem @ 0xe0000000/268435456, 0xf0000000/2097152, 0xfcd00000/524288, I/O @ 0x0000d000/256, BIOS @ 0x????????/65536
[    34.853] (II) LoadModule: "glx"
[    34.853] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[    34.854] (II) Module glx: vendor="X.Org Foundation"
[    34.854]     compiled for 1.20.8, module version = 1.0.0
[    34.854]     ABI class: X.Org Server Extension, version 10.0
[    34.854] (II) LoadModule: "amdgpu"
[    34.854] (II) Loading /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so
[    34.854] (II) Module amdgpu: vendor="X.Org Foundation"
[    34.854]     compiled for 1.20.8, module version = 19.1.0
[    34.854]     Module class: X.Org Video Driver
[    34.854]     ABI class: X.Org Video Driver, version 24.1
[    34.854] (II) AMDGPU: Driver for AMD Radeon:
    All GPUs supported by the amdgpu kernel driver
[    34.854] (--) Using syscons driver with X support (version 2.0)
[    34.854] (--) using VT number 9

[    34.858] (EE) No devices detected.
[    34.858] (EE)
Fatal server error:
[    34.858] (EE) no screens found(EE)
[    34.858] (EE)
Please consult the The X.Org Foundation support
     at [URL]http://wiki.x.org[/URL]
for help.
[    34.858] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    34.858] (EE)
[    34.892] (EE) Server terminated with error (1). Closing log file.
```
I'm sorry if there is a very obvious solution, I am very new to BSD as a whole.
Thanks!


----------



## T-Daemon (Jul 11, 2020)

Please post

`# uname -a`
`# pciconf -vl | grep -B3 display`
`# pkg info | grep kmod`
`# grep kld_list /etc/rc.conf`
As user(s) using xorg:
`% id -p`


----------



## hyp0dermic (Jul 11, 2020)

```
$ uname -a
FreeBSD hestia 12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC  amd64
```


```
$ pciconf -vl | grep -B3 display
vgapci0@pci0:10:0:0:    class=0x030000 card=0xe4111da2 chip=0x731f1002 rev=0xc1 hdr=0x00   
vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'   
device     = 'Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]'   
class      = display
```


```
$ pkg info | grep kmod
drm-fbsd12.0-kmod-4.16.g20200221 DRM modules for the linuxkpi-based KMS components
drm-kmod-g20190710             Metaport of DRM modules for the linuxkpi-based KMS components
gpu-firmware-kmod-g20200503    Firmware modules for the linuxkpi-based KMS components
```


```
$ grep kld_list /etc/rc.conf
```
(no output from this one)


```
$ id -p
uid     justino
groups  justino wheel video
```

Thank you for your time


----------



## diego (Jul 11, 2020)

hyp0dermic said:


> I am having issues with xorg + gnome not detecting my gpu + display. It works when I have no configuration files in xorg.conf.d, but only sees a generic display, and graphics output is terribly sluggish.
> 
> 
> I would recommend to install hw-probe in order to collect hardware information and logs of your computer. Its really easy and when its uploaded you can find similar computers / resources on the database. Really handy to provide logs to the community oir order to get help
> ...


----------



## Minbari (Jul 11, 2020)

hyp0dermic said:


> `$ uname -a
> FreeBSD hestia 12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC  amd64`
> 
> `$ pciconf -vl | grep -B3 display
> ...


You need to add `kld_list="/boot/modules/amdgpu.ko"` in /etr/rc.conf


----------



## T-Daemon (Jul 12, 2020)

hyp0dermic said:


> device = '*Navi 10* [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]'


For the time being, support for the Navi 10 cards are only available on 13.0-CURRENT with graphics/drm-devel-kmod.









						Chapter 25. Updating and Upgrading FreeBSD
					

Information about how to keep a FreeBSD system up-to-date with freebsd-update or Git, how to rebuild and reinstall the entire base system, etc




					www.freebsd.org


----------



## hyp0dermic (Jul 12, 2020)

Added that to my rc.conf, gnome started totally fine, but without any menu options or ways of starting programs. just the desktop background and an empty menu bar. I went ahead and opened a tty and added back my /usr/local/X11/xorg.conf.d/driver-amdgpu.conf as shown in the OP, and now x wont start automatically. When I run 
	
	



```
startx
```
 as normal, the server fails to start. My /var/log/Xorg.0.log is as follows: 
	
	



```
[    31.284] X.Org X Server 1.20.8X Protocol Version 11, Revision 0
[    31.284] Build Operating System: FreeBSD 12.1-RELEASE amd64 
[    31.284] Current Operating System: FreeBSD hestia 12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC amd64
[    31.284] Build Date: 11 July 2020  05:21:06AM
[    31.284]  
[    31.284] Current version of pixman: 0.40.0
[    31.284]    Before reporting problems, check [URL]http://wiki.x.org[/URL]
        to make sure that you have the latest version.
[    31.284] Markers: (--) probed, (**) from config file, (==) default setting,        
        (++) from command line, (!!) notice, (II) informational,        
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    31.284] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Jul 11 18:13:52 2020
[    31.284] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[    31.284] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[    31.284] (==) No Layout section.  Using the first Screen section.
[    31.284] (==) No screen section available. Using defaults.
[    31.284] (**) |-->Screen "Default Screen Section" (0)
[    31.284] (**) |   |-->Monitor "<default monitor>"
[    31.285] (==) No device specified for screen "Default Screen Section".
        Using the first device section listed.
[    31.285] (**) |   |-->Device "Card0"
[    31.285] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[    31.285] (==) Automatically adding devices
[    31.285] (==) Automatically enabling devices
[    31.285] (==) Not automatically adding GPU devices
[    31.285] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    31.285] (==) 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
[    31.285] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[    31.285] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[    31.285] (II) Loader magic: 0x42e020
[    31.285] (II) Module ABI versions:
[    31.285]    X.Org ANSI C Emulation: 0.4
[    31.285]    X.Org Video Driver: 24.1
[    31.285]    X.Org XInput driver : 24.1
[    31.285]    X.Org Server Extension : 10.0
[    31.285] (--) PCI:*(10@0:0:0) 1002:731f:1da2:e411 rev 193, Mem @ 0xe0000000/268435456, 0xf0000000/2097152, 0xfcd00000/524288, I/O @ 0x0000d000/256, BIOS @ 0x????????/65536
[    31.285] (II) LoadModule: "glx"
[    31.285] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[    31.286] (II) Module glx: vendor="X.Org Foundation"
[    31.286]    compiled for 1.20.8, module version = 1.0.0
[    31.286]    ABI class: X.Org Server Extension, version 10.0
[    31.286] (II) LoadModule: "amdgpu"
[    31.286] (II) Loading /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so
[    31.286] (II) Module amdgpu: vendor="X.Org Foundation"
[    31.286]    compiled for 1.20.8, module version = 19.1.0
[    31.286]    Module class: X.Org Video Driver
[    31.286]    ABI class: X.Org Video Driver, version 24.1
[    31.286] (II) AMDGPU: Driver for AMD Radeon:
        All GPUs supported by the amdgpu kernel driver
[    31.286] (--) Using syscons driver with X support (version 2.0)
[    31.286] (--) using VT number 9
[    31.288] (EE) No devices detected.
[    31.288] (EE)Fatal server error:
[    31.288] (EE) no screens found(EE)
[    31.288] (EE)Please consult the The X.Org Foundation support
         at [URL]http://wiki.x.org[/URL] for help.
[    31.288] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    31.289] (EE)
[    31.297] (EE) Server terminated with error (1). Closing log file.
```


----------



## hyp0dermic (Jul 12, 2020)

T-Daemon said:


> For the time being, support for the Navi 10 cards are only available on 13.0-CURRENT with graphics/drm-devel-kmod.
> 
> 
> 
> ...


Perfect, I will try that and see how it goes.


----------



## hyp0dermic (Jul 12, 2020)

T-Daemon said:


> For the time being, support for the Navi 10 cards are only available on 13.0-CURRENT with graphics/drm-devel-kmod.
> 
> 
> 
> ...



Thanks a ton for pointing that out! 13.0 build is running beautifully OOTB. Cheers!


----------



## skeletonboss12 (Jul 12, 2020)

enabling hal can help with automatic hardware detection

i believe the variable is called hald_enable


----------

