GPUOpen-Drivers / AMDVLK

AMD Open Source Driver For Vulkan
MIT License
1.72k stars 161 forks source link

/usr/lib/i386-linux-gnu/amdvlk32.so: wrong ELF class #219

Closed randall-coding closed 3 months ago

randall-coding commented 3 years ago

Ubuntu 20.04, Kernel 5.8.0, 64-bit. AMD Radeon HD 7730.

Ran vulkaninfo and it said the following

ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/amdvlk32.so: cannot open shared object file: No such file or directory WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Failed to CreateInstance in ICD 0. Skipping ICD. ERROR at /build/vulkan-tools-1.2.170.0~rc2-1lunarg20.04/vulkaninfo/vulkaninfo.h:248:vkEnumeratePhysicalDevices failed with ERROR_INITIALIZATION_FAILED

I had thought since my system is 64bit I wouldn't need to use 32?

Anyway I go back to the instructions and see they changed. I try the command to build Release32 for Ubuntu 20.04

I receive an error on include openssl/opensslconf.h

In file included from /usr/include/openssl/sha.h:13, from /home/super/vulkandriver/drivers/pal/src/util/lnx/lnxHashProvider.h:36, from /home/super/vulkandriver/drivers/pal/src/util/lnx/lnxHashProvider.cpp:32: /usr/include/openssl/e_os2.h:13:11: fatal error: openssl/opensslconf.h: No such file or directory 13 | # include <openssl/opensslconf.h> | ^~~~~~~ compilation terminated. [2175/2326] Building CXX object pal/src/CMakeFiles/pal.dir/util/lnx/lnxArchiveFile.cpp.o

So I made a blank opensslconf.h file and re-ran the build command which appeared to work.

Then I copied over the amdvlk32.so file into the (newly created) /usr/lib/i386-linux-gnu/ folder and ran vulkaninfo again. New error.

ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/amdvlk32.so: wrong ELF class: ELFCLASS32 WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Failed to CreateInstance in ICD 0. Skipping ICD. ERROR at /build/vulkan-tools-1.2.170.0~rc2-1lunarg20.04/vulkaninfo/vulkaninfo.h:248:vkEnumeratePhysicalDevices failed with ERROR_INITIALIZATION_FAILED

I've re-read the instructions a few times, but not sure where I went wrong. I did skip the part about "to make AMDVLK driver work correctly on system with both AMDVLK and RADV installed" but is that optional?

Also should I have already had an /etc/vulkan folder from a previous install? I didn't have one.

randall-coding commented 3 years ago

Maybe I need to ask some fundamental questions. This driver replaces the Radeon proprietary software correct? I'm trying to use the open driver because the Radeon proprietary software is no longer supported for HD 7730 and trying to install that was breaking my machine anyway. Just want to make sure this is even possible to achieve for me.

jinjianrong commented 3 years ago

RADV is installed by default on Ubuntu 20.04, so you need to disable it or enable the AMD switchable graphics layer. HD 7730 is supposed to be supported by amdvlk but it is not well tested. BTW, you need to enable amdgpu.si_support and amdgpu.cik_support in kernel

randall-coding commented 3 years ago

Thanks.

Last night I tried looking into disabling RADV, but couldn't find any instructions on that. I found a few pages talking about changing amdgpu.si_support, which I did, and that creates a weird loop on the login screen (I try to login, and it brings me right back to the login screen). Here is how I changed my grub startup

GRUB_CMDLINE_LINUX_DEFAULT="radeon.si_support=0 radeon.cik_support=0 amdgpu.si_support=1 amdgpu.cik_support=1 amdgpu.dc=1 amdgpu.dpm=1 amdgpu.modeset=1"

Although now I've removed some components of the original amdvlk setup, so I can try adding those back to see how it works the new grub setup.

Side note: I'm able to login Ubuntu in "Wayland" mode, with the above grub settings. The problem there is when I try to render graphics that depend on Vulkan they are scrambled. However I was able to login once before normally and my graphics actually worked! Problem is after I restart my computer, I can't login anymore (infinite login loop) except for Wayland (which has scrambled grahpics).