Opening popups crashes apps on Nvidia with fractional scaling (WL_SURFACE_ERROR_INVALID_SIZE)
Affected version
NixOS 23.05
Mutter 44.2
GNOME Shell 44.2
Wayland
Hybrid AMD/Nvidia graphics laptop
Nvidia proprietary driver 530.41.03
Affected apps: nautilus 44.1, kgx 44.0, gnome-control-center 44.1, telegram-desktop 4.8.1
Bug summary
Opening menus and popups in some apps, such as Nautilus, Console, Settings and Telegram, often results in the app closing immediately. Firefox and VS Code are unaffected. The only relevant line being logged in journalctl is "WL: error in client communication". This only happens when I'm using Nvidia as my primary GPU and my monitor scaling is set to 150%. Setting it to 100% or switching to my AMD GPU stops this from happening.
After investigating online, I've tried reverting !2815 (merged) (ccing @rmader) by commenting out the wl_resource_post_error call, and it indeed has fixed the crashing, though sometimes visual artifacts appear instead (see the screenshot).
Steps to reproduce
- Boot with the proprietary Nvidia driver
- Run
gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
- Set monitor scaling to 150%
- Open the hamburger menu in Nautilus, or open the context menu a few times, or press Ctrl+L and go to /root, or right-click in Console
What happened
The app crashes
Relevant logs, screenshots, screencasts etc.
An artifact with my patch applied (supposed to be a "no permission" popup)
I'm assuming a stack trace is unnecessary.