You are not logged in.

#1 2022-01-13 23:27:49

feintdoxx
Member
Registered: 2022-01-11
Posts: 8

Xorg config for headless setup with discrete AMD GPU

I was reading this https://www.x.org/releases/current/doc/ … nf.5.xhtml outside of just seeing what you can use in the config file I'm still not sure how to actually set this file up.

To give some context though, I setup the machine with a monitor originally but it's from another machine thats actually a daily driver and I don't have any other monitors nor was I intending to actually ever be in front of the machine. So I setup arch, installed xmonad and got that running with xorg and xinit startx in my bash file.
Now the system actually has an ATI ES1000 igpu (its on the motherboard not the cpus server machine) but from what I can tell neither the kernel drivers nor the AMD drivers function properly with the igpu.

I tried fresh install with no drivers and then tried the ati drivers, then did another fresh install and got it all setup again and then installed the amd drivers. same results really laggy. Instead of reinstalling I got tired of doing so was on like fresh install 3 or so from messing up prior to the drivers. So i had a spare Radeon HD 7770 not being used so I shut down installed it in the machine and rebooted, sweet! ui is responsive not laggy.

Once I thought I was done setting that up I installed freerdp and would just get it running and then take off the monitor and connect it all back on its dedicated machine, then I would go back to my desk rdp to the machine and proceeded trying to setup the rdp as a service, setup ssh, trying to configure the rest of the machine. Fast forward to after setting up freerdp as a service. At this point I am needing to reboot once in a while and I just go back to the machine at this point with no monitor and just logging in with a keyboard at the machine then go back to my desk and rdp into it. But now the display resolution is 1024x768 as before it was setting it up as the monitor display which i think was 1900x1200. This got me thinking I never actually properly setup xorg. Did some digging but havent really grasped the concept or possibly havent found something as similar to mysetup, maybe I just don't understand it fully but so heres some supplementary info:

cat of Xorg.1.log

 
[feintdoxx@ElJuan ~]$ cat /var/log/Xorg.1.log
[ 17630.035]
X.Org X Server 1.21.1.3
X Protocol Version 11, Revision 0
[ 17630.036] Current Operating System: Linux ElJuan 5.16.0-arch1-1 #1 SMP PREEMPT Mon, 10 Jan 2022 20:11:47 +0000 x86_64
[ 17630.036] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=5f636fdf-a4cb-4c40-bfda-8fdaea529a55 rw loglevel=3 quiet
[ 17630.036]
[ 17630.036] Current version of pixman: 0.40.0
[ 17630.036]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[ 17630.036] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 17630.036] (==) Log file: "/var/log/Xorg.1.log", Time: Thu Jan 13 00:06:31 2022
[ 17630.036] (II) Module ABI versions:
[ 17630.036]    X.Org ANSI C Emulation: 0.4
[ 17630.036]    X.Org Video Driver: 25.2
[ 17630.036]    X.Org XInput driver : 24.4
[ 17630.036]    X.Org Server Extension : 10.0
[ 17630.037] (--) using VT number 2

[ 17630.037] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[ 17630.037] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 17630.037] (II) Platform probe for /sys/devices/pci0000:00/0000:00:05.0/0000:0b:00.0/drm/card0
[ 17630.053] (--) PCI:*(11@0:0:0) 1002:683d:1462:2710 rev 0, Mem @ 0xe0000000/268435456, 0xfbfc0000/262144, I/O @ 0x00005000/256, BIOS @ 0x????????/131072
[ 17630.053] List of video drivers:
[ 17630.053]    amdgpu
[ 17630.053]    modesetting
[ 17630.053]    vesa
[ 17630.053] (II) LoadModule: "amdgpu"
[ 17630.054] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
[ 17630.061] (II) Module amdgpu: vendor="X.Org Foundation"
[ 17630.061]    compiled for 1.21.1, module version = 21.0.0
[ 17630.061]    Module class: X.Org Video Driver
[ 17630.061]    ABI class: X.Org Video Driver, version 25.2
[ 17630.061] (II) LoadModule: "modesetting"
[ 17630.061] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 17630.061] (II) Module modesetting: vendor="X.Org Foundation"
[ 17630.061]    compiled for 1.21.1.3, module version = 1.21.1
[ 17630.061]    Module class: X.Org Video Driver
[ 17630.061]    ABI class: X.Org Video Driver, version 25.2
[ 17630.062] (II) LoadModule: "vesa"
[ 17630.062] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[ 17630.062] (II) Module vesa: vendor="X.Org Foundation"
[ 17630.062]    compiled for 1.21.1.1, module version = 2.5.0
[ 17630.062]    Module class: X.Org Video Driver
[ 17630.062]    ABI class: X.Org Video Driver, version 25.2
[ 17630.062] (II) AMDGPU: Driver for AMD Radeon:
        All GPUs supported by the amdgpu kernel driver
[ 17630.062] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 17630.062] (II) VESA: driver for VESA chipsets: vesa
[ 17630.155] (++) Using config file: "/root/xorg.conf.new"
[ 17630.155] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 17630.155] (==) ServerLayout "X.org Configured"
[ 17630.155] (**) |-->Screen "Screen0" (0)
[ 17630.155] (**) |   |-->Monitor "Monitor0"
[ 17630.155] (**) |   |-->Device "Card0"
[ 17630.155] (**) |-->Screen "Screen1" (1)
[ 17630.155] (**) |   |-->Monitor "Monitor1"
[ 17630.156] (**) |   |-->Device "Card1"
[ 17630.156] (**) |-->Input Device "Mouse0"
[ 17630.156] (**) |-->Input Device "Keyboard0"
[ 17630.156] (==) Automatically adding devices
[ 17630.156] (==) Automatically enabling devices
[ 17630.156] (==) Automatically adding GPU devices
[ 17630.156] (==) Automatically binding GPU devices
[ 17630.156] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 17630.156] (WW) The directory "/usr/share/fonts/misc" does not exist.
[ 17630.156]    Entry deleted from font path.
[ 17630.156] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[ 17630.156]    Entry deleted from font path.
[ 17630.156] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[ 17630.156]    Entry deleted from font path.
[ 17630.156] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[ 17630.156]    Entry deleted from font path.
[ 17630.156] (WW) The directory "/usr/share/fonts/misc" does not exist.
[ 17630.156]    Entry deleted from font path.
[ 17630.156] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[ 17630.156]    Entry deleted from font path.
[ 17630.156] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[ 17630.156]    Entry deleted from font path.
[ 17630.156] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[ 17630.156]    Entry deleted from font path.
[ 17630.156] (**) FontPath set to:
        /usr/share/fonts/100dpi,
        /usr/share/fonts/75dpi,
        /usr/share/fonts/100dpi,
        /usr/share/fonts/75dpi
[ 17630.156] (**) ModulePath set to "/usr/lib/xorg/modules"
[ 17630.156] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[ 17630.156] (WW) Disabling Mouse0
[ 17630.156] (WW) Disabling Keyboard0
[ 17630.156] (II) AMDGPU(0): [KMS] Kernel modesetting enabled.
[ 17630.157] (EE) AMDGPU(0): [drm] device is not DRM master.
[ 17630.157] (II) AMDGPU(1): [KMS] Kernel modesetting enabled.
[ 17630.157] (EE) AMDGPU(1): [drm] Failed to open DRM device for pci:0000:0b:00.1: Invalid argument
[ 17630.157]
[ 17630.157]
Xorg detected your mouse at device /dev/input/mice.
Please check your config if the mouse is still not
operational, as by default Xorg tries to autodetect
the protocol.
[ 17630.157]
Xorg has configured a multihead system, please check your config.
[ 17630.157]
Your xorg.conf file is /root/xorg.conf.new

[ 17630.157] To test the server, run 'X -config /root/xorg.conf.new'

[ 17630.157] (EE) Server terminated with error (2). Closing log file.

I think that log was made when I attempted to run

 Xorg :1 config 

Although at this point, I don't remember so Idk how useful that is. with that being said, right now I am accessing the machine either through SSH if necessary otherwise I am using freerdp installed by running

 sudo pacman -S freerdp 

here is what is being executed to get the freerdp running

 
[feintdoxx@ElJuan ~]$ cat tools/freerdplaunch.sh
#!/bin/bash

##Launch freerdp

while true
do
        ##                 ARG sam-file:filename ARG sec:security type
        freerdp-shadow-cli /sam-file:/media/home/feintdoxx/tools/SAM /sec:nla
        sleep 10
done

and I have that setup with a systemd service enable on login.

 
[feintdoxx@ElJuan xorg.conf.d]$ ls
10-amdgpu.conf  10-quirks.conf  40-libinput.conf 
[feintdoxx@ElJuan xorg.conf.d]$ pwd /usr/share/X11/xorg.conf.d 

only place I found .conf files for xorg as the output above states there is xorg.conf.new in /root but I deleted that after rebooting and noticing no difference.

cat of 10-amdgpu.conf

 
[feintdoxx@ElJuan xorg.conf.d]$ cat 10-amdgpu.conf
Section "OutputClass" 
Identifier "AMDgpu" 
MatchDriver "amdgpu" 
Driver "amdgpu" 

I tried making another config as so

 
Section "Device" 
Identifier "AMDgpu" 
MatchDriver "amdgpu" 
driver 'amdgpu" 

But after making that file, I was no longer able to rdp into the machine. Id have to make the file again and see the output of the rdp service but it was along the lines of cant open display, it was name 20-amdgpu.conf and from documentation I read this seemed to either overide the 10-amdgpu.conf or it was just incorrect and failed.

this is the output of xrandr --listproviders in the rdp session

 
Providers: number : 1 
Provider 0: id 0x47 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload 
crtcs: 6 outputs: 3 associated providers: 0 name:modesetting 

and xrandr --listmonitors from rdp

Monitors: 0 

and I've read you're supposed to setup a dummy display, and after seeing a bunch of examples in documentation for xorg and just peoples setup I'm still clueless on how I am supposed to set it up. Also not sure if anymore information would be needed or if any of what I provided is not necessary. Thanks either way!

