Unable to access libdrm

Bug #2054887 reported by John
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Fix Released
High
Nathan Teodosio

Bug Description

Related: LP:2004532.

The chromium snap package has a bunch of graphical glitches that makes the program unusable. This appears to be caused by the snap package being unable to access the libdrm directory. Below is the output I get when launching the program. I have confirmed I have libdrm installed and the amdgpu.ids file is present on my system. Using a normal version of Chromium (not a snap) works as expected so I believe there is an issue with the snap package.

/usr/share/libdrm/amdgpu.ids: No such file or directory
[6505:6505:0224/105129.482765:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.ScreenSaver.GetActive: object_path= /org/freedesktop/ScreenSaver: org.freedesktop.DBus.Error.NotSupported: This method is not implemented

System and snap info

Chromium Snap version: latest/stable: 122.0.6261.57

Linux 6.5.0-21-generic #21~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 9 13:32:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Revision history for this message
John (johnnywu33) wrote :
John (johnnywu33)
description: updated
John (johnnywu33)
description: updated
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Looks like GPU indeed, can you confirm with --disable-gpu?

What is 'snap list|grep ^gnome' and 'snap connections chromium'?

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

This might be a bug in Snapd: LP:2055273.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

And Firefox has a work around, which I'm copying to Chromium beta. Once the fix is confirmed, will be released to other chnnaels.

Changed in chromium-browser (Ubuntu):
status: New → In Progress
assignee: nobody → Nathan Teodosio (nteodosio)
importance: Undecided → High
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Either the workaround[1] didn't work for Chromium or I managed to botch my copy of it[2], for /usr/share/libdrm is still empty in the Chromium beta snap.

[1] https://git.launchpad.net/~mozilla-snaps/firefox-snap/+git/firefox-snap/commit/?id=00059b6a9aea8e4ce5a239bd9e649f60736dd947
[2] https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap-from-source/tree/snapcraft.yaml?h=beta#n303

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Maybe it was perception error, because today I can confirm /usr/share/libdrm/amdgpu.ids is present in the beta snap. Could you please confirm the bug (or at least the error message) goes away by switching to it?

  sudo snap refresh --beta chromium

Changed in chromium-browser (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
John (johnnywu33) wrote (last edit ):

I can confirm the --disable-gpu argument made chromium work as intended. I'll give the beta a try. Thank you so much for your help and looking in to this issue!

Revision history for this message
John (johnnywu33) wrote :

I still have the issue after switching to the beta version 123.0.6312.22

Revision history for this message
John (johnnywu33) wrote :

Image of running the beta. works fine with --disable-gpu

Revision history for this message
John (johnnywu33) wrote :
Download full text (4.0 KiB)

Here is the output of the commands you asked for. Note this was after I installed the beta version

snap connections chromium
Interface Plug Slot Notes
audio-playback chromium:audio-playback :audio-playback -
audio-record chromium:audio-record :audio-record -
bluez chromium:bluez :bluez -
browser-support chromium:browser-sandbox :browser-support -
camera chromium:camera :camera -
content chromium:foo-install-cups - -
content[gnome-42-2204] chromium:gnome-42-2204 gnome-42-2204:gnome-42-2204 -
content[gtk-3-themes] chromium:gtk-3-themes gtk-common-themes:gtk-3-themes -
content[icon-themes] chromium:icon-themes gtk-common-themes:icon-themes -
content[sound-themes] chromium:sound-themes gtk-common-themes:sound-themes -
cups chromium:cups cups:cups -
desktop chromium:desktop :desktop -
desktop-legacy chromium:desktop-legacy :desktop-legacy -
gsettings chromium:gsettings :gsettings -
hardware-observe chromium:hardware-observe :hardware-observe -
home chromium:home :home -
joystick chromium:joystick :joystick -
mount-observe chromium:mount-observe - -
mpris - chromium:mpris -
network chromium:network :network -
network-bind chromium:network-bind :network-bind -
network-manager chromium:network-manager - -
opengl chromium:opengl :opengl -
password-manager-service chromium:password-manager-service - -
personal-files chromium:chromium-config :personal-files -
personal-files chromium:dot-local-share-applications :personal-files -
personal-files chromium:dot-local-share-icons :personal-files -
raw-usb chromium:raw-usb - -
removable-media chromium:removable-media :removable-media -
screen-inhibit-control chromium:screen-inhibit-control :scr...

Read more...

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

> I still have the issue after switching to the beta version 123.0.6312.22

Hum... Do you still get the error about the missing file in stderr? Can you confirm

  snap run --shell chromium
  ls -l /usr/share/libdrm

lists amdgpu.ids now?

I also built the snap with Libdrm provided by Chromium's source itself, so I'm curious if that would resolve the issue for you:

  snap refresh --channel beta/internal-libdrm chromium

> Here is the output

All is correct there indeed.

Revision history for this message
John (johnnywu33) wrote :

Command output
$ ls -l /usr/share/libdrm
total 0

$ chromium-browser
Gtk-Message: 10:23:13.367: Failed to load module "xapp-gtk3-module"
Gtk-Message: 10:23:13.367: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
[10512:10512:0309/102313.415284:ERROR:policy_logger.cc(157)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(161) Cloud management controller initialization aborted as CBCM is not enabled. Please use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build.
/usr/share/libdrm/amdgpu.ids: No such file or directory
/usr/share/libdrm/amdgpu.ids: No such file or directory
[10512:10512:0309/102313.685207:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.ScreenSaver.GetActive: object_path= /org/freedesktop/ScreenSaver: org.freedesktop.DBus.Error.NotSupported: This method is not implemented

The issue is still present, I installed the latest beta which is 123.0.6312.28. It still has the same error present about no such file or directory for amdgpu.ids. In a normal terminal the file is present

total 12
-rw-r--r-- 1 root root 10962 Aug 31 2022 amdgpu.ids

A temporary workaround is to disable hardware acceleration in the settings for the browser. This at least allows me to use Chromium for now.

Revision history for this message
Nathan Teodosio (nteodosio) wrote (last edit ): Re: [Bug 2054887] Re: Grahpical bugs caused by unable to access libdrm

I can reproduce the issue if I refresh instead of really reinstalling
the snap, so a bug in Snapd (LP:2056731).

Please try

   snap remove chromium
   snap install --beta chromium

Does the amdgpu.ids error go away now?

If that still doesn't solve the graphical bugs and you have time, it
would also be very useful whether

   snap install --channel beta/internal-libdrm chromium

works.

description: updated
Revision history for this message
John (johnnywu33) wrote : Re: Grahpical bugs caused by unable to access libdrm

Okay so doing the remove and then install made the amdgpu error go away, but now the issue is still present with the below errors

chromium-browser
Gtk-Message: 11:22:24.966: Failed to load module "xapp-gtk3-module"
Gtk-Message: 11:22:24.966: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
[8921:8921:0316/112225.039842:ERROR:policy_logger.cc(157)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(161) Cloud management controller initialization aborted as CBCM is not enabled. Please use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build.
[8921:8921:0316/112225.353691:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.ScreenSaver.GetActive: object_path= /org/freedesktop/ScreenSaver: org.freedesktop.DBus.Error.NotSupported: This method is not implemented

The following command says that "chromium is already installed
snap install --channel beta/internal-libdrm chromium
snap "chromium" is already installed, see 'snap help refresh'

I'm not sure what is going on but disabling hardware acceleration seems to be a good workaround for now.

Revision history for this message
John (johnnywu33) wrote :

I am starting to wonder if it is a bug not present in Chromium but in snap itself. I decided to try Firefox and the issue is present there too. And also disabling hardware acceleration on Firefox fixes the issue as a work around just like in Chromium.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

> the issue is still present

Then I'm marking this as fixed and restricting its scope to just the missing amdgpu.ids. The actual rendering issue is already tracked in LP:2004532.

> with the below errors

Those are expected warnings, they don't relate to the reported issue.

> The following command says that "chromium is already installed

Ah, when you already have the snap installed you use 'snap refresh ...' instead.

> I am starting to wonder if it is a bug not present in Chromium but in snap itself. I decided to try Firefox and the issue is present there too.

Thanks for your proactivity with regards to investigating this bug. The lack of amdgpu.ids in the snap was indeed caused by snap confinement, but judging by the stderr we now have all files and libraries reachable, so a system library such as Mesa could also be playing a role in the bug.

summary: - Grahpical bugs caused by unable to access libdrm
+ Unable to access libdrm
Changed in chromium-browser (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.