Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 716574 - =x11-libs/libdrm-2.4.101: breaks firefox WebGL with intel i965 and iris DRI driver
Summary: =x11-libs/libdrm-2.4.101: breaks firefox WebGL with intel i965 and iris DRI d...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL: https://gitlab.freedesktop.org/mesa/d...
Whiteboard:
Keywords:
Depends on:
Blocks: 719574
  Show dependency tree
 
Reported: 2020-04-07 12:39 UTC by Guillaume Castagnino
Modified: 2020-06-14 21:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
workaround patch (paste_1139834,1.04 KB, patch)
2020-04-12 06:34 UTC, Matt Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Castagnino 2020-04-07 12:39:38 UTC
I have a Core i5-4690 with embedded intel graphic controller, using mesa i965 and having a working OpenGL environment:
$ grep 965 /var/log/Xorg.0.log
[    16.895] (II) modeset(0): [DRI2]   DRI driver: i965
[    16.898] (II) AIGLX: Loaded and initialized i965


Since the upgrade of libdrm to 2.4.101, firefox (tested with 74 and 75) webgl is broken and damn slow. For example, open Google Maps, it takes minutes to have a complete loading of the page, and it’s nearly impossible to drag the map.
Firefox outputs this in the console while loading:
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: MESA-LOADER: failed to open i915 (search paths /usr/lib64/dri)
libGL error: failed to load driver: i915


I do not know why it tries to load the i915 driver since it’s not used and even not enabled in mesa.
Downgrading to libdrm-2.4.100 fixes this, no more error message, and google maps becomes smooth again.

Chromium is not affected, only firefox.

Reproducible: Always




$ emerge --info mesa libdrm
Portage 2.3.96 (python 3.7.7-final-0, default/linux/amd64/17.1/desktop, gcc-9.3.0, glibc-2.30-r7, 5.6.2-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.6.2-gentoo-x86_64-Intel-R-_Core-TM-_i5-4690_CPU_@_3.50GHz-with-gentoo-2.7
KiB Mem:    16073936 total,   9282336 free
KiB Swap:    3580608 total,   3580608 free
Timestamp of repository gentoo: Tue, 07 Apr 2020 11:07:57 +0000
Head commit of repository gentoo: aea344213492800562f87b5f1e5760b8ab33bd97

Head commit of repository jorgicio: b37786d00e9e635a33bbaaf285fdf71b4b931a8b

Head commit of repository telred: 3be8adc4c47cff995847d258c3758f9b1a165d6f

Timestamp of repository xwing: Tue, 07 Apr 2020 11:00:06 +0000
sh bash 5.0_p16
ld GNU ld (Gentoo 2.34 p1) 2.34.0
app-shells/bash:          5.0_p16::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r2::gentoo, 3.7.7-r1::gentoo, 3.8.2-r1::gentoo
dev-util/cmake:           3.17.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.2::gentoo
sys-devel/binutils:       2.34::gentoo
sys-devel/gcc:            9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000
    sync-git-clone-extra-opts: -b master

jorgicio
    location: /var/db/repos/jorgicio
    sync-type: git
    sync-uri: https://github.com/jorgicio/jorgicio-gentoo.git
    masters: gentoo
    priority: 50

local
    location: /var/db/repos/local
    masters: gentoo
    priority: 50

telred
    location: /var/db/repos/telred
    sync-type: git
    sync-uri: https://github.com/telred/telred-overlay.git
    masters: gentoo
    priority: 50

xwing
    location: /var/db/repos/xwing
    sync-type: rsync
    sync-uri: rsync://gentoo.xwing.info/xwing-overlay
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -mtune=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -mtune=native -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildsyspkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common"
LINGUAS="fr"
MAKEOPTS="-j5"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 bash-completion branding bzip2 cairo caps cdda cdr cli colord crypt cups dbus dri dts dvb dvd dvdr elogind emboss encode exif flac fontconfig fpm gif gold gpm gtk gtkstyle iconv icu idn inotify introspection iproute2 ipv6 ithreads jpeg kdrive lcms libnotify libtirpc live llvm lz4 mad matroska minizip mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp openssl pam pango pcre pdf png policykit postproc pulseaudio qt5 rdesktop readline sasl seccomp spell split-usr ssl ssse3 startup-notification svg system-bootstrap tcpd theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vim-syntax vnc vorbis vulkan x264 xattr xcb xfce xml xpresent xv xvid zip zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux" L10N="fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="intel i965 iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

media-libs/mesa-20.0.4::gentoo was built with the following:
USE="X classic dri3 egl gallium gbm gles2 libglvnd vaapi vulkan wayland zstd -d3d9 -debug -gles1 -llvm -lm-sensors -opencl -osmesa (-selinux) -test -unwind -valgrind -vdpau -vulkan-overlay -xa -xvmc" ABI_X86="(64) -32 (-x32)" VIDEO_CARDS="i965 intel iris (-freedreno) -i915 (-lima) -nouveau (-panfrost) -r100 -r200 -r300 -r600 -radeon -radeonsi (-vc4) -virgl (-vivante) -vmware"
FEATURES="ipc-sandbox distlocks news protect-owned merge-sync strict qa-unresolved-soname-deps assume-digests ebuild-locks unknown-features-warn network-sandbox pid-sandbox sfperms binpkg-dostrip binpkg-logs collision-protect userpriv unmerge-orphans binpkg-docompress multilib-strict config-protect-if-modified userfetch sandbox fixlafiles usersync xattr unmerge-logs parallel-fetch preserve-libs buildsyspkg usersandbox"


x11-libs/libdrm-2.4.100::gentoo was built with the following:
USE="-libkms -valgrind" ABI_X86="(64) -32 (-x32)" VIDEO_CARDS="intel -amdgpu (-exynos) (-freedreno) -nouveau (-omap) -radeon (-tegra) (-vc4) (-vivante) -vmware"
Comment 1 Matt Turner gentoo-dev 2020-04-07 23:44:43 UTC
Thanks for the report. You're totally sure that libdrm-2.4.101 is to blame? Downgrading to .100 seems to have fixed it, but does upgrading back to .101 cause the problem to return?

I ask because the i965 driver doesn't even use libdrm anymore.

Also, can you give me the output of 'lspci -s 0:02 -nn'?
Comment 2 Guillaume Castagnino 2020-04-08 06:35:21 UTC
Yes, upgrading back to x11-libs/libdrm-2.4.101, and problem is back.
Of course, it may be a firefox issue too in combination with this specific version of libdrm, since everything else using opengl seems to be working.

lspci -s 0:02 -nn
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
Comment 3 Guillaume Castagnino 2020-04-08 06:50:07 UTC
By the way, I just tested on my laptop using a more recent core processor (i7-8650U), and I have exactly the same issue, trying to load the i915 dri driver which is not built (exactly the same message in firefox). So it may be easy to reproduce I suppose.

This one is not using the i965 driver, but iris:
$ grep iris /var/log/Xorg.0.log
[    15.365] (II) modeset(0): [DRI2]   DRI driver: iris
[    15.373] (II) AIGLX: Loaded and initialized iris


lspci -nn -s 0:02
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 [8086:5917] (rev 07)
Comment 4 Martin Doucha 2020-04-11 22:57:12 UTC
I can confirm the issue. The cause seems to be that the new libdrm tries to read some file in /sys/devices and gets blocked by Firefox's sandbox. Setting security.sandbox.content.level to 2 or less in Firefox is a possible (but absolutely not recommended) workaround. Here's the upstream bug for reference:
https://bugzilla.mozilla.org/show_bug.cgi?id=1623885
Comment 5 Matt Turner gentoo-dev 2020-04-12 06:33:46 UTC
Bisected to the commit in $URL.
Comment 6 Matt Turner gentoo-dev 2020-04-12 06:34:12 UTC
Created attachment 632372 [details, diff]
workaround patch
Comment 7 Larry the Git Cow gentoo-dev 2020-04-12 06:36:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c07fe4e324e970d394c4cb277d0ebec5a71dd4ed

commit c07fe4e324e970d394c4cb277d0ebec5a71dd4ed
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2020-04-12 06:35:55 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2020-04-12 06:36:40 +0000

    profiles: Mask x11-libs/libdrm-2.4.101
    
    Bug: https://bugs.gentoo.org/716574
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 profiles/package.mask | 5 +++++
 1 file changed, 5 insertions(+)
Comment 8 Sergey Ilinykh 2020-04-12 11:58:38 UTC
Are you guys sure about libdrm-2.4.101 masking?
All the versions of x11-base/xorg-server require 2.4.101
Comment 9 Matt Turner gentoo-dev 2020-04-12 17:34:58 UTC
(In reply to Sergey Ilinykh from comment #8)
> Are you guys sure about libdrm-2.4.101 masking?
> All the versions of x11-base/xorg-server require 2.4.101

xorg-server only requires >=x11-libs/libdrm-2.4.89.
Comment 10 Matt Whitlock 2020-04-13 14:21:03 UTC
www-client/chromium-81.0.4044.92 requires libdrm >=2.4.101. See Bug 717322.
Comment 11 Alessandro Di Federico 2020-04-26 12:02:03 UTC
x11-drivers/xf86-video-intel-2.99.917_p20200310 depends on x11-libs/libdrm-2.4.101 (see #719574).
Comment 12 Felipe (Fei Lee) 2020-05-16 23:02:16 UTC
(In reply to Matt Turner from comment #9)
> (In reply to Sergey Ilinykh from comment #8)
> > Are you guys sure about libdrm-2.4.101 masking?
> > All the versions of x11-base/xorg-server require 2.4.101
> 
> xorg-server only requires >=x11-libs/libdrm-2.4.89.

I just tried to emerge x11-base/xorg-server-1.20.7::gentoo, the current stable version because of a rebuild was generated and it fails on configure phase because it requires >=libdrm-2.4.101. I have to manually unmask it.
Comment 13 Matt Turner gentoo-dev 2020-05-16 23:10:32 UTC
(In reply to fsaavedr from comment #12)
> (In reply to Matt Turner from comment #9)
> > (In reply to Sergey Ilinykh from comment #8)
> > > Are you guys sure about libdrm-2.4.101 masking?
> > > All the versions of x11-base/xorg-server require 2.4.101
> > 
> > xorg-server only requires >=x11-libs/libdrm-2.4.89.
> 
> I just tried to emerge x11-base/xorg-server-1.20.7::gentoo, the current
> stable version because of a rebuild was generated and it fails on configure
> phase because it requires >=libdrm-2.4.101. I have to manually unmask it.

See https://bugs.gentoo.org/719574#c5
Comment 14 Felipe (Fei Lee) 2020-05-17 01:24:34 UTC
(In reply to Matt Turner from comment #13)
> (In reply to fsaavedr from comment #12)
> > (In reply to Matt Turner from comment #9)
> > > (In reply to Sergey Ilinykh from comment #8)
> > > > Are you guys sure about libdrm-2.4.101 masking?
> > > > All the versions of x11-base/xorg-server require 2.4.101
> > > 
> > > xorg-server only requires >=x11-libs/libdrm-2.4.89.
> > 
> > I just tried to emerge x11-base/xorg-server-1.20.7::gentoo, the current
> > stable version because of a rebuild was generated and it fails on configure
> > phase because it requires >=libdrm-2.4.101. I have to manually unmask it.
> 
> See https://bugs.gentoo.org/719574#c5

Fix it... it was mesa ;)
Comment 15 Matt Turner gentoo-dev 2020-06-14 21:17:43 UTC
Version gone from Gentoo.