HeroicGamesLauncher icon indicating copy to clipboard operation
HeroicGamesLauncher copied to clipboard

Gamescope does not set DISPLAY or it cannot be used

Open KosmX opened this issue 6 months ago • 1 comments
trafficstars

Describe the bug

I do not have a reliable X11 on my system, only Wayland, I would need to use gamescope to have a game XWayland session. But it does not work.

(I'm on flatpak)

When I try to launch the wine instance, it just cannot find the X11 Display and either crashes, or uses the not-yet-working wayland backend (if available)

Add logs

Launching "Battle.net" (sideload)

Native? No

Installed in: /run/user/1000/doc/333a527a

System Info:

CPU: 16x AMD Ryzen 7 7840U w/ Radeon  780M Graphics

Memory: 58.76 GB (used: 8.57 GB)

GPUs:

  GPU 0:

    Name: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1

    IDs: D=15bf V=1002 SD=0006 SV=f111

    Driver: amdgpu

OS: Arch Linux 6.14.6-zen1-1-zen-custom (linux)

The current system is not a Steam Deck

We are running inside a Flatpak container

Software Versions:

  Heroic: 2.16.1 Scopper Gaban

  Legendary: 0.20.36 Urban Flight (Heroic)

  gogdl: 1.1.2

  comet: comet 0.2.0

  Nile: 1.1.2 Will A. Zeppeli

Game Settings: {

	"autoInstallDxvk": true,

	"autoInstallDxvkNvapi": true,

	"autoInstallVkd3d": true,

	"preferSystemLibs": false,

	"enableEsync": true,

	"enableMsync": false,

	"enableFsync": true,

	"nvidiaPrime": false,

	"enviromentOptions": [

		{

			"key": "DISPLAY",

			"value": ":0"

		}

	],

	"wrapperOptions": [

		{

			"exe": "env",

			"args": "WAYLAND_DISPLAY="

		}

	],

	"showFps": false,

	"showMangohud": false,

	"useGameMode": false,

	"useSteamRuntime": false,

	"battlEyeRuntime": false,

	"eacRuntime": false,

	"language": "",

	"beforeLaunchScriptPath": "",

	"afterLaunchScriptPath": "",

	"gamescope": {

		"enableUpscaling": true,

		"enableLimiter": false,

		"enableForceGrabCursor": false,

		"windowType": "borderless",

		"gameWidth": "2560",

		"gameHeight": "1440",

		"upscaleHeight": "1440",

		"upscaleWidth": "2560",

		"upscaleMethod": "integer",

		"fpsLimiter": "",

		"fpsLimiterNoFocus": "",

		"additionalOptions": ""

	},

	"verboseLogs": true,

	"wineVersion": {

		"bin": "/home/kosmx/.var/app/com.heroicgameslauncher.hgl/config/heroic/tools/proton/GE-Proton9-27/proton",

		"name": "Proton - GE-Proton9-27",

		"type": "proton"

	},

	"winePrefix": "/home/kosmx/Games/Heroic/Prefixes/default/Battle.net",

	"wineCrossoverBottle": "",

	"disableUMU": false

}

Game launched at: Fri May 16 2025 13:16:11 GMT+0200 (Central European Summer Time)

Winetricks packages: 

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mconsole:[0m gamescope-brokey version 3.16.4 (gcc 14.2.0)

No CAP_SYS_NICE, falling back to regular-priority compute and threads.

Performance will be affected.

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Loading scripts from: '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts'

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Loading scripts from: '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope'

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Loading scripts from: '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/common'

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/common/inspect.lua' (id: 0)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/common/modegen.lua' (id: 1)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/common/util.lua' (id: 2)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Loading scripts from: '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays'

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/asus.rogally.lcd.lua' (id: 3)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/deckhd.steamdeck.deckhd-lcd.lua' (id: 4)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/gpd.win4.lcd.lua' (id: 5)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/lenovo.legiongo.lcd.lua' (id: 6)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.lcd.lua' (id: 7)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.oled.lua' (id: 8)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Loading scripts from: '/etc/gamescope/scripts'

[gamescope-brokey] [[0;33mWarn[0m]  [0;37mscriptmgr:[0m Directory '/etc/gamescope/scripts' does not exist

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mscriptmgr:[0m Loading scripts from: '/home/kosmx/.var/app/com.heroicgameslauncher.hgl/config/gamescope/scripts'

[gamescope-brokey] [[0;33mWarn[0m]  [0;37mscriptmgr:[0m Directory '/home/kosmx/.var/app/com.heroicgameslauncher.hgl/config/gamescope/scripts' does not exist

ATTENTION: default value of option vk_khr_present_wait overridden by environment.

ATTENTION: default value of option vk_khr_present_wait overridden by environment.

ATTENTION: default value of option vk_khr_present_wait overridden by environment.

ATTENTION: default value of option vk_khr_present_wait overridden by environment.

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m selecting physical device 'AMD Radeon 780M (RADV PHOENIX)': queue family 1 (general queue family 0)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m physical device supports DRM format modifiers

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mwlserver:[0m [backend/headless/backend.c:67] Creating headless backend

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mxdg_backend:[0m Seat name: Hyprland

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m supported DRM formats for sampling usage:

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   AR24 (0x34325241)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   XR24 (0x34325258)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   AB24 (0x34324241)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   XB24 (0x34324258)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   RG16 (0x36314752)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   AB4H (0x48344241)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   XB4H (0x48344258)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   AB48 (0x38344241)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   XB48 (0x38344258)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   AB30 (0x30334241)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   XB30 (0x30334258)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   AR30 (0x30335241)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvulkan:[0m   XR30 (0x30335258)

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mwlserver:[0m Using explicit sync when available

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mwlserver:[0m Running compositor on wayland display 'gamescope-0'

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mwlserver:[0m [backend/headless/backend.c:17] Starting headless backend

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mwlserver:[0m Successfully initialized libei for input emulation!

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mwlserver:[0m [xwayland/server.c:107] Starting Xwayland on :0

The XKEYBOARD keymap compiler (xkbcomp) reports:

> Warning:          Could not resolve keysym XF86RefreshRateToggle

> Warning:          Could not resolve keysym XF86Accessibility

> Warning:          Could not resolve keysym XF86DoNotDisturb

Errors from xkbcomp are not fatal to the X server

[gamescope-brokey] [[0;31mError[0m] [0;37mpipewire:[0m pw_context_connect failed

Warning: failed to setup PipeWire, screen capture won't be available

[gamescope-brokey] [[0;34mInfo[0m]  [0;37medid:[0m Patching res 800x1280 -> 2560x1440

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mvblank:[0m Using timerfd.

INFO: umu-launcher version 1.2.6 (3.12.10 (main, Nov 10 2011, 15:00:00) [GCC 14.2.0])

INFO: steamrt3 is up to date

ProtonFixes[467] WARN: [CONFIG]: Parent directory "/home/kosmx/.config/protonfixes" does not exist. Abort.

ProtonFixes[467] INFO: Running protonfixes

ProtonFixes[467] INFO: Running checks

ProtonFixes[467] INFO: All checks successful

ProtonFixes[467] WARN: Game title not found in CSV

ProtonFixes[467] INFO: Non-steam game UNKNOWN (umu-0)

ProtonFixes[467] INFO: No store specified, using UMU database

ProtonFixes[467] INFO: Using global defaults for UNKNOWN (umu-0)

ProtonFixes[467] INFO: Non-steam game UNKNOWN (umu-0)

ProtonFixes[467] INFO: No store specified, using UMU database

ProtonFixes[467] INFO: No global protonfix found for UNKNOWN (umu-0)

Proton: /run/flatpak/doc/333a527a/Battle.net-Setup.exe

Proton: Executable a unix path, launching with /unix option.

fsync: up and running.

002c:fixme:winediag:loader_init wine-staging 9.0 is a testing version containing experimental patches.

002c:fixme:winediag:loader_init Please mention your exact version when filing bug reports on winehq.org.

0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005

0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005

0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005

0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005

0084:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\winebth": c0000135

0034:fixme:service:scmdatabase_autostart_services Auto-start service L"winebth" failed to start: 126

Command exited with status: 0

00d4:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFA, 0195FF14

00cc:err:kerberos:kerberos_LsaApInitializePackage no Kerberos support, expect problems

00cc:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems

00f8:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.

00f8:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."

00f8:err:systray:initialize_systray Could not create tray window

0134:fixme:oleacc:find_class_data unhandled window class: L"#32769"

0134:fixme:uiautomation:uia_get_providers_for_hwnd Override provider callback currently unimplemented.

0134:fixme:uiautomation:default_uia_provider_callback Default ProviderType_NonClientArea provider unimplemented.

00cc:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.

00cc:err:winediag:nodrv_CreateWindow L"Make sure that your X server is running and that $DISPLAY is set correctly."

00cc:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 00C0F7BC

[gamescope-brokey] [[0;34mInfo[0m]  [0;37mlaunch:[0m Primary child shut down!

(EE) failed to read Wayland events: Broken pipe

============= End of log =============

Steps to reproduce

Probably the easiest way to reproduce is with flatpak.

  1. Install Heroic using flatpak
  2. Use flatseal to remove X11 windowing permission (make sure to leave wayland, and have a wayland session)
  3. create a new game (doesn't matter how), enable gamescope
  4. If proton 10 or newer is used, add a wrapper command: env: WAYLAND_DISPLAY= to unset wayland display after gamescope is running. This will block proton to use the broken wayland engine.
  5. try to launch the game

Expected behavior

DISPLAY is set properly, and wine/proton starts

Screenshots

No response

Heroic Version

Latest Stable (Flatpak)

System Information

  • Arch Linux 6.14.6 kernel (up-to-date)
  • Wayland compositor with broken X11
  • AppArmor enabled, but I verified that it doesn't blocking anything.

System Information:

CPU: 16x AMD Ryzen 7 7840U w/ Radeon  780M Graphics

Memory: 58.76 GB (used: 8.57 GB)

GPUs:

  GPU 0:

    Name: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1

    IDs: D=15bf V=1002 SD=0006 SV=f111

    Driver: amdgpu

OS: Arch Linux 6.14.6-zen1-1-zen-custom (linux)

The current system is not a Steam Deck

We are running inside a Flatpak container

Software Versions:

  Heroic: 2.16.1 Scopper Gaban

  Legendary: 0.20.36 Urban Flight (Heroic)

  gogdl: 1.1.2

  comet: comet 0.2.0

  Nile: 1.1.2 Will A. Zeppeli

Additional information

No response

KosmX avatar May 16 '25 11:05 KosmX