docker-steam-headless icon indicating copy to clipboard operation
docker-steam-headless copied to clipboard

[Bug]: Can't start with Intel Battlemage

Open meilon opened this issue 7 months ago • 6 comments

Describe the Bug

I tried to launch the container on my Arch server, but I can't open a WebVNC session. X11 keeps exiting with status 1.

Am I the first to try this with Battlemage (which only supports xe and no i915 kernel module if that matters)?

Steps to Reproduce

  1. Download docker-compose.yml for privileged access and modify for :arch tag
  2. Download .env sample and modify paths and settings
  3. docker-compose up -d and monitor output

Expected Behavior

Can connect via WebVNC, start and login into steam

Screenshots

No response

Relevant Settings

There's an AST2600 "GPU" and an Intel Arc B580 in the system and no display connected to the Intel GPU

Tried privileged and unprivileged docker-compose.yml Tried :latest and :arch tag MODE=primary DISPLAY=:55 ENABLE_EVDEV_INPUTS=false FORCE_X11_DUMMY_CONFIG=true

xorg.err.log is with above settings and privileged :arch container

Version

Build: [2025-03-01 03:09:20] [master] [14c770bce61db99c56592760c73c2ba454dab648] [arch]

Platform

Distribution: Arch Linux Kernel: 6.12.21-1-lts GPU Driver versions: mesa 25.0.3-1 Docker: 28.0.4, build b8034c0ed7 Docker-compose: 2.34.0

Relevant log output

xorg.err.log:


X.Org X Server 1.21.1.16
X Protocol Version 11, Revision 0
Current Operating System: Linux SteamHeadless 6.12.21-1-lts #1 SMP PREEMPT_DYNAMIC Sat, 29 Mar 2025 06:39:46 +0000 x86_64
Kernel command line: zfs=rpool/archlinux/root rw ipv6.disable=1 spl.spl_hostid=0x00bab10c
 
Current version of pixman: 0.44.2
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.55.log", Time: Thu Apr 10 14:40:27 2025
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(==) No Layout section.  Using the first Screen section.
(**) |-->Screen "Default Screen" (0)
(**) |   |-->Monitor "Configured Monitor"
(**) |   |-->Device "Configured Video Device"
(**) Allowing byte-swapped clients
(==) Automatically adding devices
(==) Automatically enabling devices
(==) Automatically adding GPU devices
(==) Automatically binding GPU devices
(==) Max clients allowed: 256, resource mask: 0x1fffff
(==) FontPath set to:
	/usr/share/fonts/misc,
	/usr/share/fonts/TTF,
	/usr/share/fonts/OTF,
	/usr/share/fonts/Type1,
	/usr/share/fonts/100dpi,
	/usr/share/fonts/75dpi
(==) ModulePath set to "/usr/lib/xorg/modules"
(II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
(EE) systemd-logind: failed to get session: Failed to execute program org.freedesktop.login1: Permission denied
(II) xfree86: Adding drm device (/dev/dri/card1)
(II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0/drm/card1
(II) xfree86: Adding drm device (/dev/dri/card0)
(II) Platform probe for /sys/devices/pci0000:00/0000:00:1c.0/0000:08:00.0/0000:09:00.0/drm/card0
(--) PCI: (3@0:0:0) 8086:e20b:8086:1100 rev 0, Mem @ 0x88000000/16777216, 0x4000000000/17179869184, BIOS @ 0x????????/2097152
(--) PCI:*(9@0:0:0) 1a03:2000:1043:87ed rev 82, Mem @ 0x80000000/67108864, 0x84000000/262144, I/O @ 0x00003000/128
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
	compiled for 1.21.1.16, module version = 1.0.0
(WW) Warning, couldn't open module dummy
(EE) Failed to load module "dummy" (module does not exist, 0)
(EE) No drivers available.
(EE) 
Fatal server error:
(EE) no screens found(EE) 
(EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.55.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.

X.Org X Server 1.21.1.16
X Protocol Version 11, Revision 0
Current Operating System: Linux SteamHeadless 6.12.21-1-lts #1 SMP PREEMPT_DYNAMIC Sat, 29 Mar 2025 06:39:46 +0000 x86_64
Kernel command line: zfs=rpool/archlinux/root rw ipv6.disable=1 spl.spl_hostid=0x00bab10c
 
Current version of pixman: 0.44.2
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.55.log", Time: Thu Apr 10 14:40:27 2025
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(==) No Layout section.  Using the first Screen section.
(**) |-->Screen "Default Screen" (0)
(**) |   |-->Monitor "Configured Monitor"
(**) |   |-->Device "Configured Video Device"
(**) Allowing byte-swapped clients
(==) Automatically adding devices
(==) Automatically enabling devices
(==) Automatically adding GPU devices
(==) Automatically binding GPU devices
(==) Max clients allowed: 256, resource mask: 0x1fffff
(==) FontPath set to:
	/usr/share/fonts/misc,
	/usr/share/fonts/TTF,
	/usr/share/fonts/OTF,
	/usr/share/fonts/Type1,
	/usr/share/fonts/100dpi,
	/usr/share/fonts/75dpi
(==) ModulePath set to "/usr/lib/xorg/modules"
(II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
(EE) systemd-logind: failed to get session: Failed to execute program org.freedesktop.login1: Permission denied
(II) xfree86: Adding drm device (/dev/dri/card1)
(II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0/drm/card1
(II) xfree86: Adding drm device (/dev/dri/card0)
(II) Platform probe for /sys/devices/pci0000:00/0000:00:1c.0/0000:08:00.0/0000:09:00.0/drm/card0
(--) PCI: (3@0:0:0) 8086:e20b:8086:1100 rev 0, Mem @ 0x88000000/16777216, 0x4000000000/17179869184, BIOS @ 0x????????/2097152
(--) PCI:*(9@0:0:0) 1a03:2000:1043:87ed rev 82, Mem @ 0x80000000/67108864, 0x84000000/262144, I/O @ 0x00003000/128
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
	compiled for 1.21.1.16, module version = 1.0.0
(WW) Warning, couldn't open module dummy
(EE) Failed to load module "dummy" (module does not exist, 0)
(EE) No drivers available.
(EE) 
Fatal server error:
(EE) no screens found(EE) 
(EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.55.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.

X.Org X Server 1.21.1.16
X Protocol Version 11, Revision 0
Current Operating System: Linux SteamHeadless 6.12.21-1-lts #1 SMP PREEMPT_DYNAMIC Sat, 29 Mar 2025 06:39:46 +0000 x86_64
Kernel command line: zfs=rpool/archlinux/root rw ipv6.disable=1 spl.spl_hostid=0x00bab10c
 
Current version of pixman: 0.44.2
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.55.log", Time: Thu Apr 10 14:40:29 2025
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(==) No Layout section.  Using the first Screen section.
(**) |-->Screen "Default Screen" (0)
(**) |   |-->Monitor "Configured Monitor"
(**) |   |-->Device "Configured Video Device"
(**) Allowing byte-swapped clients
(==) Automatically adding devices
(==) Automatically enabling devices
(==) Automatically adding GPU devices
(==) Automatically binding GPU devices
(==) Max clients allowed: 256, resource mask: 0x1fffff
(==) FontPath set to:
	/usr/share/fonts/misc,
	/usr/share/fonts/TTF,
	/usr/share/fonts/OTF,
	/usr/share/fonts/Type1,
	/usr/share/fonts/100dpi,
	/usr/share/fonts/75dpi
(==) ModulePath set to "/usr/lib/xorg/modules"
(II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
(EE) systemd-logind: failed to get session: Failed to execute program org.freedesktop.login1: Permission denied
(II) xfree86: Adding drm device (/dev/dri/card1)
(II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0/drm/card1
(II) xfree86: Adding drm device (/dev/dri/card0)
(II) Platform probe for /sys/devices/pci0000:00/0000:00:1c.0/0000:08:00.0/0000:09:00.0/drm/card0
(--) PCI: (3@0:0:0) 8086:e20b:8086:1100 rev 0, Mem @ 0x88000000/16777216, 0x4000000000/17179869184, BIOS @ 0x????????/2097152
(--) PCI:*(9@0:0:0) 1a03:2000:1043:87ed rev 82, Mem @ 0x80000000/67108864, 0x84000000/262144, I/O @ 0x00003000/128
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
	compiled for 1.21.1.16, module version = 1.0.0
(WW) Warning, couldn't open module dummy
(EE) Failed to load module "dummy" (module does not exist, 0)
(EE) No drivers available.
(EE) 
Fatal server error:
(EE) no screens found(EE) 
(EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.55.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.

X.Org X Server 1.21.1.16
X Protocol Version 11, Revision 0
Current Operating System: Linux SteamHeadless 6.12.21-1-lts #1 SMP PREEMPT_DYNAMIC Sat, 29 Mar 2025 06:39:46 +0000 x86_64
Kernel command line: zfs=rpool/archlinux/root rw ipv6.disable=1 spl.spl_hostid=0x00bab10c
 
Current version of pixman: 0.44.2
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.55.log", Time: Thu Apr 10 14:40:32 2025
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(==) No Layout section.  Using the first Screen section.
(**) |-->Screen "Default Screen" (0)
(**) |   |-->Monitor "Configured Monitor"
(**) |   |-->Device "Configured Video Device"
(**) Allowing byte-swapped clients
(==) Automatically adding devices
(==) Automatically enabling devices
(==) Automatically adding GPU devices
(==) Automatically binding GPU devices
(==) Max clients allowed: 256, resource mask: 0x1fffff
(==) FontPath set to:
	/usr/share/fonts/misc,
	/usr/share/fonts/TTF,
	/usr/share/fonts/OTF,
	/usr/share/fonts/Type1,
	/usr/share/fonts/100dpi,
	/usr/share/fonts/75dpi
(==) ModulePath set to "/usr/lib/xorg/modules"
(II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
(EE) systemd-logind: failed to get session: Failed to execute program org.freedesktop.login1: Permission denied
(II) xfree86: Adding drm device (/dev/dri/card1)
(II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0/drm/card1
(II) xfree86: Adding drm device (/dev/dri/card0)
(II) Platform probe for /sys/devices/pci0000:00/0000:00:1c.0/0000:08:00.0/0000:09:00.0/drm/card0
(--) PCI: (3@0:0:0) 8086:e20b:8086:1100 rev 0, Mem @ 0x88000000/16777216, 0x4000000000/17179869184, BIOS @ 0x????????/2097152
(--) PCI:*(9@0:0:0) 1a03:2000:1043:87ed rev 82, Mem @ 0x80000000/67108864, 0x84000000/262144, I/O @ 0x00003000/128
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
	compiled for 1.21.1.16, module version = 1.0.0
(WW) Warning, couldn't open module dummy
(EE) Failed to load module "dummy" (module does not exist, 0)
(EE) No drivers available.
(EE) 
Fatal server error:
(EE) no screens found(EE) 
(EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.55.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.

X.Org X Server 1.21.1.16
X Protocol Version 11, Revision 0
Current Operating System: Linux SteamHeadless 6.12.21-1-lts #1 SMP PREEMPT_DYNAMIC Sat, 29 Mar 2025 06:39:46 +0000 x86_64
Kernel command line: zfs=rpool/archlinux/root rw ipv6.disable=1 spl.spl_hostid=0x00bab10c
 
Current version of pixman: 0.44.2
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.55.log", Time: Thu Apr 10 14:40:35 2025
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(==) No Layout section.  Using the first Screen section.
(**) |-->Screen "Default Screen" (0)
(**) |   |-->Monitor "Configured Monitor"
(**) |   |-->Device "Configured Video Device"
(**) Allowing byte-swapped clients
(==) Automatically adding devices
(==) Automatically enabling devices
(==) Automatically adding GPU devices
(==) Automatically binding GPU devices
(==) Max clients allowed: 256, resource mask: 0x1fffff
(==) FontPath set to:
	/usr/share/fonts/misc,
	/usr/share/fonts/TTF,
	/usr/share/fonts/OTF,
	/usr/share/fonts/Type1,
	/usr/share/fonts/100dpi,
	/usr/share/fonts/75dpi
(==) ModulePath set to "/usr/lib/xorg/modules"
(II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
(EE) systemd-logind: failed to get session: Failed to execute program org.freedesktop.login1: Permission denied
(II) xfree86: Adding drm device (/dev/dri/card1)
(II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0/drm/card1
(II) xfree86: Adding drm device (/dev/dri/card0)
(II) Platform probe for /sys/devices/pci0000:00/0000:00:1c.0/0000:08:00.0/0000:09:00.0/drm/card0
(--) PCI: (3@0:0:0) 8086:e20b:8086:1100 rev 0, Mem @ 0x88000000/16777216, 0x4000000000/17179869184, BIOS @ 0x????????/2097152
(--) PCI:*(9@0:0:0) 1a03:2000:1043:87ed rev 82, Mem @ 0x80000000/67108864, 0x84000000/262144, I/O @ 0x00003000/128
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
	compiled for 1.21.1.16, module version = 1.0.0
(WW) Warning, couldn't open module dummy
(EE) Failed to load module "dummy" (module does not exist, 0)
(EE) No drivers available.
(EE) 
Fatal server error:
(EE) no screens found(EE) 
(EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.55.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.

meilon avatar Apr 10 '25 13:04 meilon

I got a little bit further: With the unprivilleged container and all /dev/cards I can start and login. But when I launch a game I get messages basically complaining about not enough VRAM. Turns out everything runs on the ASPEED "GPU".

Then I ran Xorg -configure as root, kept only what was for the Battlemage GPU (device, screen and monitor) from this fresh xorg.conf.new, placed it into /etc/X11/xorg.conf.d/ and restarted the container. Now games successfully launch, but I have display issues when streaming, input doesn't work etc (everything is green, only bottom half of display is actually content).

Then I thought I would try the dummy config (the package xf86-video-dummy is missing in the arch container for this to work!) with only card and render device of my BMG GPU in the docker-compose.yml, but then games won't launch because the GPU can't render to this dummy monitor.

I'm out of ideas. Even tough I plugged in a HDMI dummy plug it isn't recognized in the default setup. Only if I configure Xorg manually I can launch games, but they don't stream correctly. Turning on or off hardware encoding doesn't make a difference.

What could I try next?

meilon avatar Apr 22 '25 14:04 meilon

Debugging the streaming I could find out that hardware encoding wasn't even being utilized because the 32bit version of intel-media-driver was missing. The version in AUR is too old for Battlemage so I compiled the same intel-gmmlib and intel-media-driver versions available in the arch repo using the AUR repos. Now Steam tries to encode via VAAPI but fails:

ffmpeg verbose: libva: VA-API version 1.22.0
ffmpeg verbose: libva: Trying to open /usr/lib32/dri/iHD_drv_video.so
ffmpeg verbose: libva: Found init function __vaDriverInit_1_22
ffmpeg verbose: libva: va_openDriver() returns 0
ffmpeg verbose: Initialised VAAPI connection: version 1.22
ffmpeg verbose: VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 25.2.0 (1b535bf).
ffmpeg verbose: Driver not found in known nonstandard list, using standard behaviour.
ffmpeg verbose: Input surface format is nv12.
ffmpeg verbose: Using VAAPI profile VAProfileH264Main (6).
ffmpeg verbose: Using VAAPI entrypoint VAEntrypointEncSlice (6).
ffmpeg verbose: Using VAAPI render target format YUV420 (0x1).
ffmpeg verbose: RC mode: VBR.
ffmpeg verbose: Block Level bitrate control: OFF.
ffmpeg verbose: RC target: 83% of 18000000 bps over 1000 ms.
ffmpeg verbose: RC buffer: 18000000 bits, initial fullness 13500000 bits.
ffmpeg verbose: RC framerate: 29125/489 (59.56 fps).
ffmpeg verbose: Using intra and P-frames (supported references: 3 / 1).
ffmpeg verbose: All wanted packed headers available (wanted 0xd, found 0x1f).
ffmpeg verbose: Using level 3.1.
Video Encoder Changed
>>> Capture method set to Game Vulkan NV12 + VAAPI H264
>>> Capture resolution set to 1280x720
>>> Capture colorspace set to BT.601 limited range
...
ffmpeg error: Failed to map output buffers: 24 (internal encoding error).
ffmpeg error: Output failed: -5.

On the host machine via dmesg I get multiple entries like this:

xe 0000:03:00.0: [drm] GT1: Engine reset: engine_class=vecs, logical_mask: 0x3, guc_id=0
xe 0000:03:00.0: [drm] GT1: Timedout job: seqno=4294967169, lrc_seqno=4294967169, guc_id=0, flags=0x0 in steam [49718]

If I use the installed ffmpeg version within the container to convert a video via VAAPI it works flawlessly. This runs fine on the GPU, I don't know what the issue is right now, maybe its 32bit related?

I also haven't found a solution to the input not working, but I'll only tackle this if I get video to work.

Just for fun I also tried the Debian version. The original Dockerfile wouldn't work because it's based on bookworm and that wont get all the required libraries for Battlemage. Some minor changes were required to make it build with trixie but that also doesn't work. The streaming_log.txt stops outputting abruptly after the ffmpeg verbose: libva: VA-API version 1.22.0 line and everything inside the container gets unstable. I have to restart the whole container to get another try. Nothing happening in dmesg, though. Major incompatibilities there!

meilon avatar Apr 23 '25 19:04 meilon

I got this working on a fork, but I had to move from a debian base to an ubuntu 25.04 base. I also had to install some intel packages but at least is running.

does this repo have any collaboration guidelines? Happy to put a pull request up for review. I did push the image to dockerhub for testing. I can get it to work on my ARC B580

rtrigoso avatar Jul 29 '25 13:07 rtrigoso

I got this working on a fork, but I had to move from a debian base to an ubuntu 25.04 base. I also had to install some intel packages but at least is running.

does this repo have any collaboration guidelines? Happy to put a pull request up for review. I did push the image to dockerhub for testing. I can get it to work on my ARC B580

I'd be pretty happy with some colab and PRs. I am considering a rebase to Ubuntu or Fedora for access to updated packages. I've been running tests to see if they make a difference to performance.

Are you on our discord server?

Josh5 avatar Jul 31 '25 22:07 Josh5

I got this working on a fork, but I had to move from a debian base to an ubuntu 25.04 base. I also had to install some intel packages but at least is running.

does this repo have any collaboration guidelines? Happy to put a pull request up for review. I did push the image to dockerhub for testing. I can get it to work on my ARC B580

I'd be pretty happy with some colab and PRs. I am considering a rebase to Ubuntu or Fedora for access to updated packages. I've been running tests to see if they make a difference to performance.

Are you on our discord server?

Yes shoot me your username.

apologies, it has been a long week.

rtrigoso avatar Aug 05 '25 16:08 rtrigoso

Yes shoot me your username.

Josh.5 Support server is here: https://streamingtech.co.nz/discord

There is a "general" channel in the steam headless role's section. Let's chat there.

Josh5 avatar Aug 05 '25 19:08 Josh5