-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Nearest/smart scale_filter flickering back and forth linear/nearest #4798
Comments
Maybe we're missing a call to |
https://www.youtube.com/watch?v=CBKAGahU8yw&feature=youtu.be --> make sure you're viewing the 4k stream on a 4k display, the flickering is a much harder to see at 1080p or less. |
Can 100% confirm this with two tiled Xwayland windows. Does not occur with just forcing GL_NEAREST in wlroots. |
Hey guys. I've borrowed some 4k hardware and been working on this for a bit but no solution yet. I'm using xterm as a test client. Using scale_filter nearest here's what I've observed:
I'm still not terribly familiar with wlroots & gles. If these observations seem interesting to you let me know and maybe I can figure out where to look. |
This patch fixed the issue for me. Why this commit is not available in the commit tree anymore? Edit: nvm, it doesn't fully fixed the issue, when I have two xwayland windows opened then the unfocused one is flickering. |
I realised as I was writing it that the patch wouldn't actually change anything, render_texture is called in 4 places, the two that were missing set_scale_filter were on things that don't require pixel scaling (window borders fi). Looks like something outside sway is resetting the filter to its linear default? |
Logging the scale filter via |
Sounds good. I'll give it a shot. |
Logging works, thanks for the direction. Still don't know where the error is, but I think I've observed it in log form:
So far I've tried logging the toplevel title/focus in It appears that the scale_filter does not apply sometimes, but I'm not sure why at the moment. I guess I'll throw more logging at it. |
After more investigation, it seems like swaywm/wlroots#1992 is an attempt at making things more clear when debugging GL texture parameters. I also have a local patch which prints a stack trace when the filter is LINEAR. |
Two changes were made: - Bind the texture before glTexParameteri - Set the scaling filter before each wlr_render_texture_with_matrix call Logging in wlroots allows to check that the scaling filter is properly set prior to rendering. Fixes: 6968fb3 ("add scale_filter output config option") Closes: swaywm#4798
Can you try #4903? |
Testing it now. |
@emersion as far as I can tell that fixes the issue completely 👌 |
@emersion Thanks a million for investigating and fixing this! Patch working as intended here! |
Two changes were made: - Bind the texture before glTexParameteri - Set the scaling filter before each wlr_render_texture_with_matrix call Logging in wlroots allows to check that the scaling filter is properly set prior to rendering. Fixes: 6968fb3 ("add scale_filter output config option") Closes: #4798
Two changes were made: - Bind the texture before glTexParameteri - Set the scaling filter before each wlr_render_texture_with_matrix call Logging in wlroots allows to check that the scaling filter is properly set prior to rendering. Fixes: 6968fb3 ("add scale_filter output config option") Closes: #4798
Sway Version:
sway: ad189d2
wlroots: 8681e4ab8a2d4c95abd34abf0e0eed3351d11bf0
Debug Log:
n/a
Configuration File:
I've been testing out the recent work to xwayland scaling filters (#4727) for the last couple of weeks.
I have found one issue. Scenario:
sway output eDP-1 pos 0 0 res 3840x2160 scale_filter nearest
, also happens with smart)When you click on app A (for instance pycharm), you can see app B changing its scaling from
nearest
tolinear
. Causes a very noticeable flickering. Sometimes it's only portions of that window that will go blurry, sometimes it's the whole screen. On Pycharm, you sometimes it's the currently selected line in unison with the cursor blinking.It's impossible to screenshot. I'll look for a way to record a vid of it.
Before running this new feature, I had simply patched wlroots to always use nearest. As I understand, this patch works in conjunction with https://github.com/swaywm/wlroots/pull/1914/files (which is the line I was patching to use NEAREST) in the understanding that the default is linear anyway. When I patched that line (eg was always set explicitly) there was no flickering at any point.
n/a
The text was updated successfully, but these errors were encountered: