Corrupted screen and sync problems on Fedora 38 + optimus setup + Wayland + external monitor with different frequency

The screen got completely messed up during a video call using Google Meet on Vivaldi while sharing one of my windows. Had to reboot to fix it. Below is a screenshot grabbed by one of my colleagues:

Also, I’ve been experiencing a couple of issues lately:

  • Frame sync errors during video playback on browsers (hardware video decoding is enabled). Doesn’t happen all the time
  • “ghost input” on browsers text fields (tested on Vivaldi, Edge, Chrome, and Firefox). Typing text makes the cursor jumps back and forth during input, which is very annoying. Also messes up text selection. It’s very frequent, but doesn’t happen all the time.

My setup is:

  • notebook with AMD iGPU + GTX 1650 dGPU
  • Fedora 38
  • kernel 6.5.5-200.fc38.x86_64
  • Wayland
  • Nvidia drivers 535.113.01
  • 144Hz internal display + 75Hz external display (HDMI)

Additional info:

UPDATE: the sync problems seem to manifest only on the external display (75Hz), plugged via HDMI which is wired to the GTX 1650.

Could it be the fact that the monitors have different frequencies (144Hz vs 75Hz)? Or that hw acceleration seems to be provided (at least on Firefox) by the AMD driver instead of Nvidia’s? Or both?

I just noticed the external monitor has “Adaptive-Sync” enabled, don’t know if this could be related somehow.

For the record: I’ve used a similar setup with a different (old) external monitor (60Hz instead of 75Hz, no adaptive-sync) for ages, with no problems at all.

The screen corruption might have a different cause, though.

I just came across this bug report, it seems to be related to the problem I am having, I will do some testing as soon as possible. If this is right, mutter could be the culprit, but I thought it could be worth mentioning here anyway. This other bug report seems to be specifically related to Nvidia cards, but maybe it is nouveau-specific.

Confirmed as a problem specific to nvidia cards as secondary GPUs, and affects both nouveau and Nvidia’s proprietary driver. This is being tracked on mutter git as #3070 and #3304 (links on the previous post). They are trying to handle this on mutter side, but there could be something to be done on the drivers as well.