GithubHelp home page GithubHelp logo

Comments (34)

tildearrow avatar tildearrow commented on June 8, 2024 6

OK, so I've traced the removal commit to 996ee34.

The reason why KWin fullscreen un-redirection was removed was because it looked a lot like a hack, and didn't even work in some graphics cards.

But I'll try doing some experiments on bringing the feature back in a separate branch soon.

from kwin-lowlatency.

clapbr avatar clapbr commented on June 8, 2024 1

Did you build the right branch?
If so, is it that the compositor crashed?

(by the way, unredirection is enabled by default)

Figured it out, it was my tiling script messing it up. Tested unigine benchs and a couple of dxvk games and it's working now 🥇

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024 1

@aufkrawall Just confirmed the issue. However, it is not just restricted to Battle.net. It also reproduces with taskmgr for some reason.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024 1

It btw. also doesn't show sound volume OSD when pressing keyboard media buttons while being in HotS with unredirected compositing.

Yeah, that's a bug caused by the hacky workaround. I'll be fixing this for -2, or 5.16.3.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024 1

Hopefully done with KWin-lowlatency 5.22+ and the new unredirection code.

from kwin-lowlatency.

clapbr avatar clapbr commented on June 8, 2024

Might be worth looking into how mutter does it, I've heard it works well enough no one bothers turning compositor off in Gnome.

from kwin-lowlatency.

clapbr avatar clapbr commented on June 8, 2024

Someone on reddit shared this useful script that enables/suspend compositing based on window properties, https://gist.github.com/Sporif/8f472bc603dac7564fa12ee0a1091498 - Tried with a couple of games and seems to work.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024

I've created a new branch named "unredirect" with the changes in place. Please test and tell me if it works. Will merge if does for most users.

(note: if building and testing in-place (e.g. ./bin/kwin_x11), remember to copy <buildDir>/bin/org.kde.kwin.scenes/KWinSceneOpenGL.so to /usr/lib/qt/plugins/org.kde.kwin.scenes/KWinSceneOpenGL.so)

(also: PKGBUILD for Arch Linux with unredirect)

from kwin-lowlatency.

clapbr avatar clapbr commented on June 8, 2024

I've created a new branch named "unredirect" with the changes in place. Please test and tell me if it works. Will merge if does for most users.

(note: if building and testing in-place (e.g. ./bin/kwin_x11), remember to copy <buildDir>/bin/org.kde.kwin.scenes/KWinSceneOpenGL.so to /usr/lib/qt/plugins/org.kde.kwin.scenes/KWinSceneOpenGL.so)

Couldn't make it work, tried putting UnredirectFullscreen=true under [Compositing] in kwinrc but still no luck.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024

Did you build the right branch?
If so, is it that the compositor crashed?

(by the way, unredirection is enabled by default)

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024

I'm not merging this yet because I have noticed an issue that causes KWin to use 100% CPU time when unredirecting under specific conditions.

Edit: fixed in 51a6b5f

from kwin-lowlatency.

laloch avatar laloch commented on June 8, 2024

@clapbr : Could you please share which tiling script you use and what was the issue with unredirection of fullscreen clients? Thanks.

from kwin-lowlatency.

clapbr avatar clapbr commented on June 8, 2024

@clapbr : Could you please share which tiling script you use and what was the issue with unredirection of fullscreen clients? Thanks.

It was an old version of quarter-tiling, for some reason the screen would not unredirect with it enabled. I've just migrated to a better maintained script (https://github.com/kwin-scripts/kwin-tiling) and had no problems since.

from kwin-lowlatency.

laloch avatar laloch commented on June 8, 2024

@clapbr: Thanks for the reply. I asked, because I'm one of the maintainers of kwin-tiling, so I wanted to know whether it was problem with our script or not.

from kwin-lowlatency.

Sporif avatar Sporif commented on June 8, 2024

Unredirection seems to work well on native games, proton games and games launched directly from wine. But strangely it doesn't work for games started from a non-native launcher like battle.net or origin. For example if I start Overwatch directly it works, but from battle.net it doesn't.

Edit: Ok this just seems very inconsistent, alt-tabbing out and back in is enough to stop unredirection form working in certain games.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024

Can you please make a list of games that don't unredirect well? I've tested with RetroArch, Xonotic and StepMania (under both AMD and NVIDIA) and seems to work in my side, even after doing alt-tab (proof is that the "Show FPS" graph disappears when unredirecting and under NVIDIA the draw mode changes from blit to flip).

(also, may you run xwininfo on the Overwatch fullscreen window as soon as unredirect stops working?)

from kwin-lowlatency.

Sporif avatar Sporif commented on June 8, 2024

I think the issue is latte-dock. xwininfo was showing Override Redirect State: yes even after Alt-tabbing. But the nvidia API/Gsync indicators were showing flipping and Gsync being disabled. I was out of ideas, tried closing latte-dock and what do you know, it went back to flipping and Gsync started working. So I thought since it happens after Alt-tabbing maybe it's the transparency of latte-dock that is the cause, and it looks like that's the case. Disabling the "hide background when not needed" setting in latte-dock has seemingly caused the issue to vanish.

Edit: Still occurs with cs:go, but restarting latte-dock fixes it. Very strange.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024

OK so I'm beginning to reproduce the latte-dock issues with unredirect...

Edit: Actually not latte-dock issues, but seems like calfjackhost prevents unredirect from working...

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024

I've merged the unredirect branch now. KWin-lowlatency 5.15.5 going to be released in a few hours.

(I'm still leaving this issue open as there are some issues to fix for later versions)

from kwin-lowlatency.

aufkrawall avatar aufkrawall commented on June 8, 2024

@tildearrow
Thanks for your efforts, vsync of KWin is now finally working well.

Fullscreen unredirection generally works for me with Mesa RX 580, but it stops to do so when the Battle.net client is running in Wine. This then also applies to native Linux programs like vkquake, they only get correctly unredirected when Battle.net is not running in the background (no matter if minimized or in Plasma's tray).

from kwin-lowlatency.

aufkrawall avatar aufkrawall commented on June 8, 2024

One more issue: Wine fullscreen application windows can't be opened again after alt + tabbing to the desktop, they stay black then.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024

Apparently both calfjackhost and taskmgr create an invisible 32x32 window which serves as a simulated "tray" on GNOME, which interferes with unredirect. I'm working on a fix (although sort of a hack) to this problem.

Edit: The Battle.net client does the same as well.

from kwin-lowlatency.

aufkrawall avatar aufkrawall commented on June 8, 2024

@tildearrow Thanks for your continued efforts. Unfortunately, 09f8890 doesn't do the trick for me. When Battle.net launcher is started, unredirect is still turned off and Heroes of the Storm window doesn't recover after alt + tab by its windows just staying black.

Edit: The HotS window staying black is unrelated to unredirect, I suppose I should open a new ticket for it.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024

Thanks for the feedback. Can you test again and provide the output of kwin_x11 when unredirect doesn't work? (especially the no. this: lines (if they don't appear try going back to 09f8890 and try again))

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024

When unredirection is enabled, every time you switch to a full-screen application that is busy it will display a black screen until the application repaints, but in your case the application isn't busy...

from kwin-lowlatency.

aufkrawall avatar aufkrawall commented on June 8, 2024

Good news: Unredirect seems to work fine now with Battle.net client and 5.16.2 (for whatever reason). 🎉

Just the Wine black window issue remains, which also occurs without unredirect (but not with mainline kwin). It btw. also doesn't show sound volume OSD when pressing keyboard media buttons while being in HotS with unredirected compositing.
Dummy question: How do I get KWin to verbosity? When I start it via kwin_x11 --replace, there is no output when starting HotS.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024

Dummy question: How do I get KWin to verbosity? When I start it via kwin_x11 --replace, there is no output when starting HotS.

By rolling back to commit 09f8890 and launching KWin via:

cd build
QT_PLUGIN_PATH="$PWD/bin" ./bin/kwin_x11 --replace

Then you'll be able to see the "yes", " yes via hack" and "no. this:" debug messages I added on that commit.

Just the Wine black window issue remains, which also occurs without unredirect (but not with mainline kwin).

OK, thank you for telling me. This should be moved to a new issue.

from kwin-lowlatency.

aufkrawall avatar aufkrawall commented on June 8, 2024

Ehh, my mistake: I overlooked that you use git checkout in PKGBUILD. I've changed it to 09f8890 and of course it continued to work this time. Sorry!

Well, but now to the black screen issue.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024

That's OK. If unredirection stops working at some point, please provide the no. this: output lines from KWin.

from kwin-lowlatency.

Sporif avatar Sporif commented on June 8, 2024

Unredirection seems to work very well now. I've tested it for a few days and not once has Gsync been disabled.

from kwin-lowlatency.

aufkrawall avatar aufkrawall commented on June 8, 2024

It indeed works very well here with Nvidia and latest software versions, I couldn't make it fail so far.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on June 8, 2024

Totally breaks in osu! (through Wine) for unknown reasons. It used to work but not anymore.

from kwin-lowlatency.

2X3 avatar 2X3 commented on June 8, 2024

How to turn on unredirection in version 5.20? Is it activated using the variable in kwinrc?

from kwin-lowlatency.

aufkrawall avatar aufkrawall commented on June 8, 2024

@tildearrow There were some adjustments to make direct scanout work better with Wine: https://invent.kde.org/plasma/kwin/-/commit/7cc95d931b6d79e5b57361f8fcfa51aa806124a7 https://invent.kde.org/plasma/kwin/-/commit/7a937fc7af71cce6928fa5680adba30dff1bd298

Perhaps this can be similarly implemented for unredirection on Xorg to make it more reliable?

from kwin-lowlatency.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.