#993308 firefox-esr: You might need to add a libpci3 dependency to ESR 91

Package:
firefox-esr
Source:
firefox-esr
Description:
Mozilla Firefox web browser - Extended Support Release (ESR)
Submitter:
darkspirit
Date:
2024-06-11 13:51:03 UTC
Severity:
important
#993308#5
Date:
2021-08-30 14:41:10 UTC
From:
To:
https://bugzilla.mozilla.org/show_bug.cgi?id=1676883 added a dependency on libPCI.
It's used to decide whether WebGL and hardware rendering are allowed.
I report this because I remember libpci3 had to be added to the Snap package: https://bugzilla.mozilla.org/show_bug.cgi?id=1703142

#993308#10
Date:
2022-02-19 14:33:49 UTC
From:
To:
I can confirm this to be an issue on Debian Bullseye with v78.15.0esr-1
already.

Would be great if the maintainer could add the libpci3 dependency for
firefox-esr on Bullseye and Bookworm.

Best regards,

Micha

#993308#15
Date:
2022-05-24 01:10:52 UTC
From:
To:
This seems to indeed be required now, but not caught by
dpkg-shlibdeps as (web searches indicate at least) it’s
dlopened.

#993308#20
Date:
2023-11-20 12:20:54 UTC
From:
To:
Hi,

I installed firefox-esr to default LXD Debian 12 bookworm cloud image run as
container via APT.

This system has just firefox-esr and no GUI desktop.  Wayland on the host system
(GNOME Wayland bookworm) is used to display graphics.

Starting firefox-esr in this system without libpci3 in this container works with
following warning displayed on console but firefox is working and I can see web
pages with it.

```

osamu@wayland:~$ firefox
[GFX1-]: glxtest: libpci missing
```

Once I installed libpci3, the above warning is gone.

So the appropriate dependency for this package is adding "Recommends: libpci3"


Normal Debian system usually have `pciutils` package (priority=standard) and it
pulls in `libpci3`.  Since I was using container, I could get real minimal
system without `libpci3`.

Osamu

#993308#23
Date:
2023-11-20 12:20:54 UTC
From:
To:
Hi,

I installed firefox-esr to default LXD Debian 12 bookworm cloud image run as
container via APT.

This system has just firefox-esr and no GUI desktop.  Wayland on the host system
(GNOME Wayland bookworm) is used to display graphics.

Starting firefox-esr in this system without libpci3 in this container works with
following warning displayed on console but firefox is working and I can see web
pages with it.

```

osamu@wayland:~$ firefox
[GFX1-]: glxtest: libpci missing
```

Once I installed libpci3, the above warning is gone.

So the appropriate dependency for this package is adding "Recommends: libpci3"


Normal Debian system usually have `pciutils` package (priority=standard) and it
pulls in `libpci3`.  Since I was using container, I could get real minimal
system without `libpci3`.

Osamu

#993308#28
Date:
2024-06-11 13:48:21 UTC
From:
To:
Adding some context:

The function which throws the warning is here:
https://searchfox.org/mozilla-central/source/toolkit/xre/glxtest/glxtest.cpp#192

RHEL added libpci as dependency:
https://bugzilla.redhat.com/show_bug.cgi?id=1955338

It was reported on BSD derivatives and Solaris, where libpci as well as
the used sysfs nodes do not exist, hence for those, the function is now
a dummy (see code):
- https://bugzilla.mozilla.org/show_bug.cgi?id=1868782
- https://misc.openbsd.narkive.com/XtvqpVLc/firefox-glxteset-libpci-missing

All the function does is storing PCI_VENDOR_ID and PCI_DEVICE_ID for the
GPU.

I could find them being used only here:
https://searchfox.org/mozilla-central/source/widget/gtk/GfxInfo.cpp#209
And there are fallback mechanisms to derive those IDs.

Checking the linked bug report in the comments of this function and the
top of glxtest.cpp: https://bugzilla.mozilla.org/show_bug.cgi?id=639842
So glxtest.cpp is only used to derive info for the Graphics section of
about:support in X11 environments, and GfxInfo.cpp is used to generate
this section.

I did a quick test on VM with X11 and Mesa drivers, and despite the fact
that this warning is thrown, the Graphics section is identical with and
without libpci, especially the "GPU #1" section does contain vendor and
device ID and names in both cases, so the fallback mechanisms work. Only
the end of the Graphics section contains and additional "Failure Log"
entry, showing "glxtest: libpci missing" as well.

So libpci3 it is definitely not suites as dependency, IMO not as
recommendation either, probably not even a suggestion. I would remove
the startup warning, show it on about:support only, and extend the
warning's text, stating that GPU vendor and device info may be
inaccurate or missing. Not sure whether its worth a patch and upstream
suggestion. I am no fans of pointless log entries above debug severity.
Currently, some users/admins are wasting time to hunt down this warning
when they face true issues with hardware acceleration or similar. And
they may waste resources (marginal only, but in principle) installing
the package, while it won't make any practical difference for hardware
acceleration, or other issues they may experience.

Best regards,

Micha