LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-06-2020, 11:54 AM   #1
sasha69
LQ Newbie
 
Registered: May 2020
Posts: 24

Rep: Reputation: Disabled
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.
 
Old 12-06-2020, 12:03 PM   #2
sasha69
LQ Newbie
 
Registered: May 2020
Posts: 24

Original Poster
Rep: Reputation: Disabled
I downgraded to mesa 20.2.3 and that fixed it.
 
Old 12-06-2020, 01:14 PM   #3
RadicalDreamer
Senior Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 1,816

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
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.
 
Old 12-06-2020, 01:24 PM   #4
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,699

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
Quote:
Originally Posted by RadicalDreamer View Post
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.
 
1 members found this post helpful.
Old 12-06-2020, 01:48 PM   #5
sasha69
LQ Newbie
 
Registered: May 2020
Posts: 24

Original Poster
Rep: Reputation: Disabled
Oh yeah I forgot to say I tried with vkquake 1.05.1 and still had the same issue with mesa 20.3.0. And that builds OK.
 
1 members found this post helpful.
Old 12-06-2020, 02:53 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by sasha69 View Post
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.
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?
 
Old 12-06-2020, 02:55 PM   #7
RadicalDreamer
Senior Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 1,816

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
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.
 
Old 12-06-2020, 03:21 PM   #8
sasha69
LQ Newbie
 
Registered: May 2020
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
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

Last edited by sasha69; 12-06-2020 at 03:28 PM.
 
1 members found this post helpful.
Old 12-06-2020, 03:28 PM   #9
RadicalDreamer
Senior Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 1,816

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Here is my vulkaninfo. It shows llvmpipe as GPU id = 0.
Code:
bash-5.0$ vulkaninfo | grep GPU
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.
                GPU id = 0 (llvmpipe (LLVM 11.0.0, 256 bits))
                GPU id = 1 (GeForce GTX 1070)
                GPU id = 0 (llvmpipe (LLVM 11.0.0, 256 bits))
                GPU id = 1 (GeForce GTX 1070)
                GPU id = 0 (llvmpipe (LLVM 11.0.0, 256 bits))
                GPU id = 1 (GeForce GTX 1070)
                GPU id = 0 (llvmpipe (LLVM 11.0.0, 256 bits))
                GPU id = 1 (GeForce GTX 1070)
                GPU id = 0 (llvmpipe (LLVM 11.0.0, 256 bits))
                GPU id = 1 (GeForce GTX 1070)
                GPU id = 0 (llvmpipe (LLVM 11.0.0, 256 bits))
                GPU id = 1 (GeForce GTX 1070)
GPU id : 0 (llvmpipe (LLVM 11.0.0, 256 bits)):
GPU id : 1 (GeForce GTX 1070):
GPU0:
GPU1:
        deviceType     = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
 
Old 12-06-2020, 03:33 PM   #10
sasha69
LQ Newbie
 
Registered: May 2020
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by RadicalDreamer View Post
Here is my vulkaninfo. It shows llvmpipe as GPU id = 0.
Code:
bash-5.0$ vulkaninfo | grep GPU
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.
                GPU id = 0 (llvmpipe (LLVM 11.0.0, 256 bits))
                GPU id = 1 (GeForce GTX 1070)
                GPU id = 0 (llvmpipe (LLVM 11.0.0, 256 bits))
                GPU id = 1 (GeForce GTX 1070)
                GPU id = 0 (llvmpipe (LLVM 11.0.0, 256 bits))
                GPU id = 1 (GeForce GTX 1070)
                GPU id = 0 (llvmpipe (LLVM 11.0.0, 256 bits))
                GPU id = 1 (GeForce GTX 1070)
                GPU id = 0 (llvmpipe (LLVM 11.0.0, 256 bits))
                GPU id = 1 (GeForce GTX 1070)
                GPU id = 0 (llvmpipe (LLVM 11.0.0, 256 bits))
                GPU id = 1 (GeForce GTX 1070)
GPU id : 0 (llvmpipe (LLVM 11.0.0, 256 bits)):
GPU id : 1 (GeForce GTX 1070):
GPU0:
GPU1:
        deviceType     = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
Yeah, I get the same with the newest mesa.
 
1 members found this post helpful.
Old 12-06-2020, 03:52 PM   #11
RadicalDreamer
Senior Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 1,816

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Quote:
Originally Posted by sasha69 View Post
Yeah, I get the same with the newest mesa.
My best guess is that it is choosing the first device that it sees so our video cards need to be "GPU id = 0" not "GPU id = 1."
 
Old 12-06-2020, 04:31 PM   #12
sasha69
LQ Newbie
 
Registered: May 2020
Posts: 24

Original Poster
Rep: Reputation: Disabled
this upstream bug looks like it might have something to do with it. https://gitlab.freedesktop.org/mesa/mesa/-/issues/3935
 
2 members found this post helpful.
Old 12-24-2020, 09:21 AM   #13
sasha69
LQ Newbie
 
Registered: May 2020
Posts: 24

Original Poster
Rep: Reputation: Disabled
With 20.2.3 I actually got a different problem which was glx not working at all.

I had to compile 20.2.6 myself to get both glx and vulkan working.
 
Old 01-08-2021, 10:12 PM   #14
teerl
LQ Newbie
 
Registered: Dec 2010
Distribution: Slackware64
Posts: 5

Rep: Reputation: 3
Quote:
Originally Posted by sasha69 View Post
With 20.2.3 I actually got a different problem which was glx not working at all.

I had to compile 20.2.6 myself to get both glx and vulkan working.
Would you mind sharing your SlackBuild? I'm having a heck of a time trying to get mesa to build.

Edit:

I'm running nvidia-drivers and was finally able to get vkcube to run with

Code:
VK_ICD_FILENAMES=/etc/vulkan/icd.d/nvidia_icd.json vkcube
Various settings of MESA_VK_DEVICE_SELECT and DRI_PRIME produced no effect for me.

Last edited by teerl; 01-08-2021 at 11:10 PM.
 
Old 01-09-2021, 04:00 AM   #15
walecha
Member
 
Registered: Jan 2010
Location: Malang, +62
Distribution: slackware
Posts: 174

Rep: Reputation: 42
Quote:
Originally Posted by teerl View Post
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:

https://www.linuxquestions.org/quest...ml#post6203697

Here is the output of vulkaninfo without VULKAN_DEVICE_INDEX:
Code:
[16:54:35] ~
 $ ENABLE_DEVICE_CHOOSER_LAYER=1 vulkaninfo | grep -e 'Devices: count' -e 'GPU id' | sort -u
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_lvp.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_radeon.so: wrong ELF class: ELFCLASS32
WARNING: radv is not a conformant vulkan implementation, testing use only.
ATTENTION: default value of option mesa_glthread overridden by environment.
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
MESA-INTEL: warning: Haswell Vulkan support is incomplete
        Devices: count = 3
                GPU id = 0 (AMD RADV BONAIRE (ACO))
GPU id : 0 (AMD RADV BONAIRE (ACO)):
                GPU id = 1 (llvmpipe (LLVM 11.0.0, 256 bits))
GPU id : 1 (llvmpipe (LLVM 11.0.0, 256 bits)):
                GPU id = 2 (Intel(R) HD Graphics 4600 (HSW GT2))
GPU id : 2 (Intel(R) HD Graphics 4600 (HSW GT2)):
                physicalDevices: count = 1
vulkaninfo + env VULKAN_DEVICE_INDEX=0
Code:
[16:55:59] ~
 $ ENABLE_DEVICE_CHOOSER_LAYER=1 VULKAN_DEVICE_INDEX=0 vulkaninfo | grep -e 'Devices: count' -e 'GPU id' | sort -u
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_lvp.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_radeon.so: wrong ELF class: ELFCLASS32
WARNING: radv is not a conformant vulkan implementation, testing use only.
ATTENTION: default value of option mesa_glthread overridden by environment.
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
MESA-INTEL: warning: Haswell Vulkan support is incomplete
        Devices: count = 1
                GPU id = 0 (AMD RADV BONAIRE (ACO))
GPU id : 0 (AMD RADV BONAIRE (ACO)):
                physicalDevices: count = 1
vulkaninfo + env VULKAN_DEVICE_INDEX=2
Code:
[16:58:53] ~
 $ ENABLE_DEVICE_CHOOSER_LAYER=1 VULKAN_DEVICE_INDEX=2 vulkaninfo | grep -e 'Devices: count' -e 'GPU id' | sort -u
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_lvp.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_radeon.so: wrong ELF class: ELFCLASS32
WARNING: radv is not a conformant vulkan implementation, testing use only.
ATTENTION: default value of option mesa_glthread overridden by environment.
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
MESA-INTEL: warning: Haswell Vulkan support is incomplete
        Devices: count = 1
                GPU id = 0 (Intel(R) HD Graphics 4600 (HSW GT2))
GPU id : 0 (Intel(R) HD Graphics 4600 (HSW GT2)):
                physicalDevices: count = 1
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] DOOM Eternal won't launch - amdgpu driver won't run Vulkan 1337_powerslacker Slackware 43 06-05-2020 01:51 AM
[SOLVED] Unable to run Vulkan in Slackware64-current with amdgpu ScrambledLogic Slackware 15 09-26-2018 12:32 PM
LXer: Vulkan at GDC videos now up, with Valve talking about porting Source 2 to Vulkan LXer Syndicated Linux News 0 03-19-2016 11:53 AM
LXer: Vulkan 1.0 and Vulkan SDK Announced for Linux and Windows LXer Syndicated Linux News 0 02-17-2016 02:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration