accelerated canvas (PDF viewer or Google Sheets) shows wrong content on Linux Nvidia
Categories
(Core :: Graphics: Canvas2D, defect, P2)
Tracking
()
People
(Reporter: gmx.sht, Assigned: lsalzman, NeedInfo)
References
Details
Attachments
(3 files)
|
260.61 KB,
image/png
|
Details | |
|
55.66 KB,
text/plain
|
Details | |
|
14.06 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Steps to reproduce:
I opened a pdf file in a new tab and scrolled up and down a few times.
Actual results:
Sometimes after scrolling I would see the wrong page. For example, when scrolling up to page 1, I saw page 3. Though, the selectable text was correct and didn't match the visuals (this is how I noticed the bug).
Sometimes the pages shown were from pdfs previously open in other tabs.
Expected results:
See the matching page visuals for the page number I'm on.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::PDF Viewer' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
(In reply to Calixte Denizet (:calixte) from comment #2)
:gmx.sht, could you share the pdf please ?
This seems to happen randomly to all open pdfs.
Here are some of the ones I had open:
- https://www.i.u-tokyo.ac.jp/edu/course/cs/cs_admission_guide_en_2024-7-2.pdf
- https://www.i.u-tokyo.ac.jp/edu/entra/ay25_adg_master_e.pdf
- https://www.i.u-tokyo.ac.jp/edu/course/ice/pdf/ice2025-guide-e.pdf
The issue seems to persist after clearing cache and restarting Firefox, but it's much harder to cause accidentally now.
Comment 5•1 year ago
|
||
Obviously experiencing this too!
I’ve uploaded the PDFs I had issues with on my post but it seems to just be all of them.
Comment 6•1 year ago
|
||
Could you try to reproduce your issue in Firefox nightly ?
Or if you can't, could check if it's reproducible in setting gfx.canvas.accelerated to false in about:config ?
Setting gfx.canvas.accelerated to false and refreshing the tab seems to fix it, but setting it back to true and refreshing breaks again on some pdfs.
Comment 8•1 year ago
|
||
I used Nightly for several hours yesterday and never observed the bug. I then disabled gfx.canvas.accelerated in my standard install and also did not notice the bug, but my session was shorter with this one (~10 minutes). I will continue using it and report if I observe the bug.
Comment 9•1 year ago
|
||
I'm on Wayland (Hyprland compositor) for the record, using an NVIDIA card.
| Reporter | ||
Comment 10•1 year ago
|
||
I'm using Wayland (KDE) with NVIDIA too.
Updated•1 year ago
|
Comment 11•1 year ago
|
||
We'll try to find someone who can reproduce on Linux, get this fixed.
Comment 12•1 year ago
|
||
I'm using Xorg with Nvidia and observed the same issue. Setting gfx.canvas.accelerated to false resolves it.
Comment 13•1 year ago
|
||
Could you please capture the output of your about:support to a file and attach it here?
Comment 15•1 year ago
|
||
@lsalzman: Could this be a GL_OOM or other failure to clear or initialize a buffer or texture?
One idea we had in triage: Maybe we should gfxCriticalNote when we encounter an GL error (espectially GL_OUT_OF_MEMORY)?
| Assignee | ||
Comment 16•1 year ago
|
||
I can't see anything in the support information indicating that's the case, so I don't believe that is the problem at the moment, but I can't say what is actually wrong either based on the information at hand.
Updated•1 year ago
|
Comment 17•1 year ago
|
||
:gmx.sht, with gfx.canvas.accelerated enabled and the behavior reproducing, could you please attach the output of your about:memory tab to the report when you can?
Comment 18•1 year ago
|
||
I was about to log some weird rendering bugs with hardware acceleration in Google Sheets with an accompanying screen recording, but it appears that this might be the same issue.
Google sheets also uses Canvas rendering, and the issue likewise goes away if I turn set gfx.canvas.accelerated to false.
I was going to report:
The issue only appears with hardware acceleration turned on in the preferences.
Sections of other open google sheets windows sometimes get rendered into the other google sheets windows.
Firefox appears to intermittently render old or out of place "frames" when scrolling or otherwise causing the rendered page to update.
This has the appearance that when you are scrolling in one direction, it appears to "flicker" as though abruptly scrolling to different sections, as far as I can tell this is purely visual, it isn't actually changing where it scrolled to, it is just momentarily rendering the incorrect thing.
It does feel indicative of something not being cleared when it should have been.
Updated•1 year ago
|
Comment 19•1 year ago
|
||
Lee, is there any way we can move this forward?
Comment 20•1 year ago
|
||
We should spin up an OPT build that includes MOZ_GL_DEBUG_ABORT_ON_ERROR and see if we can't get crashing and crash stacks.
| Assignee | ||
Comment 21•1 year ago
|
||
Sotaro, my suspicion is this might be some interaction between either Wayland or the Nvidia driver and RemoteTextureMap/compositing. Any ideas?
Comment 22•1 year ago
•
|
||
I had only Linux PC with Intel GPU. And I could not reproduce the problem until now.
The patch add logs. And with the STR, CanvasTranslator::PushRemoteTexture() was not called.
Instead, SourceSurfaceCanvasRecording::GetDataSurface() was called sometimes.
readback of DrawTargetWebgl might have a problem with NVIDIA GPUs.
Comment 23•1 year ago
|
||
Sotaro, can we submit your patch to try and have the OP test that build?
| Assignee | ||
Comment 24•1 year ago
|
||
In bug 1902012, we disabled hardware acceleration for PDF.js as of Firefox 129. If you use the latest version of Firefox, 129 or later, is this problem still there?
| Assignee | ||
Comment 25•1 year ago
|
||
(In reply to Bob Hood [:bhood] from comment #23)
Sotaro, can we submit your patch to try and have the OP test that build?
That patch just adds debugging logging, but doesn't do any semantic changes. So it wouldn't necessarily help the reporter test the issue. I think it would be more instructive right now to see if disabling PDF.js acceleration (which is now the default) helps the situation.
Comment 26•1 year ago
|
||
I experience quite the same issue in other web application.
For example I use HomeAssisstant and my Dashboard consists of multiple graphs that get refreshed every few seconds. And after some time the content of the graphs is jumping around in a random way. If you hover the mouse of the dashboards it really is going crazy.
You can see how it looks like here: https://www.youtube.com/watch?v=JuTBmFvTFpQ
I run Firefox on Ubuntu 24.04 with proprietary Nvidia drivers (550.107.02) on a RTX 3080 Ti.
After restarting Firefox the issue will not show for quite a time. But after some time it begins to mess up all the canvases again.
Since today I am also using Pterodactyl for running game servers which comes with a virtual terminal that shows you the game servers logs and it uses a canvas too. For me the canvas is always black. Only some times you can see some weird characters here and there.
In Chromium everything is fine. On my other computer with Ubuntu 24.04, Firefox but an AMD iGPU I never had such issues.
So my guess is that the hardware acceleration makes problems here.
Btw. while I was writing this text my HomeAssistant dashboard did not show any issues, I guess because I restarted Firefox shortly before that. I also tried enabling gfx.canvas.accelerated.debug which only showed a green square in the top right corner of nearly every canvas, but not on every one.
Comment 27•1 year ago
|
||
I've been having this issue for many months as well - I view a lot of PDFs in Firefox for classwork, and often when scrolling up and down the pages will get flipped around. I'm also seeing it grab pages from PDFs open in other tabs (!).
I'm running Firefox 130.0.1 on Arch Linux (Zen kernel) with NVIDIA 560.35.03 drivers (DKMS), on NVIDIA GeForce GTX 970.
Comment 28•1 year ago
|
||
Reporters, and anyone else who can reproduce: in comment 25, Lee noted it would be helpful to determine if disabling PDF.js hardware acceleration resolves this issue for you. Would you please test that by navigating to "about:config" and setting the pdfjs.enableHWA pref to false?
Comment 29•1 year ago
|
||
I wonder if we're not setting EGL_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV (from NV_robustness_video_memory_purge) for contexts in some cases?
Comment 30•1 year ago
•
|
||
(deleted: wrong bug)
Comment 31•1 year ago
|
||
(In reply to Brad Werth [:bradwerth] from comment #28)
Reporters, and anyone else who can reproduce: in comment 25, Lee noted it would be helpful to determine if disabling PDF.js hardware acceleration resolves this issue for you. Would you please test that by navigating to "about:config" and setting the
pdfjs.enableHWApref to false?
carschandler7, would you try to reproduce after taking the steps in comment 25?
Comment 32•1 year ago
|
||
OP, could you please disable widget.dmabuf.enabled in your about:config and see if the behavior persists? This removed the behavior for me in bug 1924578.
Comment 33•1 year ago
|
||
For reference, these are my results to various troubleshooting options so far (as of firefox 131.0.2).
I did not have a PDF test case so I did not test any PDF specific fixes, my test case was scrolling through google sheets.
Firefox defaults : Bug present
Hardware acceleration toggled off in settings : Bug not apparent
gfx.canvas.accelerated = false : Bug not apparent
widget.dmabuf.enabled = false : Bug not apparent
Comment 34•1 year ago
|
||
To me it looks like setting widget.dmabuf.enabled: false fixes ny general canvas issue. But I need to test it for the rest of the day too.
Comment 35•1 year ago
|
||
Looks like widget.dmabuf.enabled: false does not help with that issue.
| Assignee | ||
Comment 36•1 year ago
|
||
(In reply to N. Göddel from comment #35)
Looks like
widget.dmabuf.enabled: falsedoes not help with that issue.
Please make sure to restart Firefox after toggling that pref.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 38•1 year ago
|
||
(In reply to N. Göddel from comment #35)
Looks like
widget.dmabuf.enabled: falsedoes not help with that issue.
Looks like dmabuf was force-enabled in the prefs, so that would override the normal enabled pref... Workaround in bug 1924578 will bypass this.
Comment 39•1 year ago
|
||
Since the bug is closed, the stalled keyword is now meaningless.
For more information, please visit BugBot documentation.
Description
•