Closed Bug 1515253 Opened 5 years ago Closed 3 years ago

Corrupted window after suspend/resume on Nvidia with Webrender

Categories

(Core :: Graphics: WebRender, defect, P3)

66 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1682876
Tracking Status
firefox66 --- disabled
firefox67 --- disabled
firefox68 --- disabled
firefox69 --- disabled

People

(Reporter: mar.kolya, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Attached image shot.png
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

Use current firefox-nightly
Use laptop with Ubuntu 18.10, fully updated, latest Nvidia drivers (415.23)
Have webrender enabled
Suspend/resume my laptop


Actual results:

Firefox window comes corrupted after resume. Text is replaced with white/grey blocks. Some elements become transparent.
Usually FF recovers after minimizing/maximizing window.


Expected results:

There should be no corruption on the screen.
This is likely related to https://bugzilla.mozilla.org/show_bug.cgi?id=1492580
Blocks: wr-linux
Component: Untriaged → Graphics: WebRender
OS: Unspecified → Linux
Priority: -- → P3
Product: Firefox → Core
Hardware: Unspecified → x86_64
See Also: → 1492580, 1491196
Blocks: wr-nv-linux
No longer blocks: wr-linux

Some links about this topic:
https://github.com/elementary/gala/pull/330

The proprietary Nvidia drivers discard FBOs when the system suspends from resume (maybe on all sorts of modesets?).

https://bugzilla.gnome.org/show_bug.cgi?id=739178
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1084

See Also: → 1500520

Ubuntu 19.04, GTX 1060, fresh profile with gfx.webrender.all;true.

Attached file aboutsupport.txt

Switched to an existing about:support tab after making the screenshot and copied everything.
This failure was shown until hitting F5:

WebGL 1 Driver Renderer: WebGL creation failed: * tryNativeGL * Exhausted GL driver options.

Severity: normal → major
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true

Usually FF recovers after minimizing/maximizing window.

Also confirmed.

Severity: major → normal
See Also: → 1506017
See Also: → 1514148
See Also: → 1596577

Same issue observed after installing the nvidia proprietary driver. Ubuntu 19.10.

nvidia-driver-435
Linux 5.3.0-46-generic #38-Ubuntu SMP Fri Mar 27 17:37:05 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
firefox --version
Mozilla Firefox 75.0

This is fully consistent, after every resume from hibernation.
The firefox window shows up almost transparent, and without window controls, so I can't try the minimize/unminimize trick easily
(note to self: try winkey+alt+down_arrow to minimize, or ctrl-alt-d)

(In reply to Ari from comment #6)

Same issue observed after installing the nvidia proprietary driver. Ubuntu 19.10.

nvidia-driver-435
Linux 5.3.0-46-generic #38-Ubuntu SMP Fri Mar 27 17:37:05 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
firefox --version
Mozilla Firefox 75.0

This is fully consistent, after every resume from hibernation.
The firefox window shows up almost transparent, and without window controls, so I can't try the minimize/unminimize trick easily
(note to self: try winkey+alt+down_arrow to minimize, or ctrl-alt-d)

I used this fix mentioned in this bug report: https://bugs.archlinux.org/task/61889 and it's been working for me for about a year now.

(In reply to odzinic from comment #7)

I used this fix mentioned in this bug report: https://bugs.archlinux.org/task/61889 and it's been working for me for about a year now.

I'm not sure specific fix from that link you are referring to.

I've tried 'options nvidia NVreg_RegisterForACPIEvents=1 NVreg_EnableMSI=1' one and it doesn't seem to help.
Unfortunately I might not be able to try KDE specific ones since I'm using Mate.

Depends on: 1628685

I was seeing this as well. Notably, the effect became much worse in the past ~3 days. Previously, resizing the window was enough to get everything refreshed, so it wasn't hugely annoying. Now the missing font glyphs persist through resizes, so it's really becoming a blocker for any use on that platform (proprietary NV on Linux).

I can confirm the issue with FireFox 78.0.2 (64-bit) on Ubuntu 20.04 with an NVIDIA 1650GTX. Adding the options "NVreg_RegisterForACPIEvents=1 NVreg_EnableMSI=1" also did not help for me.

I noticed that after some browsing (incl. creating and closing tabs) all the fonts in the tab-bar get restored.

Same thing here, module option fix does not work either. Need to restart Firefox or continue to browse and it slowly readjusts itself.

ArchLinux - Linux desktop 5.7.9-arch1-1 #1 SMP PREEMPT Thu, 16 Jul 2020 19:34:49 +0000 x86_64 GNU/Linux

  • nvidia-utils 450.57-2
  • nvidia-dkms 450.57-2
  • firefox 78.0.2-1

Not that it matters, DE / WM is XFCE4 / XFWM.

Has anyone tried ESR, or upstream test releases?

Attached file about:support
I can still repro on the 2020-08-14 nightly, after resume from suspend to RAM, with Nvidia drivers 440.100.

```

I can also reproduce, with NVidia Quadro M2000M and driver version 450.66.

I have the same issue.

Starting a compositor (like picom) and killing it in an instant fixes the issue.

Can reproduce in 20 Linux distros.
Nvidia: 440,450
Kernel: 5.4,5.5,5.6,5.7,5.8
Desktop: kde,gnome,xfcm,cinnamon
Don't forget also framerate drops to 60 and scrolling will be uneasy to eyes. On Windows, app will crash instead.

It seems Firefox has parity with Chrome! ;) https://twitter.com/fasterthanlime/status/1303969675953438720
(Edit: For the moment, it's not expected to go away. It occurs with the proprietary Nvidia driver - driver version or hardware model don't seem to matter. Chrome is likewise affected.)

I can also reproduce this, using driver version 455.23.04 on Firefox 81.0.1

After RTFM at https://download.nvidia.com/XFree86/Linux-x86_64/455.28/README/powermanagement.html#SystemdConfigur74e29 and following the instructions (e.g. set NVreg_PreserveVideoMemoryAllocations=1 and sudo systemctl enable ...) I was able to restore my Firefox window successfully after resume.

(In reply to Oliver from comment #18)

After RTFM at https://download.nvidia.com/XFree86/Linux-x86_64/455.28/README/powermanagement.html#SystemdConfigur74e29 and following the instructions (e.g. set NVreg_PreserveVideoMemoryAllocations=1 and sudo systemctl enable ...) I was able to restore my Firefox window successfully after resume.

nice. yet another nvidia tweak to my growing collection. those services didn't work in manjaro (susped frozen -> hard reset), but the modprobe setting indeed stopped corrupting firefox window. still sometimes it become completely transparrent (just frame), and in that case i refresh it with kwin --replace. in my growing suspend/resume linux collection, there's also one firefox tweak: set layout.frame_rate to your target framerate. because framerate drops after resume. it is also low by default in all distros, which you initially tweak with gfx.webrender.all=true.

Just updated to 455.38 (on Linux/NV), and this appears to be fixed! Previously was happening 100%

Actually, nevermind that. Looks like WR failed to initialize, and I was running on Basic :/

See Also: 1596577
Depends on: 1682876

Even with all hacks applied, it's getting worse. After resume firefox windows are blank, and it cannot recover with kwin --replace, so i have to kill it each time. This is in OpenGL mode. In WebRender mode, I will get gray bar over half of each rendered Firefox window right after boot. Let's not forget Firefox will also drop framerate after each resume. Seems that other apps are ok.

"Trigger Device Reset" from about:support works for me, so every time I want to suspend I open about:support ans scroll to the button :)

(In reply to services+git from comment #24)

Even with all hacks applied, it's getting worse. After resume firefox windows are blank, and it cannot recover with kwin --replace, so i have to kill it each time.

Hopefully it's fixed in tomorrow's Nightly. (bug 1656361/bug 1682876)

In WebRender mode, I will get gray bar over half of each rendered Firefox window right after boot.

That's bug 1663273 and has been fixed in 85 (currently Beta). Workarounds:
Open KDE System Settings > Display & Monitor > Compositor, enable "Enable compositor on startup", logout and login back to KDE.
Other options are disabling WebRender or starting Firefox with MOZ_X11_EGL=1 environment variable.

After RTFM at https://download.nvidia.com/XFree86/Linux-x86_64/455.28/README/powermanagement.html#SystemdConfigur74e29 and following the instructions (e.g. set NVreg_PreserveVideoMemoryAllocations=1 and sudo systemctl enable ...) I was able to restore my Firefox window successfully after resume.

On ubuntu 20.04 I don't have the files referenced in /usr/share/doc/NVIDIA_GLX-1.0. In fact I don't have that folder at all. I have the nvidia-driver-455 package installed.

In Ubuntu 20.10 the files are in /usr/share/doc/nvidia-driver-455. Using those files and nvidia.NVreg_PreserveVideoMemoryAllocations=1 in the kernel command line, Firefox 84 and 85.0b4 briefly show corruption I unlock the screen, and then crash within a fraction of a second. Before I made these changes, Firefox 84 would show corruption, but never crash. (I'm using KDE with kwin, and installed 85.0b4 to avoid a separate bug where the top half of the web page view part of the window is blank.)

Given comment 18, this should be fixed in Firefox 86 by bug 1682876 since that targets the video memory device reset handling. Please reopen if you still see this with suspend/resume.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE

I am experiencing window corruption on suspend/resume and hibernate/resume with firefox 88/89. Initially on resume it looks fine then after about a minute the window goes black or shows the background in the window. Hibernation is almost instantly.

NVidia 465.24.02 with enable systemd units
KDE. doesn’t matter if using compositor or not.

(In reply to Jonathan from comment #31)

I am experiencing window corruption on suspend/resume and hibernate/resume with firefox 88/89. Initially on resume it looks fine then after about a minute the window goes black or shows the background in the window. Hibernation is almost instantly.

NVidia 465.24.02 with enable systemd units
KDE. doesn’t matter if using compositor or not.

Please ignore. After resetting profile it is resolved.

Please ignore. After resetting profile it is resolved.
wondering how could this help.. maybe you were quick to judge.
i have resume problems on 12 distros from LTS to todays rolling distro. Firefox becomes transparent, there's just frame, and framerate drops. I even changed hardware meanwhile. On windows, Firefox rather crashes, kind of prefer that way.

I tracked it down to "gfx.webrender.compositor.force-enabled" being enabled. Disabling it resolved in my case. Haven't had this re-occur since with regularly suspending and resuming daily.

I see this every time my machine resumes from sleep. I have Firefox 90 and NVIDIA 460.91.03. I have not enabled anything special - the NVIDIA sleep handling linked above, nor gfx.webrender.compositor.force-enabled, nor nvidia.NVreg_PreserveVideoMemoryAllocations=1.

The comments above (https://bugzilla.mozilla.org/show_bug.cgi?id=1515253#c30) suggest none of these should be needed since Firefox 86. Is that correct?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: