Firefox w/ hw_accell enabled on nvidia proprietary drivers = weird rendering on scrolling

So the problem is that when browsing certain pages, such as watching YouTube shorts, or working on Excel for Web, or simply reading some PDF, when scrolling, Firefox stars to behave weirdly.

Watching Yt shorts, when scrolling up or down for the next or previous short, between playing the video with the audio of the previous short, or the same video with the audio of the next, some other weird variation or just refusing to load the short until I refresh the page, anything can happen.
On pdf.js, pages start to be shown in what appears to be random order, sometimes showing previous random pages when scrolling down, or vice-versa, and most of the time, I have to restart Firefox to get it to work properly, until the next time it starts to behave like that again, and the cycle continues.
On Excel for Web, scrolling down shows a group of cells that were way above, and vice-versa.

I’ve been having this issue for quite a while, and I believe I’m not the only one, because I used to experience it when using Ubuntu as well.
Anecdotally, this seems to happen more frequently when I return to the tab after leaving it open for, Idk, a few minutes or longer, but it’s not always

Reading PDF example

Watching Yt shorts example

$ dnf list --installed | grep akmod-nvidia
akmod-nvidia.x86_64 3:555.58.02-1.fc40
$ firefox -v
Mozilla Firefox 128.0.3

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.10.3-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Graphics Processor: NVIDIA GeForce RTX 4090

1 Like

I get the same problem. I’d describe it as old frames flashing periodically. It’s been happening since the beginning (Fedora 40 KDE).

It happens after a while in Google Docs and Zoom web for me in Firefox. And in Chromium, it happens immediately any time I play a Vimeo video. inxi -Fzxx:

System:
  Kernel: 6.11.4-201.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.41-37.fc40
  Desktop: KDE Plasma v: 6.2.2 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
    Distro: Fedora Linux 40 (KDE Plasma)
Machine:
  Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: ROG STRIX B650-A GAMING WIFI v: Rev 1.xx
    serial: <superuser required> part-nu: SKU UEFI: American Megatrends v: 2613
    date: 04/12/2024
CPU:
  Info: 12-core model: AMD Ryzen 9 7900 bits: 64 type: MT MCP arch: Zen 4
    rev: 2 cache: L1: 768 KiB L2: 12 MiB L3: 64 MiB
  Speed (MHz): avg: 3489 min/max: 545/5482 boost: enabled cores: 1: 3489
    2: 3489 3: 3489 4: 3489 5: 3489 6: 3489 7: 3489 8: 3489 9: 3489 10: 3489
    11: 3489 12: 3489 13: 3489 14: 3489 15: 3489 16: 3489 17: 3489 18: 3489
    19: 3489 20: 3489 21: 3489 22: 3489 23: 3489 24: 3489 bogomips: 177590
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA GA106 [GeForce RTX 3060 Lite Hash Rate] vendor: ASUSTeK
    driver: nvidia v: 560.35.03 arch: Ampere pcie: speed: 16 GT/s lanes: 16
    ports: active: none off: DP-1 empty: DP-2,DP-3,HDMI-A-1 bus-ID: 01:00.0
    chip-ID: 10de:2504
  Device-2: Insta360 Link driver: snd-usb-audio,uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-2.4.1:10 chip-ID: 2e1a:4c01
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 24.1.3
    compositor: kwin_wayland driver: X: loaded: modesetting,nvidia
    alternate: fbdev,nouveau,nv,vesa gpu: nvidia,nvidia-nvswitch display-ID: 0
  Monitor-1: DP-1 model: LG (GoldStar) HDR DQHD res: 3840x1080 dpi: 81
    diag: 1244mm (49")
  API: EGL v: 1.5 platforms: device: 0 drv: nvidia device: 2 drv: swrast
    gbm: drv: nvidia surfaceless: drv: nvidia wayland: drv: nvidia x11:
    drv: nvidia inactive: device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 560.35.03
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 3060/PCIe/SSE2
    display-ID: :0.0
  API: Vulkan v: 1.3.296 surfaces: xcb,xlib,wayland device: 0
    type: discrete-gpu driver: N/A device-ID: 10de:2504 device: 1 type: cpu
    driver: N/A device-ID: 10005:0000
Audio:
  Device-1: NVIDIA GA106 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:228e
  Device-2: ASUSTek USB Audio driver: hid-generic,snd-usb-audio,usbhid
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-6:2 chip-ID: 0b05:1a52
  Device-3: Razer USA Seiren Mini driver: hid-generic,snd-usb-audio,usbhid
    type: USB rev: 1.1 speed: 12 Mb/s lanes: 1 bus-ID: 3-2.3.3:8
    chip-ID: 1532:0531
  Device-4: Insta360 Link driver: snd-usb-audio,uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-2.4.1:10 chip-ID: 2e1a:4c01
  API: ALSA v: k6.11.4-201.fc40.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.0.9 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Intel Ethernet I225-V vendor: ASUSTeK driver: igc v: kernel pcie:
    speed: 5 GT/s lanes: 1 port: N/A bus-ID: 08:00.0 chip-ID: 8086:15f3
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter
    vendor: Foxconn driver: mt7921e v: kernel pcie: speed: 5 GT/s lanes: 1
    bus-ID: 09:00.0 chip-ID: 14c3:0616
  IF: wlp9s0 state: down mac: <filter>
  IF-ID-1: docker0 state: down mac: <filter>
Bluetooth:
  Device-1: Foxconn / Hon Hai Wireless_Device driver: btusb v: 0.8 type: USB
    rev: 2.1 speed: 480 Mb/s lanes: 1 bus-ID: 1-11:5 chip-ID: 0489:e0e2
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.2
    lmp-v: 11
Drives:
  Local Storage: total: 931.51 GiB used: 446.96 GiB (48.0%)
  ID-1: /dev/nvme0n1 vendor: Kingston model: SNV2S1000G size: 931.51 GiB
    speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 41.9 C
Partition:
  ID-1: / size: 929.91 GiB used: 446.49 GiB (48.0%) fs: btrfs dev: /dev/dm-0
    mapped: luks-15748bab-5b44-4b3c-9152-51b3c40e161f
  ID-2: /boot size: 973.4 MiB used: 459 MiB (47.2%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 19 MiB (3.2%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 929.91 GiB used: 446.49 GiB (48.0%) fs: btrfs
    dev: /dev/dm-0 mapped: luks-15748bab-5b44-4b3c-9152-51b3c40e161f
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 48.1 C mobo: 35.0 C
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 32 GiB note: est. available: 31.05 GiB used: 6.15 GiB (19.8%)
  Processes: 551 Power: uptime: 46m wakeups: 0 Init: systemd v: 255
    target: graphical (5) default: graphical
  Packages: 82 pm: nix-usr pkgs: 67 pm: rpm pkgs: N/A note: see --rpm
    pm: flatpak pkgs: 15 Compilers: gcc: 14.2.1 Shell: Bash v: 5.2.26
    running-in: yakuake inxi: 3.3.36

Under about:support what’s it say under Graphics → Compositing? Ideally it should be just WebRender

Also with a video playing in a different tab, further down in about:support is Media → Codec Support Information; what’s that look like?

Mine is this with Firefox with HW-accelerated video playback usable (info copy/pastes nicely automatically):

Codec Name Software Decoding Hardware Decoding
H264 Supported Supported
VP9 Supported Supported
VP8 Supported Supported
AV1 Supported Unsupported
HEVC Unsupported Unsupported
AAC Supported Unsupported
MP3 Supported Unsupported
Opus Supported Unsupported
Vorbis Supported Unsupported
FLAC Supported Unsupported
Wave Supported Unsupported

All exactly like mine.
Problem still persists, btw.

I’ve also since switched to regular Gnome Fedora, and the problem still continues.

My Compositing is WebRenderer. However, I don’t have hardware decoding supported for any codec:

Codec Support Information
Codec Name Software Decoding Hardware Decoding
H264 Supported Unsupported
VP9 Supported Unsupported
VP8 Supported Unsupported
AV1 Supported Unsupported
HEVC Unsupported Unsupported
AAC Supported Unsupported
MP3 Supported Unsupported
Opus Supported Unsupported
Vorbis Supported Unsupported
FLAC Supported Unsupported
Wave Supported Unsupported

I’m not sure if this is purely a codec issue. The problem also exists in google docs.

Just recorded experiencing this again on Fedora 41, akmod-nvidia 565.57.01, Firefox 132 with hw_dec enabled (GitHub - elFarto/nvidia-vaapi-driver: A VA-API implemention using NVIDIA's NVDEC).
Steps: Open this spreadsheet, go browse something else, like YouTube, or something for a few minutes, then return to the spreadsheet, and try scrolling up and down.
https://youtu.be/EGuISszG-7A

Try filing a bug report against libva-nvidia-driver

Why? I mean, do we know it’s an issue with it it? After all, hw_dec is working fine, and I don’t think something like “hey, hw_accell works but is causing my spreadsheets and pdfs to show past frames and messing up Yt shorts scrolling” even makes sense.