dxvk icon indicating copy to clipboard operation
dxvk copied to clipboard

Can't alt tab in Final Fantasy XIV or League of Legends

Open Vogelchevalier opened this issue 5 years ago • 15 comments

https://github.com/doitsujin/dxvk/issues/866 https://github.com/Joshua-Ashton/d9vk/issues/76 https://github.com/Joshua-Ashton/d9vk/issues/77 https://github.com/Joshua-Ashton/d9vk/issues/391

Both games (FF14 & LoL) have a separate client that creates the main game window. The main game window is set to "Keep above others" in KDE. Happens on Gnome as well. Alt tabbing works if you uncheck the "Keep above others" box but it's inaccessible if your task manager is on the same monitor as the game. League creates a new window for every match so the setting "resets" after every game. Doesn't matter if the compositor is enabled or disabled. League alt tabs fine when using Gallium Nine.

The bug here isn't that alt tabbing doesn't work; it works perfectly after you uncheck the box. But that shoudn't be the default.

Software information

App : Final Fantasy XIV (using Proton) & League of Legends (D9VK) OS : Manjaro Linux - every kernel since jan 2019

System information

GPU: Vega 56 Driver: mesa - every version since jan 2019 Wine version: every version since jan 2019 (staging) DXVK version: every version since jan 2019 D9VK version: every version since may 2019

Vogelchevalier avatar Oct 01 '19 00:10 Vogelchevalier

This is an issue because we don't inject our own window proc to handle entering/leaving fullscreen, etc when requested (and also implementing the OCCLUDED response) -- as the game is spamming focus calls.

The reason I am hesitant about implementing this in D9VK, at least [these concerns don't affect DXVK], is because I would also have to implement the whole device loss crap that comes with that in D3D9. The problem with that is qutie a lot of games will instead just crash if they recieve a device loss.

So I'm kinda undecided... Should I implement it, and mirror native crashes across a bunch of games or not implement it and have a handful of games where alt-tab is broken.

If you're interested in testing out the former option in D9VK (this does not affect d3d10 or d3d11), there is a https://github.com/Joshua-Ashton/d9vk/tree/wip-alt-tab branch, although it has some issues and doesn't work 100% of the time yet. [I think there is some race going on]

misyltoad avatar Oct 01 '19 02:10 misyltoad

Could you not just set up KDE Window rules for any games that are affected by this instead? This would ensure you don't need to manually uncheck "Keep Above Others" every time you execute the game.

alligatorshoes avatar Oct 01 '19 10:10 alligatorshoes

Fullscreen won't work without "Keep Above Others", and setting it actually matches Windows behaviour. So yes, it most definitely should be default, any solution to the alt+tab problem has to be something else.

Does this work with wine's DXGI implementation? They do effectively the same thing but implement some more of the DXGI internals, so I'm curious if that works any better.

doitsujin avatar Oct 01 '19 11:10 doitsujin

I use i3wm with Path of Exile. If I switch to another workspace or switch back to the game, or ctrl+alt+F2 to another tty (a new i3wm session), the game / other apps freeze for a long time then switches. setup_dxvk uninstall then setup_dxvk install --without-dxgi makes no difference.

h3fang avatar Oct 01 '19 11:10 h3fang

@h3fang That's unrelated to the issue.

K0bin avatar Oct 01 '19 12:10 K0bin

@K0bin I thought alt tab and switching from a workspace (fullscreen game) to another workspace (say chromium) are the same things. Sorry if they are not.

h3fang avatar Oct 01 '19 12:10 h3fang

They are not. Your problem also very much sounds like a problem somewhere in your graphics stack; DXVK itself definitely doesn't affect native Linux applications in any way.

doitsujin avatar Oct 01 '19 12:10 doitsujin

@doitsujin Sorry for the disturbance. But it does seem like what Joshua-Ashton said

This is an issue because we don't inject our own window proc to handle entering/leaving fullscreen, etc when requested as the game is spamming focus calls.

And this causes the whole xorg-server to freeze.

Other users have similar observations. https://appdb.winehq.org/objectManager.php?sClass=version&iId=25078

Switching resolutions and display mode works BUT there is a chance that during switching, it might cause the x-server to regress and ending up with an unresponsive system.

h3fang avatar Oct 01 '19 12:10 h3fang

@doitsujin

Does this work with wine's DXGI implementation?

No. @Joshua-Ashton

If you're interested in testing out the former option in D9VK

Tested, no difference.

Vogelchevalier avatar Oct 01 '19 15:10 Vogelchevalier

Yeah you might need to try that WIP commit a few times, it's hit or miss whether it works due to some race somewhere I haven't found.

🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸

misyltoad avatar Oct 01 '19 19:10 misyltoad

@doitsujin Tested with https://github.com/krh/vkcube and it freezes as well. So my problem is related to the nvidia vulkan driver (435.21). Hopefully, my next graphics card will not be nvidia ...

Really sorry for the messing up.

h3fang avatar Oct 02 '19 02:10 h3fang

i have same issue. I am on windows 10 i cant minimize DARK SOULS III and if i change it to windowed mode it means it will random crash latter,

AizerMortenort avatar Oct 05 '19 22:10 AizerMortenort

Same issue there but in ALL games that running using DXVK.

yCatDev avatar Sep 20 '20 10:09 yCatDev

@Vogelchevalier @yCatDev @AizerMortenort Friendly necro ping. Do you still have issues with latest dxvk? :slightly_smiling_face:

Blisto91 avatar Aug 06 '22 22:08 Blisto91

bump, issue still exists seems fixed in d9vk but its still present in DX11 titles which games are affected seems random, Apex works fine while im forced to either use borderless or DX9 mode in League of Legends.

laqyx avatar Nov 08 '22 12:11 laqyx

@laqyx Do you know of any d3d9 games with alt tab issues or do you only experience it in d3d11?

Blisto91 avatar Apr 04 '23 08:04 Blisto91