Bug 103427 - VK_ERROR_INITIALIZATION_FAILED with 280x: vkEnumeratePhysicalDevices(vk->inst, &num, NULL): VK_ERROR_INITIALIZATION_FAILED
Summary: VK_ERROR_INITIALIZATION_FAILED with 280x: vkEnumeratePhysicalDevices(vk->inst...
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/radeon (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-23 18:21 UTC by Cris
Modified: 2017-10-24 16:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Cris 2017-10-23 18:21:55 UTC
Tested with mesa 17.2.3, but have also tested with git master and the results were the same.

https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/2152

All the information and logs you might need or want are there^. Apart from that, feel free to make any requests.

Relevant in case you refuse to click on the link above:
The error doesn't occur until until the application calls vkEnumeratePhysicalDevices. At that point, the driver is returning the VK_ERROR_INITIALIZATION_FAILED error. It appears that the first call into the driver is actually working just fine, but the loader calls vkEnumeratePhysicalDevices twice (once to get the count and once to get the content) and only the second call fails. The loader just passes this error up to the user.
Comment 1 Bas Nieuwenhuizen 2017-10-23 18:35:52 UTC
So according to the glxinfo log, you're still using the radeon kernel driver.(See the DRM version bit in the renderer string? 2.x is radeon, 3.x is amdgpu). radv doesn't support the radeon driver currently.
Comment 2 Cris 2017-10-23 18:37:32 UTC
(In reply to Bas Nieuwenhuizen from comment #1)
> So according to the glxinfo log, you're still using the radeon kernel
> driver.(See the DRM version bit in the renderer string? 2.x is radeon, 3.x
> is amdgpu). radv doesn't support the radeon driver currently.

Oh yeah, I blacklisted radeon (and checked with lsmod | grep radeon) and it still didn't work.
Comment 3 Emil Velikov 2017-10-23 20:24:21 UTC
Adding some debug information in radv_EnumeratePhysicalDevices and/or stepping through it with a debugger might be a good idea. There are multiple reasons why enumeration can fail.
Comment 4 Vedran Miletić 2017-10-24 11:33:06 UTC
(In reply to Cris from comment #2)
> Oh yeah, I blacklisted radeon (and checked with lsmod | grep radeon) and it
> still didn't work.

That's not enough. You have to recompile the kernel with AMDGPU CIK support enabled.
Comment 5 Cris 2017-10-24 14:26:46 UTC
(In reply to Emil Velikov from comment #3)
> Adding some debug information in radv_EnumeratePhysicalDevices and/or
> stepping through it with a debugger might be a good idea. There are multiple
> reasons why enumeration can fail.

Do you want me to run gdb with vulkaninfo?


(In reply to Vedran Miletić from comment #4)
> (In reply to Cris from comment #2)
> > Oh yeah, I blacklisted radeon (and checked with lsmod | grep radeon) and it
> > still didn't work.
> 
> That's not enough. You have to recompile the kernel with AMDGPU CIK support
> enabled.

Kernel was built with CONFIG_DRM_AMDGPU_SI=y.
Comment 6 Cris 2017-10-24 14:44:03 UTC
Apparently beginning with linux 4.13 you have to append "radeon.si_support=0 radeon.cik_support=0 amdgpu.si_support=1 amdgpu.cik_support=1" to the kernel command line. I did, and everything's working just fine.
Comment 7 Vedran Miletić 2017-10-24 16:29:49 UTC
(In reply to Cris from comment #6)
> Apparently beginning with linux 4.13 you have to append "radeon.si_support=0
> radeon.cik_support=0 amdgpu.si_support=1 amdgpu.cik_support=1" to the kernel
> command line. I did, and everything's working just fine.

Glad to hear!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.