GithubHelp home page GithubHelp logo

KWin freezing about kwin-lowlatency HOT 24 CLOSED

tildearrow avatar tildearrow commented on May 30, 2024
KWin freezing

from kwin-lowlatency.

Comments (24)

tildearrow avatar tildearrow commented on May 30, 2024 1

I probably have fixed this issue now! By just using glFinish instead of glXWaitVideoSyncSGI, we achieve a similar effect (no extra latency). May you please test the changes I just pushed to the Plasma/5.15 branch?

from kwin-lowlatency.

sanderboom avatar sanderboom commented on May 30, 2024 1

Unfortunately, with the build of yesterday, I experienced two more hangs. The compositor dialog complains that OpenGL has crashed. Is there any package I can downgrade/upgrade (mesa?) to prevent hangs at the moment? Next week I will be on-site at a client and hangs would be unfortunate. I know I can go back to stock kwin, but I rather not as your changes make the WM smoother than ever - it has positive effect on my workflow (I especially hate input lag).

from kwin-lowlatency.

sanderboom avatar sanderboom commented on May 30, 2024 1

This reddit post seems the describe the problem I had. Maybe this is a hint that the problem is not due to kwin-lowlatency but other factors (someone suggests kernel 5.1).
I will install kwin-lowlatency again and run kernel 5.0.15 and see whether I have problems. When I have my other machine at hand I can try the offscreen debug session.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on May 30, 2024 1

Linux 5.1...? I haven't upgraded to that version because in my case anything after 5.0.2 is borked (I upgraded once to 5.0.6, and next day I had filesystem corruption).

from kwin-lowlatency.

sanderboom avatar sanderboom commented on May 30, 2024

I had the same thing, but plasma packages on my system were still at 5.14. Now that I've update those to 5.15 I haven't had any freezes anymore.

from kwin-lowlatency.

An4cl3t0 avatar An4cl3t0 commented on May 30, 2024

I can reproduce the issue on Plasma 5.15.5-1

from kwin-lowlatency.

tildearrow avatar tildearrow commented on May 30, 2024

Confirmed. After checking the code, I may be able to conclude this is more of a Mesa bug in the glXWaitVideoSyncSGI function which sometimes causes the function to never return. I'll be trying the OML replacement for a while, and if it still reproduces, this isn't going to be good...

from kwin-lowlatency.

tildearrow avatar tildearrow commented on May 30, 2024

Nope, OML doesn't make a difference. I'm opening a bug in the Mesa bug tracker...

from kwin-lowlatency.

tildearrow avatar tildearrow commented on May 30, 2024

OK, so indeed Mesa 19.0 causes freezing, even on my AMD GPU. I'm going to try using the Intel swap event instead of glXWaitVideoSyncSGI, but if it doesn't work, this will be even more depressing...

from kwin-lowlatency.

sanderboom avatar sanderboom commented on May 30, 2024

Awesome! Compiling now. Yesterday and today I indeed experienced hangs on 5.15.5-1 as well. Will let you know the results!

from kwin-lowlatency.

tildearrow avatar tildearrow commented on May 30, 2024

I'm not sure which package may be able to fix the hangs. I tried downgrading X.Org and bisecting Mesa to go back to a point where in my system it no longer hangs, but neither helped.

Can you provide a backtrace at the time it does? Here are some instructions for doing so:
In an off-screen terminal (e.g. SSH):

$ cd kwin-lowlatency/build
$ QT_PLUGIN_PATH="$PWD/bin" gdb ./bin/kwin_x11

After the debugger loads:

(gdb) run --replace

Then, try getting the compositor to hang, and when it does, press Ctrl-Z in the debugger to break. Then do:

(gdb) backtrace

and copy/paste the result here.

from kwin-lowlatency.

sanderboom avatar sanderboom commented on May 30, 2024

I definitely will help, but this week is madness for work, so I reinstalled stock kwin for now :sad: Will report back when I have the opportunity!

from kwin-lowlatency.

tildearrow avatar tildearrow commented on May 30, 2024

Sure. I will be patiently waiting for a response. (sidenote: you can try openbox in the meanwhile)

(By the way, @An4cl3t0 are you still here?)

from kwin-lowlatency.

An4cl3t0 avatar An4cl3t0 commented on May 30, 2024

Yes, I'm following the report but I can't test the system until the weekend. Sorry :/

from kwin-lowlatency.

tildearrow avatar tildearrow commented on May 30, 2024

That's fine. I thought you abandoned the bug report.

from kwin-lowlatency.

lucasslima avatar lucasslima commented on May 30, 2024

Yo, Just wanted to give an Up, I'm experiencing the same issue.I haven't seen it in the last couple of days, but let me know if there's any way I can test it more precisely. I'm also on Intel Graphics.

from kwin-lowlatency.

tildearrow avatar tildearrow commented on May 30, 2024

@lucasslima Have you updated to 5.15.6? If so, and if it still reproduces, then may you provide me with a backtrace at the time of the hang? (instructions above)

from kwin-lowlatency.

light0ear avatar light0ear commented on May 30, 2024

Can confirm that it works exactly as intended on kernel 5.0.18 with nvidia 418.74 without any freezing.
5.1 introduces freezes with a standard Kwin for me. The new kwin breaks Vsync so KDE devs should definitely find a way to fix their GLX swap buffers "fix". Legacy method of forcing triple buffering used to work, even at the cost of extra latency. Now it doesn't.

@tildearrow Thanks a lot for your effort and work! Right now, it is virtually the only way to get Vsync without stuttering, when running an Nvidia GPU.

from kwin-lowlatency.

lucasslima avatar lucasslima commented on May 30, 2024

I'm on versions:

kwin 5.15.6
kernel 5.1.5-2
mesa 19.0.5-1

I'm trying to reproduce the issue as hard as possible but didn't find that issue in the last couple of days. I'll try to find a case that reliably reproduces it.

By the way, just to send a message of appreciation for the project, this thing improved my Plasma experience quite a lot!

from kwin-lowlatency.

tildearrow avatar tildearrow commented on May 30, 2024

Sure. If you do reproduce the hang while not debugging, you may still be able to attach a debugger and provide a backtrace:

$ sudo gdb -p `pgrep kwin_x11`
(gdb) backtrace

(thanks for the message!)

from kwin-lowlatency.

An4cl3t0 avatar An4cl3t0 commented on May 30, 2024

Been using for 2 days and completely stable on kwin 5.15.6 and linux 5.0.18-hardened. Thanks.

from kwin-lowlatency.

fvguilherme avatar fvguilherme commented on May 30, 2024

I am using Manjaro this kwin with:

KDE Plasma: 5.15.5
KDE Frameworks: 5.58.0
Qt: 5.12.3
Kernel: 5.1.4-1-MANJARO
NVidia 418.74-1 (MX150)

I can reproduce the bug and nothing has fix it. I found just a palliative: disable nvidia drm (options nvidia_drm modeset=1). That, however, cause some vertical tearing. So... It's tearing or hangs when using Edges. I choose the second one.

I already tried OpenGL 3.1 and 2.0 with VSync as "Never", but no success. A guy on Manjaro's official forum has solved the problem just installing kwin-lowlattency. So, I am confuse.

from kwin-lowlatency.

lucasslima avatar lucasslima commented on May 30, 2024

@fvguilherme , I assume you are using the Nvidia PRIME Sync? I had all sorts of problem with it when I was using it on my laptop with regular kwin (including absurd amounts of latency). You sure that doesn't happen on vanilla kwin?

from kwin-lowlatency.

fvguilherme avatar fvguilherme commented on May 30, 2024

yes, you're right, I am using PRIME. And yes, the issue happen here with kwin-lowlatency. I tried with kernels 5.1.x, 5.0.x and 4.19.x-LTS, OpenGL 3.1 and 2.0 with VSync as "Never". Just two things has solved the problem: disable Compositor or set nvidia_drm modeset =0.

What worked for me (as palliative) to stop the freeze:

1 - nvidia_drm modeset =0 + OpenGL
2 - nvidia_drm modeset =1 + Compositor off
3 - nvidia_drm modeset =1 + Compositor on + XRender

The number 1 decrease performance on games. I got this when executing nvidia-settings:

$ nvidia-settings 

(nvidia-settings:3373): GLib-GObject-CRITICAL **: 23:10:08.370: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
GPU at BusId 0x1 doesn't have a supported video decoder

Maybe this can be the reason why kwin-lowlatency doesn't work for me.

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.