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

Nicotine 3.3.0 Flickering when changing tabs #2859

Closed
puppeht opened this issue Feb 4, 2024 · 29 comments
Closed

Nicotine 3.3.0 Flickering when changing tabs #2859

puppeht opened this issue Feb 4, 2024 · 29 comments
Labels
Milestone

Comments

@puppeht
Copy link

puppeht commented Feb 4, 2024

Nicotine+ version: 3.3.0
Operating System/Distribution: Windows 10 Pro Version 10.0.19045 Build 19045

Describe the bug

The display will flicker black when changing tabs in the client, clicking buttons or opening a menu.

Expected behavior

The display won't flicker when performing these actions.

Steps to reproduce the bug

Open Nicotine client. Click on Downloads tab, display flickers.

Additional context

Screenshots, logs, stacktraces or relevant information.
https://streamable.com/j3g8dp
Video recorded on my phone as my display capture in OBS will not capture the flickering. Instead, the recording goes black.
Hardware: Ryzen 7 5800x3d, 5700XT
Flicker happens both on primary monitor (HP Omen 27q) and secondary monitor (D2719HGF)
Have tried restarting PC, repairing Nicotine+, and reinstalling to no avail.
Graphics drivers are updated to 24.1.1.

@puppeht puppeht added the bug label Feb 4, 2024
@slook
Copy link
Member

slook commented Feb 4, 2024

Does that also happen when the window is unmaximized?

@puppeht
Copy link
Author

puppeht commented Feb 4, 2024

It does not flicker while unmaximized.

@slook
Copy link
Member

slook commented Feb 4, 2024

What is GTK version in Menu > Help > About Nicotine+ ?

@puppeht
Copy link
Author

puppeht commented Feb 4, 2024

GTK version is 4.12.5

@slook
Copy link
Member

slook commented Feb 5, 2024

Why is the Windows Taskbar not visible in your video? Have you hidden it on purpose or is Nicotine+ running in some sort of native fullscreen mode?

Does your graphics drivers think that the Nicotine+ is a game?

@puppeht
Copy link
Author

puppeht commented Feb 6, 2024

The taskbar is hidden when not in use.

I do not believe my graphics drivers think it's a game.

@slook
Copy link
Member

slook commented Feb 6, 2024

Can you repeat the test with some active Search Files tabs and populated Downloads and Uploads, does the flickering still occur in this case or not?

Does the problem only exist when both of your monitors are connected, other than just with a single display?

@puppeht
Copy link
Author

puppeht commented Feb 6, 2024

The flickering still occurs with active searches and downloads.

The flickering persists regardless of monitor connections.

@slook
Copy link
Member

slook commented Feb 6, 2024

Does this flickering problem happen on other Windows machines? @matterharz @metaisfacil @DeathStalker77 @Dominiquini ?

@matterharz
Copy link

matterharz commented Feb 6, 2024

Nope. Not even with the taskbar hidden. (Windows 10)

Internal display: 1920x1080, 100% scaling
External display: 2560x1440, 125% scaling (over HDMI)

EDIT: Ha, spoke too early. I can now reliably reproduce this (on both displays) with the taskbar automatically hidden and the window maximized. However, changing tabs (by mouse or keyboard) is pretty much the only thing that doesn't make it flicker. Right-clicking a file, typing in the search bar, clicking on the menu, etc. all lead to flickering.

EDIT 2: What's more, right-clicking a file or user sometimes switches tabs, but I can't really see a pattern here.

@litemotiv
Copy link

I have similar issues with these N+ and GTK versions, which i believe may be related to the same bug and possibly #2779.

At the first N+ start, the window will often freeze, i can often trigger it directly when i press the window maximize or minimize button. If it doesn't freeze completely, the screen may shortly become black when switching tabs or window modes, as mentioned in the first post.

The screen may stay frozen until i bring up the taskmanager (via ctrl-alt-del), at which time the screen unfreezes immediately. After this has occurred, the N+ window functions normally without further issues.

This happens on a new Win 11 laptop i just installed. Also with the windows taskbar auto-hidden.

Another factor may be that the display zoom factor is set to 250% (by default) due to the resolution of the screen.

@slook
Copy link
Member

slook commented Feb 6, 2024

Thank you all. Can someone verify whether or not if the flickering only occurs when the Windows Task Bar is set to auto-hide?

@matterharz
Copy link

Yeah.

@slook
Copy link
Member

slook commented Feb 6, 2024

Another factor may be that the display zoom factor is set to 250% (by default) due to the resolution of the screen.

@puppeht What is your display scaling factor set to? Are your display resolutions both the same or different? Also, please can you isolate that the flickering is only occurring when the Windows task bar is set to audo-hide?

Does disabling Client Side Decorations (in Preferences > User Interface > Use Header Bar > Off) avoid the flickering?

@matterharz
Copy link

Does disabling Client Side Decorations (in Preferences > User Interface > Use Header Bar > Off) avoid the flickering?

It does.

@slook
Copy link
Member

slook commented Feb 6, 2024

The bug probably belongs upstream to GTK, but I can't find which one, or if this is a new bug that needs to be reported.
https://gitlab.gnome.org/GNOME/gtk/-/issues

@DeathStalker77
Copy link

I have not noticed the flickering (Win10)

@litemotiv
Copy link

litemotiv commented Feb 6, 2024

Thank you all. Can someone verify whether or not if the flickering only occurs when the Windows Task Bar is set to auto-hide?

@slook i can confirm the bug is absent when the taskbar is set to always be visible (no auto-hide).

Edit: When N+ is running normally with the taskbar visible, changing the taskbar to auto-hide instantly triggers the bug: Pressing window unmaximize and then maximize again will cause the screen to go black shortly and then resize to the desktop area as if the taskbar was still there. Then another screen flicker occurs and it resizes to the entire screen.

@mathiascode
Copy link
Member

It's probably an issue in the GPU renderer, I remember seeing some GTK issue about flickering in some cases. Since there are more issues here (someone on Windows reported that the window is invisible), and GTK devs are working on new GPU renderers, I would rather not spend time debugging this right now.

The following build forces the Cairo software renderer (same as previous Nicotine+ versions), does it work better? Scroll down for download links: https://github.com/mathiascode/nicotine-plus/actions/runs/7802021701

@litemotiv
Copy link

The following build forces the Cairo software renderer

This version works fine, the bug doesn't occur.

The screen redraw feels more responsive overall as well.

@slook
Copy link
Member

slook commented Feb 6, 2024

Then shall it be a good idea to switch the Windows builds to use Cairo software rendering for now, until the upstream GTK bug in hardware acceleration related to the GPU renderer is fixed?

@mathiascode mathiascode added this to the 3.3.1 milestone Feb 6, 2024
@mathiascode
Copy link
Member

3.3.1.dev1 now uses Cairo on Windows: https://nicotine-plus.org/doc/TESTING.html#windows

@puppeht @matterharz Could you check if the issue is fixed for you too?

@matterharz
Copy link

It's fixed for me.

@puppeht
Copy link
Author

puppeht commented Feb 7, 2024

Yes, this seems to be fixed.

@slook
Copy link
Member

slook commented Feb 7, 2024

@DeathStalker77 Are you able to verify that the switch to software rendering doesn't cause any noticeable performance regression under heavy load in the latest 3.3.1dev1 build?...
https://nicotine-plus.org/doc/TESTING.html#windows

@DeathStalker77
Copy link

DeathStalker77 commented Feb 7, 2024

Well, what an "opportune" time :D N+ 3.3.0 release just crashed on me (closed out completely while I was afk). Will DL the current build.

--- DS

@DeathStalker77
Copy link

No flicker on Win10, all updates, GTX1080i - though i am down to less than 28k files now :D (from a max of over 160k!!!)

--- DS

@slook
Copy link
Member

slook commented Feb 8, 2024

Flickering is not to be expected now, since this bug has been fixed...

Is it instantly responsive when you scroll a large list, with little delay and not any rendering artifacts?

@DeathStalker77
Copy link

Most I have currently in one list is ~5600 and no issues scrolling up & down that either manually or via scrollbar.

It will need to wait a bit before I can jack things back up to over 100k! :-D

--- DS

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

No branches or pull requests

6 participants