[SOLVED] vulkan using llvmpipe instead of amdgpu on slackware64-current
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
vulkan using llvmpipe instead of amdgpu on slackware64-current
At some point this was working, but now when I start vkquake it's not using my GPU and the performance is terrible. With R9 390. opengl works fine.
I know it's using amdgpu instead of radeon, this is my kernel parameters:
root=/dev/mapper/myvg-root radeon.cik_support=0 radeon.si_support=0 amdgpu.cik_support=1 amdgpu.si_support=1
and in lspci:
Code:
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii PRO [Radeon R9 290/390] (rev 80)
Subsystem: Micro-Star International Co., Ltd. [MSI] Hawaii PRO [Radeon R9 290/390]
Kernel driver in use: amdgpu
Kernel modules: radeon, amdgpu
This is what glxinfo | grep OpenGL shows:
Code:
blanc% glxinfo | grep OpenGL
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon (TM) R9 390 Series (HAWAII, DRM 3.35.0, 5.4.81-rt44, LLVM 11.0.0)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.3.0
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.3.0
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.3.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
I get these errors:
Code:
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_radeon.so: wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_intel.so: wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_lvp.so: wrong ELF class: ELFCLASS32
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
WARNING: radv is not a conformant vulkan implementation, testing use only.
It did the same with my NVIDIA card. Somehow vkquake needs to be told to use our video cards instead of llvmpipe. I suspect there could be a console command for this in vkquake.
I tried rebuilding vkquake and it failed.
Code:
gl_rmisc.c:1429:32: error: ‘VK_DYNAMIC_STATE_RANGE_SIZE’ undeclared (first use in this function); did you mean ‘VK_DYNAMIC_STATE_LINE_WIDTH’?
1429 | VkDynamicState dynamic_states[VK_DYNAMIC_STATE_RANGE_SIZE];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| VK_DYNAMIC_STATE_LINE_WIDTH
gl_rmisc.c:1429:32: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:200: gl_rmisc.o] Error 1
make: Leaving directory '/tmp/SBo/vkQuake-1.04.1/Quake'
It did the same with my NVIDIA card. Somehow vkquake needs to be told to use our video cards instead of llvmpipe. I suspect there could be a console command for this in vkquake.
I tried rebuilding vkquake and it failed.
Code:
gl_rmisc.c:1429:32: error: ‘VK_DYNAMIC_STATE_RANGE_SIZE’ undeclared (first use in this function); did you mean ‘VK_DYNAMIC_STATE_LINE_WIDTH’?
1429 | VkDynamicState dynamic_states[VK_DYNAMIC_STATE_RANGE_SIZE];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| VK_DYNAMIC_STATE_LINE_WIDTH
gl_rmisc.c:1429:32: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:200: gl_rmisc.o] Error 1
make: Leaving directory '/tmp/SBo/vkQuake-1.04.1/Quake'
I doubt rebuilding would fix the issue though.
Try building 1.05.1, I forgot to submit that to SBo. Will do it later today.
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_radeon.so: wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_intel.so: wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_lvp.so: wrong ELF class: ELFCLASS32
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
WARNING: radv is not a conformant vulkan implementation, testing use only.
Do you get these errors normally? Because those imply that it's trying to load the wrong arch (or maybe it's the right arch but wrong version). Have you verified you have the right arch installed for mesa (32bit vs 64bit)? If you are running 64bit, are you running multilib? If you are running multilib, did you upgrade the compat32 packages?
Thanks Daedra!
Here is what I get with the NVIDIA binary driver:
Code:
bash-5.0$ vkquake
Command line: ./vkquake
Found SDL version 2.0.12
Detected 8 CPUs.
Quake 1.09 (c) id Software
GLQuake 1.00 (c) id Software
FitzQuake 0.85 (c) John Fitzgibbons
FitzQuake SDL port (c) SleepwalkR, Baker
QuakeSpasm 0.93.2 (c) Ozkan Sezer, Eric Wasylishen & others
vkQuake 1.05.1 (c) Axel Gneiting & others
Host_Init
Playing registered version.
Console initialized.
UDP Initialized
Server using protocol 666 (FitzQuake)
Exe: 15:47:20 Dec 6 2020
256.0 megabyte heap
Vulkan Initialization
Using VK_KHR_get_surface_capabilities2
Using VK_KHR_get_physical_device_properties2
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
Vendor: Unknown (0x10005)
Device: llvmpipe (LLVM 11.0.0, 256 bits)
ERROR-OUT BEGIN
QUAKE ERROR: Couldn't find graphics queue
We need to tell it to use our graphics card and not the llvmpipe. I ran into the same situation with QMPlay2 but I could tell that to use my video card.
Do you get these errors normally? Because those imply that it's trying to load the wrong arch (or maybe it's the right arch but wrong version). Have you verified you have the right arch installed for mesa (32bit vs 64bit)? If you are running 64bit, are you running multilib? If you are running multilib, did you upgrade the compat32 packages?
I should clarify it's just "vulkaninfo" that gives those ELF class errors, not vkQuake. Yeah I'm running multilib, I have the compat32 package for mesa and the 64-bit one. I have everything upgraded, well except the mesa that I now downgraded.
I don't know what changed in the new mesa that would make it use llvmpipe but since I still get those errors with 20.2.3 and it works, it's maybe not related.
Oh and I only get the radv warning with mesa 20.2.3, not the lavapipe one.
I also don't get this one with 20.2.3 and 20.2.2 compat32:
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_lvp.so: wrong ELF class: ELFCLASS32
Various settings of MESA_VK_DEVICE_SELECT and DRI_PRIME produced no effect for me.
I finally got vulkan env ENABLE_DEVICE_CHOOSER_LAYER=1 VULKAN_DEVICE_INDEX=$GPU_ID and vkdevicechooser working by rebuilding vulkan-sdk with additional build option for Vulkan-ValidationLayer-sdk cmake:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.