Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Certain Games Break After Workspace Switch

Open JoshuaFern opened this issue 3 years ago • 14 comments

When I'm playing a game on Steam and I switch to another workspace, the game is often completely borked after switching back.

Tested games with this issue: Rocket League, Prey, Idle Spiral (free) All the games affected seem to be running on Proton, but not all Proton games are affected.

Nvidia 515.57, NixOS

JoshuaFern avatar Jul 18 '22 15:07 JoshuaFern

define "borked" graphical issues? crashes? the game kidnaps your family and asks for a ransom?

NotAShelf avatar Jul 18 '22 15:07 NotAShelf

define "borked" graphical issues? crashes? the game kidnaps your family and asks for a ransom?

It just kind of freezes/crashes.

JoshuaFern avatar Jul 18 '22 15:07 JoshuaFern

use the wine virtual desktop

vaxerski avatar Jul 18 '22 15:07 vaxerski

I tried the virtual desktop, it appears for a second and then vanishes.

JoshuaFern avatar Jul 18 '22 15:07 JoshuaFern

and should reappear in a second, some games do that

vaxerski avatar Jul 18 '22 15:07 vaxerski

Ah, it's another problem that's exacerbating the issue.

I've noticed sometimes when I move a game to another workspace it seems to make the game window vanish. I have a window rule windowrule=workspace 15 silent,steam_app_* in my config and when the game starts in virtual desktop mode it gets moved and vanishes, however if I quickly switch to that workspace before the game starts it runs fine and the virtual desktop does indeed prevent it from crashing from switching workspaces.

JoshuaFern avatar Jul 18 '22 16:07 JoshuaFern

I've also experienced the issue with games vanishing. The thing is, they're not vanishing, just flying to oblivion (-62457 -56535 anyone?). That also happens for spotify when it's in floating mode. So what you can do is go to the workspace it's on and type hyprctl dispatcher focuswindow <name>, then make it tiled to get it back in a sane position.

Also, saw you're using NixOS. I hope you're using the flake.

fufexan avatar Jul 18 '22 16:07 fufexan

I've also experienced the issue with games vanishing. The thing is, they're not vanishing, just flying to oblivion (-62457 -56535 anyone?). That also happens for spotify when it's in floating mode. So what you can do is go to the workspace it's on and type hyprctl dispatcher focuswindow <name>, then make it tiled to get it back in a sane position.

I've noticed this happen once with MPV, it seems you're right about this happening with the games as well. Perhaps a windowrule preventing games from floating would help.

Also, saw you're using NixOS. I hope you're using the flake.

Indeed I am.

JoshuaFern avatar Jul 18 '22 16:07 JoshuaFern

check with the latest commit.

Oh wait cunt cock piss shit i might know why this is.

vaxerski avatar Jul 18 '22 18:07 vaxerski

Seems to be working better with the latest commit and windowrule=tile,steam_app_*. I'm not getting vanishing windows anymore and I'm able to move games to other workspaces.

JoshuaFern avatar Jul 18 '22 22:07 JoshuaFern

have you tried the latest commit? (not latest anymore, the ones from 3h ago)

vaxerski avatar Jul 18 '22 22:07 vaxerski

Yep. The original issue of games freezing still happens and while using a WINE virtual desktop is functional, it's more of a workaround and it would be nice if games just worked out of the box.

JoshuaFern avatar Jul 18 '22 22:07 JoshuaFern

this is still happening tested with ultrakill and splunkey 2

crypticC0der avatar Sep 10 '22 19:09 crypticC0der

What happens? Can I get a video of this happening?

vaxerski avatar Sep 10 '22 20:09 vaxerski

its sorta hard to video basically, if not focused on start it turns into a black window and refuses to load if you move your focus away from the game to another window, when you refocus the game it goes into the black window state mentioned above

crypticC0der avatar Sep 30 '22 20:09 crypticC0der

wot de foq

vaxerski avatar Sep 30 '22 21:09 vaxerski

its sorta hard to video basically, if not focused on start it turns into a black window and refuses to load if you move your focus away from the game to another window, when you refocus the game it goes into the black window state mentioned above

Can reproduce, happens with Ultrakill and Euro Truck Simulator, both running via Proton Exeprimental, but doesn't on CS:GO, native Linux.

Ultrakill

https://user-images.githubusercontent.com/93444783/195569085-43b0ed68-d83e-4536-801f-f871f6b9b5ab.mp4

Euro Truck Simulator

https://user-images.githubusercontent.com/93444783/195570364-1da74c8f-61f7-4d94-8c61-6372509aacda.mp4

ghost avatar Oct 13 '22 10:10 ghost

Narrowed it down to DXVK requesting a minimize whenever the game goes out of focus. Additionally, it seems, as usual, that due to the shitton of band-aids X11 has received, that I have no fucking idea what is happening there and after 2h of trying to battle it out with the stupid legacy protocol, I was unable to find a solution.

The window refuses to come back, despite being asked to.

in the meantime, ofc, wine virtual desktop / gamescope fix this issue

vaxerski avatar Oct 28 '22 20:10 vaxerski

follow this issue over at https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3520

vaxerski avatar Oct 30 '22 17:10 vaxerski

should be fixed with 206360177fcae23436928542ed860c854b985db4 please verify

vaxerski avatar Nov 04 '22 16:11 vaxerski

@0x4nt @JoshuaFern @crypticC0der ping

vaxerski avatar Nov 05 '22 16:11 vaxerski

its fixed, great job hyprland is coming along very well

crypticC0der avatar Nov 05 '22 18:11 crypticC0der