linuxmint / pix

Image management application
GNU General Public License v2.0
214 stars 43 forks source link

MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: #206

Closed viebrix closed 10 months ago

viebrix commented 10 months ago

Distribution

Mint 21.2

Package version

pix --version also brings error; seems to be 3.0.2+victoria

Frequency

Always

Bug description

starting pix from console leads to error:

MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: radeonsi
MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: radeonsi

Source of problem could be the installation of ROCm AMDGPU 5.5 and compiling pytorch and torchvision for by RX580 I know that in most forums of linux mint you are warned to install AMD drivers. Problem is that for Stable Diffusion but also for Whisper I need ROCm and HIP to use my GPU for pytorch. My preferred solution would be if stablediffusion and torch would use the new opencl functions in the mesa driver, but they won't work on this - so I had to use ROCm.

I also installed PPA deb [signed-by=/etc/apt/keyrings/ernstp-mesarc-jammy.gpg] https://ppa.launchpadcontent.net/ernstp/mesarc/ubuntu jammy main

I have read, that steam had similar problems with AMDGPU but it seems they solved it. Is there any chance to get PIX running without uninstalling ROCm?

Steps to reproduce

Steps I did: https://github.com/viebrix/pytorch-gfx803 https://github.com/viebrix/pytorch-gfx803-for-Whisper

And added the ppa - so there were a lot of mesa driver installations in last period. I don't know what was the cause - because I used PIX last time in Sept.

Expected behavior

Previous PIX started without problems on my linux mint

Additional information

