Bug 465115 - Firefox hangs when windows are placed in different virtual desktops while using NVIDIA-specific hardware acceleration in Firefox on Wayland
Summary: Firefox hangs when windows are placed in different virtual desktops while usi...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.26.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-01 11:00 UTC by Vishal Subramanyam
Modified: 2023-06-20 18:02 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vishal Subramanyam 2023-02-01 11:00:29 UTC
SUMMARY
Kubuntu 22.10 - Plasma 5.26.5 - If I have multiple Firefox windows, and if I place some of them in a different virtual desktop, Firefox hangs until I bring back all windows to the same virtual desktop.

STEPS TO REPRODUCE
1. Create two different virtual desktops
2. Open two Firefox windows in the same virtual desktop.
3. Move one of them to another virtual desktop by using Overview without changing your current virtual desktop.
4. Switch to the other desktop to the shifted Firefox window, you'll observe the Firefox window does not respond to mouse clicks, keyboard events, etc
5. Switch back to the original desktop and you'll observe the same with the old one.
6. Move both Firefox windows to the same virtual desktop, and they start working again. The keyboard and mouse events that were made during the hang were actually executed, the GUI didn't reflect the changes until they were brought to the same Virt. Desktop

OBSERVED RESULT
Firefox windows hang, don't respond visually to keyboard and mouse event until all of them are brought to the same virtual desktop.

EXPECTED RESULT
Firefox windows function normally even when placed in different virtual desktops.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 22.10
(available in About System)
KDE Plasma Version:  5.26.5
KDE Frameworks Version:  5.101.0
Qt Version: 5.15.6
Comment 1 Vishal Subramanyam 2023-02-04 09:42:51 UTC
Happens only in Wayland, not in X11
Comment 2 Vishal Subramanyam 2023-02-04 11:15:04 UTC
I have narrowed down this issue to NVIDIA-specific hardware acceleration in Firefox on Wayland. Happens only when I use NVIDIA as my primary GPU.
This is related to hardware acceleration. 
This issue does NOT occur in the following situations.
1. When I disable hardware acceleration in Firefox
2. When I use hardware acceleration but with the primary GPU set as Intel integrated graphics.

When I set NVIDIA as my primary GPU by using the following env variable: KWIN_DRM_DEVICES="/dev/dri/card1:/dev/dri/card0",
this issue occurs.
Comment 3 Vlad Zahorodnii 2023-02-07 08:55:51 UTC
Can't reproduce on an amd machine. This sounds like a bug in the driver. Please report this issue to NVIDIA developers.
Comment 4 Nate Graham 2023-02-11 01:23:28 UTC
Specifically, you can report this issue to the NVIDIA by either sending an email to linux-bugs@nvidia.com or making a post at https://forums.developer.nvidia.com/c/gpu-graphics/linux.

It would be helpful to the NVIDIA developers if you could run nvidia-bug-report.sh and attach the resulting file in your report. Thanks!
Comment 5 Vishal Subramanyam 2023-02-13 19:31:09 UTC
I will file a report with NVIDIA.
But I also think this bug might be affecting Xorg, not just Wayland. I'm trying to use Brave browser on Xorg, and when I have multiple Brave windows open on multiple desktops, GUI events such as scrolling, etc, are not displayed to the user immediately. I have to move the mouse around or something to get the GUI to be redrawn. This happens until I bring the Brave windows back to the same desktop.
Comment 6 Alexander Ahjolinna 2023-02-16 22:57:29 UTC
I dont have this issue with plasma 5.27 on MicroOS using nvidia RTX 3060Ti and I used Flatpak version of firefox (110) ...and yes I'm using wayland, maybe this has been fixed on the newer plasma? or maybe this affects other nvidia gpu? (espcially if you have older gpu that dont get the newer/latest drivers)

------------
system spec:

Operating System: openSUSE MicroOS 20230214
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.10-1-default (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5700G with Radeon Graphics
Memory: 15,4 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2
Comment 7 Vlad Zahorodnii 2023-02-17 10:02:24 UTC
We don't know. We haven't made changes in 5.27 that could potentially affect it.
Comment 8 Alexander Ahjolinna 2023-02-21 13:17:27 UTC
@Vishal Subramanyam did you try to run firefox with MOZ_ENABLE_WAYLAND=1 environment variable as suggested here: https://bugzilla.mozilla.org/show_bug.cgi?id=1815052#c7
Comment 9 Sam Dinner 2023-06-20 18:02:18 UTC
(In reply to Alexander Ahjolinna from comment #8)
> @Vishal Subramanyam did you try to run firefox with MOZ_ENABLE_WAYLAND=1
> environment variable as suggested here:
> https://bugzilla.mozilla.org/show_bug.cgi?id=1815052#c7

I am also experiencing this bug and it's only with MOZ_ENABLE_WAYLAND=1. I left a bug report over on Firefox's tracker: https://bugzilla.mozilla.org/show_bug.cgi?id=1815052#c8