搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

PDF are often rendered unreadable, with desktop background showing through (screenshot attached)

  • 11 回覆
  • 2 有這個問題
  • 7 次檢視
  • 最近回覆由 c+ff

more options

I often run into issues with PDFs in Firefox Linux. They either appear totally blank (typically after suspend/restore), or they appear with the desktop background showing through (as in the attached screenshot).

Hard refreshing the page doesn't change anything, opening a new tab and opening the PDF again doesn't change anything, opening a new window and loading the PDF doesn't change anything.

The screenshot is with this PDF: https://www.sgsw.ch/home/strom/_jcr_content/Par/sgsw_accordion_list_1838160259/AccordionListPar/sgsw_accordion_12353/AccordionPar/sgsw_downloadlist/DownloadListPar/sgsw_download_1049323524.ocFile/2023-08-31%20Mitteilung%20Elcom%20Erh%C3%B6hung%20Elektrizit%C3%A4tspreise%20f%C3%BCr%20das%20Jahr%202024.pdf

It renders correctly in Chromium.

Firefox 126.0 using the recommended performance settings on Mint 21.3, nvidia quadro p620 using the official nvidia drivers v535.171.04-0ubuntu0.22.04.1

I often run into issues with PDFs in Firefox Linux. They either appear totally blank (typically after suspend/restore), or they appear with the desktop background showing through (as in the attached screenshot). Hard refreshing the page doesn't change anything, opening a new tab and opening the PDF again doesn't change anything, opening a new window and loading the PDF doesn't change anything. The screenshot is with this PDF: https://www.sgsw.ch/home/strom/_jcr_content/Par/sgsw_accordion_list_1838160259/AccordionListPar/sgsw_accordion_12353/AccordionPar/sgsw_downloadlist/DownloadListPar/sgsw_download_1049323524.ocFile/2023-08-31%20Mitteilung%20Elcom%20Erh%C3%B6hung%20Elektrizit%C3%A4tspreise%20f%C3%BCr%20das%20Jahr%202024.pdf It renders correctly in Chromium. Firefox 126.0 using the recommended performance settings on Mint 21.3, nvidia quadro p620 using the official nvidia drivers v535.171.04-0ubuntu0.22.04.1
附加的畫面擷圖

所有回覆 (11)

more options

What happens files from this site? https://www.irs.gov/downloads/irs-pdf

What OS? What Desktop? X11 or Wayland?

more options

Same thing.

Linux Mint 20.3 Cinnamon X11

由 c+ff 於 修改

more options

FWIW, after rebooting it's fine but as soon as a suspend/wake cycle has occured PDFs become transparent without fail.

由 c+ff 於 修改

more options

What happens in KDE?

Try downloading Firefox from Mozilla, run firefox-bin from the folder and see if you have the same issue. https://www.mozilla.org/en-US/firefox/all/#product-desktop-release

As a test, with a different drive, I would try a different OS(wink wink) or try something else on a live usb stick.

Operating System: openSUSE Tumbleweed 20240524 KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.2.0 Qt Version: 6.7.0 Kernel Version: 6.9.1-1-default (64-bit) Graphics Platform: X11 Processors: 16 × AMD Ryzen 7 5825U with Radeon Graphics Memory: 62.1 GiB of RAM Graphics Processor: AMD Radeon Graphics Manufacturer: HP Product Name: HP ProBook 455 15.6 inch G9 Notebook PC

more options

I have tried with Tumbleweed on a live USB, the problem is that it uses the nouveau driver (I think) rather than the nVIDIA one and as a result I can't put the computer to sleep to see if it also breaks displaying PDFs (it crashes and I have to reset)

由 c+ff 於 修改

more options

Roger that, sounds like you will need to install for a proper test. Did you see if KDE has the same issue? Did you try Firefox in Troubleshoot Mode? https://support.mozilla.org/en-US/kb/diagnose-firefox-issues-using-troubleshoot-mode#search104

由 jonzn4SUSE 於 修改

more options

Here are the drivers I see for Linux from nvidia for your card. I think their site has the listing backwards, but you can see which is the latest driver.

https://www.nvidia.com/Download/driverResults.aspx/226768/en-us/

New Feature Branch New Feature Branch drivers provide early adopters and bleeding edge developers access to the latest driver features before they are integrated into the Production Branches

Version: 550.90.07 Release Date: 2024.6.4 Operating System: Linux 64-bit Language: English (US) File Size: 293.33 MB

Production Branch Production Branch drivers provide ISV certification and optimal stability and performance for Unix customers. This driver is most commonly deployed at enterprises, providing support for the sustained bug fix and security updates commonly required.

Version: 545.29.02 Release Date: 2023.10.31 Operating System: Linux 64-bit Language: English (US) File Size: 309.74 MB

由 jonzn4SUSE 於 修改

more options

Also affected on this on a relatively clean install of Pop OS w/ Nvidia.

Workaround: Disable hardware acceleration (Settings -> Performance -> Disable "Use recommended performance settings" -> Disable "Use hardware acceleration when available"). Remember to restart Firefox.

OS: Pop!_OS 22.04 LTS x86_64 DE: GNOME 42.9 Firefox: 128.0.2 NVIDIA Driver Version: 555.58.02

more options

You can try to disable hardware acceleration in Firefox.

Close and restart Firefox after modifying the setting to apply changes.

more options

Solved on my machine! System is the same as my previous post (but now FF 128.0.3). Solution from this reddit comment.

Step 0: these are experimental flags that update kernel settings, use appropriate caution.

1. Edit /etc/modprobe.d/nvidia.conf, add two lines: "options nvidia-drm fbdev=1" and "options nvidia NVreg_PreserveVideoMemoryAllocations=1".

Details: The first line tells the Nvidia card to use its own Framebuffer (fb) instead of any system-provided ones, which I think helps frame-by-frame rendering of the PDF (but this is far out of my expertise). The second line tells the system to preserve all of the card's video memory during suspend, instead of only the parts it deems important -- it seems like the current drivers will drop some critical video memory which causes system buggyness after waking from suspend.

2. If you disabled hardware acceleration from the above, you should be able to safely re-enable that.

3. Reboot.

The PDF issues should be gone now. This also fixed some other misc. system instability issues I was facing (such as "sudo" taking over 10 seconds to run), incidentally.

more options

ExaltedToast said

Solved on my machine! System is the same as my previous post (but now FF 128.0.3). Solution from this reddit comment. [...]

Thank you for sharing. The affected workstation is currently in storage; I won't be able to try the fix for several months but will be sure to try as soon as I get the chance!