Chromium's minigbm uses incorrect path for loading radeonsi_dri driver.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
chromium-browser (Ubuntu) |
Fix Released
|
Medium
|
Bram Stolk |
Bug Description
[NOTE] This is for the HWACC build of chromium, from snap channel latest/
$ snap info chromium | grep installed
installed: 107.0.5304.68-hwacc (2301) 172MB -
This hwacc branch uses minigbm over the Ubuntu-supplied libgbm from Mesa origin.
(Unlike the Mesa variant, the minigbm bundled by chromium can do YUV buffers, like NV12.)
Regular builds of the chromium snap will not use minigbm, and thus not exhibit this behaviour!
Something goes wrong with the expansion of the macro DRI_DRIVER_DIR
$ strings /snap/chromium/
/usr/lib64/
DRI_DRIVER_
dlopen(
The DRI_DRIVER_DIR was not properly expanded to /usr/lib/
I've also built current HEAD of chromium source code manually, and did the same test on that, and that version is unaffected:
$ strings out/Default/chrome | grep radeonsi_
dlopen(
/usr/lib/
/usr/lib64/
A partner found this change to third_party/
//#define DRI_PATH STRINGIZE(
#define DRI_PATH "/usr/lib/
But it is better to understand why this expansion failed.
And it is possibly fixed in later chromium releases, if not, we should look how our snap building differs from the official Linux building instructions for chromium.
In any case, we should track this.
OS: Ubuntu 22.10
Package: chromium
Snap version: 107.0.5304.68-hwacc
Channel: latest/
Expectations: correctly loading driver from correct location.
Actual: using incorrect location.
I will follow up by testing this on a machine with an AMD GPU.
Related branches
- Nathan Teodosio: Approve
-
Diff: 67 lines (+42/-0)3 files modifiedbuild/chromium-patches/extra:fix-dri-loading.diff (+40/-0)
build/chromium-patches/series (+1/-0)
snapcraft.yaml (+1/-0)
- Nathan Teodosio: Needs Fixing
-
Diff: 67 lines (+42/-0)3 files modifiedbuild/chromium-patches/extra:fix-dri-loading.diff (+40/-0)
build/chromium-patches/series (+1/-0)
snapcraft.yaml (+1/-0)
- Nathan Teodosio: Needs Information
-
Diff: 43 lines (+29/-0)2 files modifiedbuild/chromium-patches/extra:885da2c:check-for-empty-define.diff (+28/-0)
build/chromium-patches/series (+1/-0)
tags: | added: kivu snap |
Changed in chromium-browser (Ubuntu): | |
assignee: | nobody → Nathan Teodosio (nteodosio) |
status: | New → In Progress |
importance: | Undecided → Medium |
Changed in chromium-browser (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in chromium-browser (Ubuntu): | |
status: | Fix Committed → Fix Released |
DRI_DRIVER_DIR is supposed to be defined in build/config/ linux/BUILD. gn, which relies on pkg-config.py output.
The commits 5e90d57 and ac530f7 in amdgpu branch[1] were meant to inspect this more closely by turning debugging statements on. The log[2] says dridriverdir is found:
line> dridriverdir= /usr/lib/ x86_64- linux-gnu/ dri x86_64- linux-gnu/ dri' x86_64- linux-gnu/ dri
Variable declaration, 'dridriverdir' has value '/usr/lib/
dridriverdir: /usr/lib/
Then I made small changes (which include a runtime DRI_PATH log statement) that shouldn't affect that output and built again, but they affected it as that output mysteriously vanishes.
[1] https:/ /code.launchpad .net/~nteodosio /chromium- browser/ +git/chromium- browser/ +ref/amdgpu /launchpadlibra rian.net/ 649525665/ buildlog_ snap_ubuntu_ focal_amd64_ chromium- amdgpu_ BUILDING. txt.gz /launchpadlibra rian.net/ 649584762/ buildlog_ snap_ubuntu_ focal_amd64_ chromium- amdgpu_ BUILDING. txt.gz
[2] https:/
[3] https:/