Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flickering at 4k 144hz #1621

Open
TRPB opened this issue Nov 19, 2022 · 5 comments
Open

Flickering at 4k 144hz #1621

TRPB opened this issue Nov 19, 2022 · 5 comments
Labels

Comments

@TRPB
Copy link

TRPB commented Nov 19, 2022

Describe the bug

When running a monitor at 4k 144hz I get very regular flickering.

Video: https://youtu.be/mR3Ku8zlq1o

This doesn't happen at 60hz.

I also tried Sway, it doesn't happen there so I don't believe it's a wlroots or wayland issue, but specific to Wayfire.

I've tried disabling/enabling adaptive sync (wayfire itself doesn't appear to have an option for this but enabling it the monitor config seems to work)

Wayfire version

0.7.4-0c3621c

It looks like Sway had a similar issue in the past: swaywm/sway#5076 I wonder if Wayfire needs to implement the same fix?

@TRPB TRPB added the bug label Nov 19, 2022
@TRPB
Copy link
Author

TRPB commented Nov 20, 2022

As noted in #1397 this is fixed with WLR_DRM_NO_MODIFIERS=1 I'm not entirely sure what that does but it definitely makes the desktop environment feel less snappy. Less annoying than the flicker though.

@soreau
Copy link
Member

soreau commented Nov 20, 2022

Does it help if you try fiddling with this option?

@TRPB
Copy link
Author

TRPB commented Nov 20, 2022

interesting. Thanks! I assume that's in milliseconds? Setting it to 1 fixes it, setting it to 7 (roughly 1000/144), 1000 or -1 the flicker still exists. So it appears that (again assuming it's in milliseconds) a max_render_time lower than the time it takes the display to draw one frame fixes it.

So I'd expect 6 to fix it, it makes it a lot less frequent but still get the occasional flicker.

Does this imply it's dropping some frames then? It doesn't seem to cause a noticeable stutter, even on 0 or 1.

From the description I'd expected that lower values would cause the problem rather than resolve it. I'm curious why 0 doesn't break everything entirely or does Wayfire sensibly just use 1 if it's set to 0?

@ammen99
Copy link
Member

ammen99 commented Nov 23, 2022

interesting. Thanks! I assume that's in milliseconds? Setting it to 1 fixes it, setting it to 7 (roughly 1000/144), 1000 or -1 the flicker still exists. So it appears that (again assuming it's in milliseconds) a max_render_time lower than the time it takes the display to draw one frame fixes it.

So I'd expect 6 to fix it, it makes it a lot less frequent but still get the occasional flicker.

Does this imply it's dropping some frames then? It doesn't seem to cause a noticeable stutter, even on 0 or 1.

From the description I'd expected that lower values would cause the problem rather than resolve it. I'm curious why 0 doesn't break everything entirely or does Wayfire sensibly just use 1 if it's set to 0?

If the option is too low, you may get more latency, that's all.

@joshuataylor
Copy link

joshuataylor commented Jan 31, 2023

I was having the same issue, tweaking max_render_time solved it, cheers. I have a 165hz monitor, running at 145hz (but same with 165hz), because there is an issue where running it at 165 causes issues where the video card runs at 100%.

With sway, you can do a neat trick where you can set the global max_render_time, and a per window max_render_time. So you can have a lower one for things like your GPU accelerated terminal 🚀, and one for your browser where it's fine to have a slightly higher.

I had mine set to 6 with sway, my browser to 4, and my terminal to 1.

Maybe a feature request for a window rule would be worth looking into?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants