Help with enabling hardware gpu encoding in firefox

I’m Fedora 44 cosmic on a MacBook Pro medio 2015 (a1398) with nvidia 750m graphics card and cannot figure out how to enable hardware graphics encoding in firefox.
Right now if I try to play a video i.e. in YouTube the sounds works, but the video lags.
On the about:support page in Firefox it says: WebRender (Software)

I have tried following these guides with no success:

glxinfo | grep "profile version"
returns this output

    Max core profile version: 4.5
    Max compat profile version: 4.5
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL core profile version string: 4.5 (Core Profile) Mesa 26.0.6
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 26.0.6

There are a couple of different, but related, complications…

First is that YouTube (for various good reasons) has lately been favoring streaming videos in VP9 format.

Second, the bad news is the GeForce GT 750M was released in April 2013 before VP9, so the it doesn’t support hardware decoding.

So the combination above results in video lag no matter which web browser or media player is used.

In Firefox’s about:support page, under the Media section, hopefully the “Codec Support Information” block says that H.264 hardware decoding is available (which the 750M does support).

If so, check out the enhanced-h264ify add-on for Firefox which blocks all video codecs from YouTube except H.264.

See also: https://fedoraproject.org/wiki/Firefox_Hardware_acceleration

Even worse is that the 750M is only supported by the legacy nvidia driver version 470 which does not support wayland and only works with X11. X11 has been completely removed from both the workstation and kde editions of fedora.

There are some spins of fedora that do still support x11. If you were to install one of them, as well as enabling the proper rpmfusion repos and installed the akmod-nvidia-470xx package you can enable HW acceleration on that gpu.

Hi @computersavvy @gadget thanks for the quick response.

The problem is Firefox says it uses WebRender (software) which means it doesn’t even try to use the GPU, and under codec support information it says H264 hardware decoding/encoding unsupported.
I have an older dell xps also with NVIDIA geforce 750m but running latest pop os (also with wayland and using Nouveau driver) and her Firefox reports WebRender (so using the GPU) and H264 hardware decoding/encoding supported
So it seems like that some codec or the like is missing when running Fedora.
I will try to install POP OS on my mac to see if it behaves like on my dell.

You also must enable the codecs that are specifically omitted from the fedora packages.

Hi I have tried following the guide - I have installed all the codes and installing each of the drivers(only one driver at a time) without any luck.
I think the problem is, it does not use hardware accelerating at all, about:support on firefox says: WebRender (Software) should only says WebRender if hardware accelerating was enabled. I have tried installing pop os which has hardware acceleration enabled out of the box. So it is at least possible to have, but something is missing on Fedora.

Any good ideas?

Please show us the output of inxi -Fzxx on fedora so we may see the overall hardware and driver configs. Post that as preformatted text using the </> button on the toolbar so we can see it formatted as seen on-screen.

Also show us the output of dnf list --installed \*nvidia\* \*codec\* and dnf repolist

Thanks for the help - really appreciate it. Here is the requested output:

inxi -Fzxx:

System:
  Kernel: 7.0.10-201.fc44.x86_64 arch: x86_64 bits: 64 compiler: gcc v: 16.1.1
  Desktop: Cosmic v: N/A tk: Iced wm: Smithay X WM lm: greetd Distro: Fedora
    Linux 44 (COSMIC)
Machine:
  Type: Laptop System: Apple product: MacBookPro11,3 v: 1.0
    serial: <superuser required> Chassis: type: 10 v: Mac-2BD1B31983FE1663
    serial: <superuser required>
  Mobo: Apple model: Mac-2BD1B31983FE1663 v: MacBookPro11,3
    serial: <superuser required> Firmware: UEFI vendor: Apple v: 478.0.0.0.0
    date: 01/13/2023
Battery:
  ID-1: BAT0 charge: 39.8 Wh (55.2%) condition: 72.2/95 Wh (76%) temp: 29 C
    volts: 10.69 min: 11.26 model: SMP bq20z451 serial: N/A charging:
    status: discharging cycles: 630
CPU:
  Info: quad core model: Intel Core i7-4850HQ bits: 64 type: MT MCP
    arch: Haswell rev: 1 cache: L1: 256 KiB L2: 1024 KiB L3: 6 MiB
  Speed (MHz): avg: 800 min/max: 800/2300 cores: 1: 800 2: 800 3: 800 4: 800
    5: 800 6: 800 7: 800 8: 800 bogomips: 36717
  Flags-basic: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Crystal Well Integrated Graphics vendor: Apple driver: N/A
    arch: Gen-11 bus-ID: 00:02.0 chip-ID: 8086:0d26
  Device-2: NVIDIA GK107M [GeForce GT 750M Mac Edition] vendor: Apple
    driver: N/A arch: Kepler-2 pcie: speed: 2.5 GT/s lanes: 8 bus-ID: 01:00.0
    chip-ID: 10de:0fe9
  Display: wayland server: X.Org v: 24.1.11 with: Xwayland v: 24.1.11
    compositor: cosmic-comp driver: dri: swrast gpu: N/A display-ID: :1
    screens: 1
  Screen-1: 0 s-res: 2880x1800 s-dpi: 96
  Monitor-1: Unknown-1 res: 2880x1800 hz: 60 dpi: 96
  API: OpenGL v: 4.5 vendor: mesa v: 26.0.8 glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: llvmpipe (LLVM 22.1.5 256 bits)
    device-ID: ffffffff:ffffffff
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
  Info: Tools: api: glxinfo x11: xdriinfo, xdpyinfo, xprop, xrandr
Audio:
  Device-1: Intel Crystal Well HD Audio vendor: Apple driver: N/A
    bus-ID: 00:03.0 chip-ID: 8086:0d0c
  Device-2: Intel 8 Series/C220 Series High Definition Audio
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8c20
  Device-3: NVIDIA GK107 HDMI Audio vendor: Apple driver: snd_hda_intel
    v: kernel pcie: speed: 2.5 GT/s lanes: 8 bus-ID: 01:00.1 chip-ID: 10de:0e1b
  Device-4: Broadcom 720p FaceTime HD Camera driver: N/A pcie: speed: 5 GT/s
    lanes: 1 bus-ID: 04:00.0 chip-ID: 14e4:1570
  API: ALSA v: k7.0.10-201.fc44.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.6.6 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: Broadcom BCM4360 802.11ac Dual Band Wireless Network Adapter
    vendor: Apple driver: wl v: kernel pcie: speed: 2.5 GT/s lanes: 1
    bus-ID: 03:00.0 chip-ID: 14e4:43a0
  IF: wlp3s0 state: up mac: <filter>
Bluetooth:
  Device-1: Apple Bluetooth Host Controller driver: btusb v: 0.8 type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 bus-ID: 1-8.3:6 chip-ID: 05ac:8289
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 4.0
    lmp-v: 6
Drives:
  Local Storage: total: 465.92 GiB used: 5.92 GiB (1.3%)
  ID-1: /dev/sda vendor: Apple model: SSD SM0512F size: 465.92 GiB
    speed: 6.0 Gb/s serial: <filter> temp: 32 C
Partition:
  ID-1: / size: 463.33 GiB used: 5.27 GiB (1.1%) fs: btrfs dev: /dev/sda3
  ID-2: /boot size: 1.9 GiB used: 645.2 MiB (33.2%) fs: ext4 dev: /dev/sda2
  ID-3: /boot/efi size: 598.8 MiB used: 20 MiB (3.3%) fs: vfat
    dev: /dev/sda1
  ID-4: /home size: 463.33 GiB used: 5.27 GiB (1.1%) fs: btrfs
    dev: /dev/sda3
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 63.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB available: 15.52 GiB used: 2.97 GiB (19.2%)
  Processes: 308 Power: uptime: 3m wakeups: 0 Init: systemd v: 259
    default: graphical
  Packages: pm: rpm pkgs: N/A note: see --rpm Compilers: gcc: 16.1.1
    Shell: Bash v: 5.3.9 running-in: cosmic-term inxi: 3.3.40

dnf list --installed \*nvidia\* \*codec\*:

codec2.x86_64              1.2.0-9.fc44    82d0553a19fc4deca6acb6d08aa7f1d0
kf5-kcodecs.x86_64         5.116.0-5.fc44  fedora
kf6-kcodecs.x86_64         6.26.0-1.fc44   updates
nvidia-gpu-firmware.noarch 20260519-1.fc44 updates
pipewire-codec-aptx.x86_64 1.5.84-2.fc44   rpmfusion-free

dnf repolist:

repo id                                              repo name
fedora                                               Fedora 44 - x86_64
fedora-cisco-openh264                                Fedora 44 openh264 (From Cisco) - x86_64
rpmfusion-free                                       RPM Fusion for Fedora 44 - Free
rpmfusion-free-updates                               RPM Fusion for Fedora 44 - Free - Updates
rpmfusion-nonfree                                    RPM Fusion for Fedora 44 - Nonfree
rpmfusion-nonfree-tainted                            RPM Fusion for Fedora 44 - Nonfree tainted
rpmfusion-nonfree-updates                            RPM Fusion for Fedora 44 - Nonfree - Updates
updates                                              Fedora 44 - x86_64 - Updates

Ok, that tells me a lot.

  1. You do not have the nvidia drivers installed and those are needed to support HW acceleration on that GPU.
  2. The 470xx driver version is necessary to support that GPU. The 470 driver supports X11 but does not support wayland which you are running.
  3. The nvidia gpu does not even have the nouveau driver loaded so there are no drivers loaded for that gpu at all.
  Device-2: NVIDIA GK107M [GeForce GT 750M Mac Edition] vendor: Apple
    driver: N/A arch: Kepler-2 pcie: speed: 2.5 GT/s lanes: 8 bus-ID: 01:00.0
    chip-ID: 10de:0fe9

All this means you have one of 2 choices.

  1. accept things as they are and have no hardware acceleration.
  2. install a version of fedora that does support X11 (or enable cosmic to support X11) then install the nvidia driver version 470xx from rpmfusion to enable hardware acceleration.

There are some here who use those older macbook machines and they may be able to provide additional guidance, but the key point is that in order to have hardware acceleration the nvidia gpu must run with a proper driver to enable it.