Comments (16)
Issue confirmed and reproduced on this Intel laptop. Now to fix it...
from kwin-lowlatency.
Can't reproduce the bug with nvidia.
I'm running some windows games with steam & proton.
I can recheck running some game in wine.
from kwin-lowlatency.
Bad news: I've been running vkQuake many times yesterday during the night in hope I can reproduce this, and it didn't reproduce anymore...
from kwin-lowlatency.
Could you check if fullscreen is enabled in wine vkquake's settings? It can run in "kind of fullscreen" when setting its resolution to screen native without having the fullscreen option actually enabled. Then it doesn't freeze when alt + tabbing.
I always use wine-tkg with the Proton fullscreen hack enabled:
https://github.com/Tk-Glitch/PKGBUILDS/tree/master/wine-tkg-git
However, I've just been able to reproduce the vkquake freeze with vanilla wine from Arch repo, as long as the fullscreen option is enabled.
from kwin-lowlatency.
I have enabled fullscreen in vkQuake from first launch.
Apparently vkQuake sets the resolution every time I Alt-Tab, even if it has the same resolution as desktop.
Maybe Heroes of the Storm reproduces more often. Can you tell me if HotS also sets the resolution when Alt-Tabbing?
from kwin-lowlatency.
I suspect this is some weird wine behavior, as I have only one resolution with one refreshrate available via xrandr, and it tries some senseless switching regardless. The Proton fullscreen hack prevents this.
from kwin-lowlatency.
This means... the issue only occurs when an application tries changing modelines? I'll try checking if this can be reproduced with a resolution-changing Linux application in a few hours (when I come back to my computer).
from kwin-lowlatency.
It seems that this is well possible, as HotS doesn't freeze when I set it to borderless mode instead of exclusive, which on Windows means that it can't change modeline.
from kwin-lowlatency.
There is a free demo for Euro Truck Simulator 2:
https://store.steampowered.com/app/227300/Euro_Truck_Simulator_2/
It offers Linux support, but Proton can be activated in its Steam game settings. It seems to trigger the issue more reliably than vkquake.
from kwin-lowlatency.
Does it do modesetting on Alt-Tab as well?
from kwin-lowlatency.
I can't really tell, as also Valve's official Proton uses its fullscreen hack and there is no variable to turn it off at runtime. I wanted to provide an example which hopefully is more reproducible than vkquake. Though I think lots of, if not all, games playable via Proton should trigger the freeze.
from kwin-lowlatency.
Despite the fullscreen hack, this issue affects Proton games, too. The issue is with exclusive fullscreen only as far as I can tell. Borderless windowed fullscreen does not have any such problems.
The fullscreen hack of Proton just redirects any game through an additional drawing surface, and instead of switching the native resolution, it will stretch the surface to your native desktop resolution. That way, games will no longer switch your Xorg resolution which could otherwise lead to all sorts of funny effects (like KDE Plasma reordering your taskbar applets and orientation, or the resolution not being reset to native when quitting the game, leaving you with a funny 800x600 resultion on a Hi DPI 4k monitor). The downside is: Stretching costs a bit of performance. When native and game resolution are identical, the fshack operates in pass-thru mode with no performance hit.
I've contributed a patch to Proton fshack which bypasses kwin compositing when the game indicates fullscreen mode. It works for borderless windowed fullscreen and exclusive fullscreen, non-fullscreen games won't bypass compositing so we don't impair rendering of desktop effects. This already reduced stuttering a lot for fullscreen games. The patch has been merged into Proton 3.16 and 4.2, not sure about older versions.
Another problem with games freezing is that they may go into some sort of "tiny render surface" mode, usually icon-sized (e.g., 32x32px), or even smaller. The rest of the game thus simply stays black or seemingly froze (because it no longer renders to the full surface). This can be fixed by a patch series by Zeb which fixes iconize/minimize/maximize in Wine. I think there's work currently going on in merging this to Proton. I successfully used that in my own Proton branch to fix the few games still having the freezing problem.
So we basically seem to have two problems resulting in seemingly freezing:
- Exclusive vs borderless windowed full screen mode (can be fixed by switching to borderless windowed mode): The game freezes (sound stops, Xorg client has to be sigkilled), there's probably some bug left in the graphics pipeline as usually also the graphics driver freezes or crashes, this can also happen when resizing the game window. I think this happens when the game should react to a Vulkan signal to recreate the swapchain, and that's not properly propagated to the game.
- Wine restores the game rendering surface to the wrong size/position upon restore from minimize, resulting in rendering to the wrong surface: The game still renders and runs but your screen isn't updated (or only some tiny area of it).
from kwin-lowlatency.
Thanks for your explanations. Though I just wanna mention again that the "seemingly freeze" issue after alt + tabbing is only there when
- kwin-lowlatency is used instead of upstream kwin
- Compositing is enabled before starting the game (no matter if the game's window later gets unredirected or not)
Wine fullscreen applications and the Proton FS hack work totally fine here in general. E.g. I can use upstream KWin as a window manager (not compositor) and Compton as a compositor with auto unredirect, then I can alt + tab as much as I want without issues.
from kwin-lowlatency.
Maybe I should take note: My observations were from using upstream kwin some months ago, most issues seem to be fixed. I'm currently considering using kwin-lowlatency but didn't make the switch yet.
from kwin-lowlatency.
Upstream KWin shows the issue as well with window thumbnailing enabled for all windows:
https://bugs.kde.org/show_bug.cgi?id=415286
So I should check out this option the next time I try this fork.
from kwin-lowlatency.
It really is that option. So it has nothing to do with this fork, closing.
from kwin-lowlatency.
Related Issues (20)
- Readme: Manjaro Stable is now on Plasma/Kwin 5.20.3-1 HOT 1
- Sometimes, compositing suddenly off when logging in. HOT 2
- Plasma 5.21 - Is that the end of this project? HOT 19
- Packaging for Debian? HOT 1
- Failed to install from AUR: ERROR: A failure occurred in build() — Arch Linux HOT 5
- v5.20.5 not market as the latest release HOT 1
- Disabling composition for full-screen applications HOT 3
- Just opening this to say that this is still smoother/lower latency for me than 5.21 HOT 3
- Does not compile HOT 16
- kwin-lowlatency breaks Input Method Panel widget on panel HOT 36
- "Enable full-screen unredirection" settings do not follow config and do not enable Apply button HOT 1
- Crashes upon exiting unredirected application D: HOT 1
- KWin does not allow setting which monitor to synchronize with HOT 10
- Compositor crashes when "abruptly and normally" closing VLC HOT 20
- Unredirection getting temporarily disabled by invisible notifications HOT 7
- Full screening an application makes things lag on other monitor. HOT 2
- Add back xrender
- Add disable compositing button HOT 5
- Building error: KF5 not found
- Is there work being done for kwin 5.24.0? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kwin-lowlatency.