(https://github.com/ValveSoftware/steam-runtime/issues/309)

leigh123linux commented 10 months ago

Is the libgl1-mesa-dri package installed?

viebrix commented 10 months ago

Thanks for the quick response! synaptics tells me that 24.0.0~rc2+git2401181407.085612fce5e~j~mesarc4 is installed

dpkg --list | grep libgl1 
ii  libgl1:amd64                               1.4.0-1                                        amd64        Vendor neutral GL dispatch library -- legacy GL support
ii  libgl1-mesa-dev:amd64                      24.0.0~rc2+git2401181407.085612fce5e~j~mesarc4 amd64        transitional dummy package
ii  libgl1-mesa-dri:amd64                      24.0.0~rc2+git2401181407.085612fce5e~j~mesarc4 amd64        free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-glx:amd64                      24.0.0~rc2+git2401181407.085612fce5e~j~mesarc4 amd64        transitional dummy package

I tried also to install: libgl1-amdgpu-mesa-dri free implementation of the OpenGL API -- DRI modules

But afterwards I had an error that the version is not matching.

I have currently seen in last line of error is another message:

MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: swrast
Speicherzugriffsfehler (Speicherabzug geschrieben)
LIBGL_DEBUG=verbose pix
libGL: Can't open configuration file /etc/drirc: Datei oder Verzeichnis nicht gefunden.
libGL: Can't open configuration file /home/viebrix/.drirc: Datei oder Verzeichnis nicht gefunden.
using driver amdgpu for 11
libGL: Can't open configuration file /etc/drirc: Datei oder Verzeichnis nicht gefunden.
libGL: Can't open configuration file /home/viebrix/.drirc: Datei oder Verzeichnis nicht gefunden.
pci id for fd 11: 1002:67df, driver radeonsi
MESA-LOADER: failed to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: undefined symbol: amdgpu_va_get_start_addr
MESA-LOADER: failed to open \$${ORIGIN}/dri/radeonsi_dri.so: \$${ORIGIN}/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
MESA-LOADER: failed to open /usr/lib/dri/radeonsi_dri.so: /usr/lib/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: radeonsi
using driver amdgpu for 11
libGL: Can't open configuration file /etc/drirc: Datei oder Verzeichnis nicht gefunden.
libGL: Can't open configuration file /home/viebrix/.drirc: Datei oder Verzeichnis nicht gefunden.
pci id for fd 11: 1002:67df, driver radeonsi
MESA-LOADER: failed to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: undefined symbol: amdgpu_va_get_start_addr
MESA-LOADER: failed to open \$${ORIGIN}/dri/radeonsi_dri.so: \$${ORIGIN}/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
MESA-LOADER: failed to open /usr/lib/dri/radeonsi_dri.so: /usr/lib/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: radeonsi
MESA-LOADER: failed to open /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: undefined symbol: amdgpu_va_get_start_addr
MESA-LOADER: failed to open \$${ORIGIN}/dri/swrast_dri.so: \$${ORIGIN}/dri/swrast_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
MESA-LOADER: failed to open /usr/lib/dri/swrast_dri.so: /usr/lib/dri/swrast_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: swrast
libGL: Can't open configuration file /etc/drirc: Datei oder Verzeichnis nicht gefunden.
libGL: Can't open configuration file /home/viebrix/.drirc: Datei oder Verzeichnis nicht gefunden.
using driver amdgpu for 11
libGL: Can't open configuration file /etc/drirc: Datei oder Verzeichnis nicht gefunden.
libGL: Can't open configuration file /home/viebrix/.drirc: Datei oder Verzeichnis nicht gefunden.
pci id for fd 11: 1002:67df, driver radeonsi
MESA-LOADER: failed to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: undefined symbol: amdgpu_va_get_start_addr
MESA-LOADER: failed to open \$${ORIGIN}/dri/radeonsi_dri.so: \$${ORIGIN}/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
MESA-LOADER: failed to open /usr/lib/dri/radeonsi_dri.so: /usr/lib/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: radeonsi
using driver amdgpu for 11
libGL: Can't open configuration file /etc/drirc: Datei oder Verzeichnis nicht gefunden.
libGL: Can't open configuration file /home/viebrix/.drirc: Datei oder Verzeichnis nicht gefunden.
pci id for fd 11: 1002:67df, driver radeonsi
MESA-LOADER: failed to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: undefined symbol: amdgpu_va_get_start_addr
MESA-LOADER: failed to open \$${ORIGIN}/dri/radeonsi_dri.so: \$${ORIGIN}/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
MESA-LOADER: failed to open /usr/lib/dri/radeonsi_dri.so: /usr/lib/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: radeonsi
MESA-LOADER: failed to open /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: undefined symbol: amdgpu_va_get_start_addr
MESA-LOADER: failed to open \$${ORIGIN}/dri/swrast_dri.so: \$${ORIGIN}/dri/swrast_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
MESA-LOADER: failed to open /usr/lib/dri/swrast_dri.so: /usr/lib/dri/swrast_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: swrast

Those files it's searching are stored in: /usr/lib/x86_64-linux-gnu/dri and directory: /usr/lib/dri/ does not exist

tried it with LD_PRELOAD but there occours another error:

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so pix
pix: symbol lookup error: /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: undefined symbol: amdgpu_va_get_start_addr

seems to be a new function since dec. https://sourceforge.net/p/dri/mailman/message/58715473/

viebrix commented 10 months ago

Yesterday after restarting linux mint the cinnamon panel was gone and also windows maximize minimize and move did not work. I tried all the guides like delete cinnamon config - nothing helped. Then I saw that starting cinnamon from terminal - there also the mesa error happened. With luck I had 7 days of timeshift backups and 6 days ago the new mesa driver was installed. So I could go back to 19th Jan. and this worked. Cinnamon worked again and also PIX. In Updates I prevented "24.0.0 rc2+git2401181407.085612fce5e j mesarc4" to update itself again. And now I will upgrade to Mint 21.3 Thanks for your help. Conclusion: "24.0.0 rc2+git2401181407.085612fce5e~j~mesarc4" seems to destroy something with dri what special mint developments seems to crash.

Wedge009 commented 9 months ago

I am investigating a similar issue on my Ubuntu-based system where I've been using @kisak-valve's PPA for Mesa and Mesa was just updated to 24.0.

MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: radeonsi
MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: radeonsi
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  124
  Current serial number in output stream:  125

Was that your resolution (since I note this issue is closed), just to roll back to an older driver? I reinstalled the previous Mesa packages for 23.3.5 and graphics are working again.

viebrix commented 9 months ago

@Wedge009 I rolled back to a backup from 5 days with timeshift. Than I prevented the 24.0 Driver to reinstall. Since than I have no problems any more. I didn't try to reinstall this driver to check if it really was the source of problems, because the problems didn't show directly after the driver update. They happened after restart of linux mint some days afterwards. But the rollback of your driver shows me that it must have been the mesa driver. Thanks for your info!

Wedge009 commented 9 months ago

It does look like Mesa 24.0 is a common cause, thanks for confirming.