edit: fixed formatting to make easier to read

Last edited by feintdoxx (2022-01-13 23:30:31)

Offline

#2 2022-01-14 08:25:48

seth
Member
Registered: 2012-09-03
Posts: 49,992

Offline

#3 2022-01-14 08:58:04

feintdoxx
Member
Registered: 2022-01-11
Posts: 8

Re: Xorg config for headless setup with discrete AMD GPU


Been staring at that for about an hour haha
was also reading this  https://www.x.org/releases/current/doc/ … #heading10
this was my attempt at setting that up

[feintdoxx@ElJuan ~]$ cat 20-headless.conf
Section "Monitor"
        Identifier "dummy_monitor"
        HorizSync 28.0-80.0
        VertRefresh 48.0-75.0
        Modeline "1920x1080" 172.80 1920 2040 2248 2576 1080 1081 1084 1118
EndSection

Section "Device"
        Identifier "AMDgpu"
        Driver "amdgpu"
        Screen 0
EndSection

Section "Screen"
        Identifier "dummy_screen"
        Device "AMDgpu"
        Monitor "dummy_monitor"
EndSection

from what I can tell xorg auto config will setup a display and allow my rdp service to run and give it a screen to work with but the display is 1024x768 (this is without my own made config file). So far from my experience with this display resolution is it seems to be causing some sort of latency as mentioned in the post. If I take a physical monitor, hook it up to the machine, boot it, log in, allows xorg to initiate with a resolution to the display of 1900x1200 and almost latency free experience. I would then at this point unplug the monitor and put it back onto its dedicated machine, pretty inconvenient as why I've been trying to get this setup.

Now If have that .conf file in with the other conf files. (/usr/share/X11/xorg.conf.d) I just get failed to connect display 0 the xorg server doesn't launch and then i cannot connect to the rdp session. I'll then at this point have to ssh into it to do any edits or take the physical monitor hook it up and do the same as before.
Not sure where the faults are.

Offline

#4 2022-01-14 09:02:19

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Xorg config for headless setup with discrete AMD GPU

the wiki wrote:

For a headless configuration, the xf86-video-dummy driver is necessary; install it and create a configuration file, such as the following:

Offline

#5 2022-01-14 09:05:17

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: Xorg config for headless setup with discrete AMD GPU

I'm not sure on your end goal. Do you want or don't want the GPU to do anything? For just a headless setup you don't need a graphics card and you need to stop making config sections for the graphics card. If you want the GPU to do anything then you'd be referring to the wrong driver anyway since a HD 7700 will default to the radeon kernel driver and the xf86-video-ati unless you do https://wiki.archlinux.org/title/AMDGPU … K)_support

Offline

#6 2022-01-14 09:09:29

feintdoxx
Member
Registered: 2022-01-11
Posts: 8

Re: Xorg config for headless setup with discrete AMD GPU

seth wrote:
the wiki wrote:

For a headless configuration, the xf86-video-dummy driver is necessary; install it and create a configuration file, such as the following:

I kid you not I've probably read that line more than once and just have not registered it I will try this.

Offline

#7 2022-01-14 09:21:47

feintdoxx
Member
Registered: 2022-01-11
Posts: 8

Re: Xorg config for headless setup with discrete AMD GPU

V1del wrote:

I'm not sure on your end goal. Do you want or don't want the GPU to do anything? For just a headless setup you don't need a graphics card and you need to stop making config sections for the graphics card. If you want the GPU to do anything then you'd be referring to the wrong driver anyway since a HD 7700 will default to the radeon kernel driver and the xf86-video-ati unless you do https://wiki.archlinux.org/title/AMDGPU … K)_support

This is what has been so confusing for me, I did try earlier installing the xf86-video-ati like 20 minutes ago and without setting up any sort of conf file I am unable to rdp into the machine. The drivers seem to put a default conf in the /usr/share/X11/xorg.conf.d directory
10-amdgpu.conf and 10-radeon.conf

leaving just the radeon one in there results no rdp connection and xorg stating cant connect to display 0
and having the amd one in there at least allows me to rdp


but to answer your question the only reason I put the 7770 in there in the first place was that having no gpu and letting it use the integrated ATI ES1000 was seemingly painstakingly slow to render xmonad. taking several update the screen or just artifacting. and this was all tested on a real monitor before attempting to setup headless with or without the ati drivers. So then I installed the gpu in there and I was at least able to actually get a usable experience with gpu in it. I wasn't originally planning on having a discrete gpu in the machine to begin with though. the IGPU should be capable as I had this machine running windows server 2019 and worked just fine displaying the desktop without a hitch but I chose to embark a journey onto arch.

If theres any info I can provide, mind you if you could provide steps to provide that info would be helpful, I would gladly do so.

Offline

#8 2022-01-14 09:42:26

hcjl
Member
From: berlin
Registered: 2007-06-29
Posts: 330

Re: Xorg config for headless setup with discrete AMD GPU

In those cases I am using a cheap HDMI dummy adapter aka virtual display adapter. No extra configuration is needed, but it costs a little money ;-)

Offline

Board footer

Powered by FluxBB