Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot run game with gamescope enabled on wayland #182

Closed
dipperstan09 opened this issue Sep 11, 2024 · 8 comments
Closed

cannot run game with gamescope enabled on wayland #182

dipperstan09 opened this issue Sep 11, 2024 · 8 comments

Comments

@dipperstan09
Copy link

it gives the error
steamrt is up to date Traceback (most recent call last): File "/usr/bin/umu-run", line 8, in <module> sys.exit(main()) ^^^^^^ File "/usr/lib/python3.12/site-packages/umu/__main__.py", line 9, in main return umu_run() ^^^^^^^^^ File "/usr/lib/python3.12/site-packages/umu/umu_run.py", line 841, in main return run_command(command) ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/umu/umu_run.py", line 665, in run_command d_primary = display.Display(":0") ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/Xlib/display.py", line 89, in __init__ self.display = _BaseDisplay(display) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/Xlib/display.py", line 71, in __init__ protocol_display.Display.__init__(self, *args, **keys) File "/usr/lib/python3.12/site-packages/Xlib/protocol/display.py", line 166, in __init__ raise error.DisplayConnectionError(self.display_name, r.reason) Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n' [gamescope] [Info] launch: Primary child shut down! (EE) failed to read Wayland events: Broken pipe Monitored process exited.
full log
lutris-wayland-gamescope-error-log.txt

no problem when running on x11.

@dipperstan09
Copy link
Author

adding --expose-wayland in custom settings still gives the same result.

@loathingKernel
Copy link
Contributor

The DISPLAY at the end of this line of the log looks odd

Started initial process 6153 from gamescope -w 1477 -h 831 -W 1920 -H 1080 -f --force-grab-cursor -- /usr/bin/umu-run /media/data/Games/Lies of P/LOP.exe DISPLAY:=2

Did you add that? And for what reason? The syntax of the variable assignment is malformed so I guess you are trying to do something but in the wrong way, what is that you trying to achieve?

@dipperstan09
Copy link
Author

dipperstan09 commented Sep 11, 2024

The DISPLAY at the end of this line of the log looks odd

Started initial process 6153 from gamescope -w 1477 -h 831 -W 1920 -H 1080 -f --force-grab-cursor -- /usr/bin/umu-run /media/data/Games/Lies of P/LOP.exe DISPLAY:=2

Did you add that? And for what reason? The syntax of the variable assignment is malformed so I guess you are trying to do something but in the wrong way, what is that you trying to achieve?

i put it as window command line argument because
wlserver: [xwayland/server.c:107] Starting Xwayland on :2

i just tried it becasue that is how i do it on steam when launching gamescope in a terminal then launching a steam game to that session. Anyhow, omitting that argument gives new error

socket.gaierror: [Errno -3] Temporary failure in name resolution

lutris-wayland-gamescope-error-log2.txt

@loathingKernel
Copy link
Contributor

loathingKernel commented Sep 11, 2024

DISPLAY is not a command line argument, it is an environment variable and it is also formatted in the wrong way. It should be DISPLAY=:2, notice the colon : is after the equal = sign.

The new error is likely because of network issues on your end. Were your connection down when you tried to run the game?

@dipperstan09
Copy link
Author

dipperstan09 commented Sep 11, 2024

Thanks for that. I omitted that variable and had a secure internet connection. Running the game gives the same error as the first log minus the "DISPLAY" part. Game launches with no problem on X11 session.
successful-X11-session-gamescope-launch.txt

This error

Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n'

only appears in wayland session.

@R1kaB3rN
Copy link
Member

This issue was resolved a while ago in the latest branch. Any display errors should not happen anymore because before umu-launcher connects to the X server, it checks if the session is under gamescope and that the host OS is steamos.

Now, it'll be up to Lutris to push an update to umu-launcher in their runtime. For now, you can intervene manually by replacing the contents within their runtime directory:

  1. git clone https://github.com/Open-Wine-Components/umu-launcher.git
  2. cd umu-launcher
  3. ./configure.sh --user-install
  4. make
  5. mv builddir/umu-run $HOME/.local/share/lutris/runtime/umu
  6. cd $HOME/.local/share/lutris/runtime/umu && ln -s umu-run umu_run.py

It is unfortunate that you need to do these steps, and the reason is that Lutris is unable to properly find the system installed umu-launcher anymore. Therefore, unless lutris/lutris#5539 is merged, you cannot simply use the lutris-git package on Arch Linux either.

@R1kaB3rN
Copy link
Member

R1kaB3rN commented Sep 12, 2024

Closing as I'm convinced this is no longer a bug and has been fixed in #171

@R1kaB3rN
Copy link
Member

@dipperstan09 sorry for the ping, but I was mistaken. Lutris searches $PATH for umu-run, so you should be able to use the AUR umu-launcher if you're on Arch.

Currently, only ones who will really need to do the steps I described are Flatpak users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants