Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Game: League of Legends not displaying in-game

Open patrickaldis opened this issue 2 years ago • 13 comments

Currently, the launcher/client for the game displays fine. However the in-game window doesn't appear - game sounds are coming through so the process is active, just not displaying. I've tested on gnome under wayland and it functions as intended.

I want to try and provide more general details about the window, but I don't really have experience debugging this kind of thing - any help would be much appreciated :)

patrickaldis avatar Aug 04 '22 22:08 patrickaldis

I realise this has the wrong label also

patrickaldis avatar Aug 04 '22 22:08 patrickaldis

gnome is bad for testing, as it runs on a different library. Can you try sway? Preferably sway-git.

vaxerski avatar Aug 04 '22 23:08 vaxerski

I've tried sway and sway-git and that runs it fine actually

patrickaldis avatar Aug 04 '22 23:08 patrickaldis

A quick workaround that worked for me was to:

  1. launch a different wm/de (worked with sway for me)
  2. download and install the game using any provided working method (wine-lol, snap, lutris)
  3. return to hyprland
  4. launch the game
  5. you should get an emulated windows tray, right click the riot client and select League of Legends
  6. League of Legends should pop up, but it might be a bit small, so toggle the window to floating mode/fullscreen mode

screenshot: 20221017_08h47m37s_grim

rwendell avatar Oct 17 '22 14:10 rwendell

This actually sounds like a feature, not a bug. A compositor preventing one from running League of Legends should be seen as a positive, not a negative.

ThatOneCalculator avatar Oct 19 '22 20:10 ThatOneCalculator

I'm starting to think the same thing. 2 months clean and I can feel joy again

patrickaldis avatar Oct 19 '22 20:10 patrickaldis

I suggest using gamescope with league on Hyprland

amilonop avatar Nov 10 '22 15:11 amilonop

I'm confirming the same issue here. Let me elaborate on my findings:

First, some context: League of Legends (hereinafter LoL) consists of two separate windows: the launcher and the client. Launcher is what gets launched first, and it is a heavily customized window (e.g. it tries to handle it's own geometry and mouse drag move events, which works fine in Windows and GNOME, but completely breaks in bspwm). Launcher launches client when ready for a match, and the client is a more conventional window. As many other games, it has its own resolution setting and "Window mode" setting with three options - Fullscreen, windowed, and "Borderless window" (e.g. window without decorations). Setting mode to borderless window and resolution to equal that of the display is effectively the same as fullscreen on Windows, GNOME and bspwm.

Now to the hyprland-specific part: when client launches either in fullscreen, or borderless window with resolution equal to that of the display, situation from issue OP post takes place

The window is listed in the output of hyprctl clients as something like

	at: 0,0
	size: 1,1
	workspace: 1 (1)
	floating: 1
	monitor: 0
	...
	xwayland: 1
	pinned: 0
	fullscreen: 0
	fullscreenmode: 0
	...

But it's impossible to focus with neither cyclenext nor focuswindow dispatcher. It's not responding to resizewindowpixel and fullscreen dispatchers.

I believe similar issue is described in https://github.com/hyprwm/Hyprland/issues/166

It is still possible to run in regular window mode and highest available resolution, though it is a bit inconvenient - when not in hyprland-fullscreen mode, game suffers from a minor FPS dropdown, and when in hyprland-fullscreen mode, mouse pointer seems a bit off - as in when you click on { x:0, y:0 } point of the screen, the game registers click at somewhere like { x:0, y:15 }

@vaxerski you might be interested in seeing this, thanks

I'm ready to provide any diagnostic information you might want to look at

eranikid avatar Jan 13 '23 09:01 eranikid

Got an update on this.

Firstly, the issue of mouse pointer being off when WM/compositor "force-fullscreens" the window is not Hyprland specific - I also got this same behavior on bspwm.

Secondly, I discovered that launching in "Windowed mode", and then changing to "Borderless window mode" in-game actually does not make the window go 1x1, and the mouse-pointer-off issue does not apper in "Borderless window mode"

I've ran a little test and gathered some logs:

  1. I launched LoL, which was preconfigured from last launch to be 2540 x 1440 "Windowed mode". Log from before launch to getting ready for step 2
  2. I changed to 2540 x 1440 "Borderless window mode", and it rendered correctly. Log from before changing mode to getting ready for step 3
  3. I closed the window from step 2 and tried to launch LoL client again. This time, it was configured to start in 2540 x 1440 right away, and it fell into the 1x1 window trap described above. Log from before second launch

Second log file contains the line

[LOG] Map request dispatched, monitor DP-1, xywh: 0.000000 0.000000 2560.000000 1440.000000

While third one contains analogous, but different one:

[LOG] Map request dispatched, monitor DP-1, xywh: 0.000000 0.000000 1.000000 1.000000

Would be great to be able to launch LoL client in correct mode right away

eranikid avatar Jan 13 '23 18:01 eranikid

maybe LoL is itself starting to ask its players to go outside.

vaxerski avatar Jan 13 '23 18:01 vaxerski

I haved a same issue, but I can use fullscreen mode in-game/hyprland if i apply this rules:

windowrulev2 = size 1920 1080,class:^(league of legends.exe)$
windowrulev2 = fullscreen,class:^(league of legends.exe)$

but if a change workspace after the game is opened, i can't go back to league of legends

gabriel-pena avatar Jan 16 '23 15:01 gabriel-pena

I managed to install the game by using nested compositors with labwc and cage.

but the mouse got move fast to the corner of the screen (top-left and bottom-right) and to fix that I need to alt-tab a few times and the mouse move normally again.

I'm starting to unaddicted this game though. May try on sway in the future.

tienbuigia avatar Jan 31 '23 16:01 tienbuigia

The easiest workaround is just running lol with gamescope and select close client while on game

rurigk avatar Feb 06 '23 10:02 rurigk

@rurigk How do you config gamescrope in lutris? I enable gamescrope in lutris and open the game really nice but when in-game League does not take my input at all.

I only enable gamescrope and set "Gamescope game resolution" to 1920x1080, left out "Gamescrope output resolution".

tienbuigia avatar Feb 07 '23 11:02 tienbuigia

I installed league from https://github.com/kyechou/leagueoflegends Which uses wine-lol

I launch lol with gamescope -w 3840 -h 2160 -W 3840 -H 2160 -f -b -- leagueoflegends start

rurigk avatar Feb 08 '23 04:02 rurigk

should be fixed with 7e523e4d5e526bdf5ab86a8f4fe37efeef356707 :)

vaxerski avatar Feb 28 '23 18:02 vaxerski

This is so sad, now all Hyprland users will be touching even less grass than before 😔

ThatOneCalculator avatar Mar 01 '23 01:03 ThatOneCalculator