Secondary monitor blinks intermitently on GTX 1650 when Firefox or Chrome have hw acceleration enabled

I am experiencing some weird monitor issues. I have an Acer Nitro AN515-44 notebook, with a AMD Renoir dGPU and a GTX 1650 iGPU (TU117M), running driver 525.85.05 from RPMFusion driver on Fedora 37. I have an external monitor plugged on the HDMI port.

If I maximize Firefox or Chrome on the secondary display, after a short while it starts blinking, with the whole screen going dark (only the secondary screen, the primary remains ok), and “flashing” (briefly coming back) on every mouse input. The weird thing is that if I don’t maximize the browser windows, the blinking stops. I know this sounds crazy, but after suffering a lot with it, and trying to find the culprits, so far this is the only thing that seems to make sense. It is worth noticing that the browsers can be opened on the secondary monitor, just not maximized. They can however be maximized on the primary display, with no noticeable issues.

Any tips on what can be going on, or how I can gather further info?

EDIT: additional info:

  1. Monitors use different frequencies: internal is 1920x1080 @ 144Hz, external is 1920x1080 @ 60Hz
  2. The problem doesn’t start right away, but once it is triggered, it happens on every mouse move on the secondary display
  3. One trigger is resuming from suspend

EDIT 2: Disabling hardware acceleration both on Firefox and Chrome seems to workaround this issue. But I was hoping there could be a more specific way of dealing with this, since it doesn’t seem to manifest when windows are fullscreen.

1 Like

Attaching nvidia-bug-report.log.gzand rewriting the title to comply with bug report instructions.

nvidia-bug-report.log.gz (88.5 KB)

Any app with hardware acceleration enabled will trigger the problem if maximized to fullscreen on the secondary monitor. AFAICS it happens only on Wayland, X11 seems to be fine.

The question is which hardware accel is used. Do you run the browsers in native wayland mode or within Xwayland? If using Xwayland, do you use render offload to the nvidia gpu? Please install nvidia-smi, this might make your nvidia-bug-report.log more meaningful.
You can use about:gpu in the browsers to get some more info about the accel and hw used.

Thanks for joining in @generix . I am traveling right now, so I won’t be able to answer all of your questions. Firefox’s about:support page shows Window Protocol wayland, does it mean it is running in Wayland native mode?

One odd thing is that it doesn’t recognize NVIDIA’s GPU. GPU #1 is set to active, and its description shows

AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.49, 6.1.11-200.fc37.x86_64)

However GPU #2 appears as inactive.

I will be away for a couple of days, once I return I will resume this investigation. Thanks again for your help!

Since the browser is running on native Wayland, the nvidia gpu is only a dumb output, there’s currently no render offload with it. So the hw accel is always happening on the amd gpu. thus, from the perspective of the nvidia driver, it shouldn’t matter if hw accel is turned on or off, it doesn’t know about it. I guess you should open a bug report with gnome-shell, maybe that can shed some light on this.

Hi @generix , I’m back from my trip. Some more info: based on this thread on AskFedora, I tried to force firefox to use Nvidia for offload rendering, but it didn’t work (it doesn’t detect the Nvidia GPU):

glxgears -info | grep  GL_RENDERER

Crash Annotation GraphicsCriticalError: |[0][GFX1-]: No GPUs detected via PCI (t=0.265207) [GFX1-]: No GPUs detected via PCI
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: No GPUs detected via PCI (t=0.265207) |[1][GFX1-]: glxtest: process failed (received signal 11) (t=0.265231

But maybe this should be handled on a dedicated thread?

As for your suggestion, I will try to file a bug report for gnome-shell to see if we make any progress there. Thanks!

I guess there already is one:

Good call ;-) In my case, I can definitely say that it is not triggered by simply maximizing any window, it must be an app that uses hw accel (I’ve tested so far with Firefox, Chrome, and Telegram). Right now I have a couple of apps maximized (Slack, Virtualbox) with no problem at all. As soon as I maximize any of the apps I mentioned (with hw accel turned on), the blinking starts happening immediately – and goes away as soon as the window is restored.

Thanks for the pointer, I will input some info there as well. Cheers!

I guess un-accelerated maximized windows are not unredirected by the wayland compositor (which wouldn’t make sense anyway).

The bug has been acknowledged, and moved to mutter. I guess we are closer to reaching the right people. Fingers crossed! ;-)

BTW the proposed gnome-shell extension seems to work around the bug AFAICS.

@generix one final question: regarding the fact that Firefox doesn’t detect Nvidia GPU when forced to do so, should I open another discussion specifically for that? Or is this a known problem?

Try also setting MOZ_ENABLE_WAYLAND=0 to force use of Xwayland.

I had the same problem in my Eluktronicks MAG-15 with an Nvidia 2070 with any application that uses hardware acceleration in the second monitor. Reading your remarks about the frequencies gave me the idea of lowering the main monitor frequency to 60(or less). That was the fix for me.

The frequency loss in the main monitor isn’t a big deal for me, and I can live with that until the problem is fixed.

Thanks @generix and @augustoicaro , but the gnome-shell extension seems to be a viable workaround so far, with minimal (none?) side effects, so I guess I’ll just stick to it until a proper solution comes out. I will keep an eye on how the mutter bug evolves, and report back here if there is any significant improvement.