Results 1 to 9 of 9

Thread: I can not get vulkan to work with mesa drivers

  1. #1
    Junior Member
    Join Date
    Dec 2017
    Posts
    4

    I can not get vulkan to work with mesa drivers

    Sorry for my newbie question, but I don't know where else to ask. I have tried several other forums, but here is my problem.

    I have an amd radeon r9 390 gpu. Using Ubuntu 16.04 - kernel: 4.14.6-041406-generic

    I am using oibaf's ppa https://launchpad.net/~oibaf/+archiv...aphics-drivers

    glxinfo | grep OpenGL

    Gives the following output:

    Code :
    OpenGL vendor string: X.Org
    OpenGL renderer string: AMD HAWAII (DRM 2.50.0 / 4.14.6-041406-generic, LLVM 5.0.1)
    OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.4.0-devel
    OpenGL core profile shading language version string: 4.50
    OpenGL core profile context flags: (none)
    OpenGL core profile profile mask: core profile
    OpenGL core profile extensions:
    OpenGL version string: 3.0 Mesa 17.4.0-devel
    OpenGL shading language version string: 1.30
    OpenGL context flags: (none)
    OpenGL extensions:
    OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.4.0-devel
    OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
    OpenGL ES profile extensions:
    X server version: X.Org X Server 1.18.4

    I followed the installation guide at https://vulkan.lunarg.com/doc/sdk/1....g_started.html

    When I run type "vulkaninfo" I get the following output:

    Code :
    Vulkan API Version: 1.0.65
     
     
    Instance Extensions:
    ====================
    Instance Extensions count = 10
        VK_KHR_external_fence_capabilities  : extension revision  1
        VK_KHR_external_memory_capabilities : extension revision  1
        VK_KHR_external_semaphore_capabilities: extension revision  1
        VK_KHR_get_physical_device_properties2: extension revision  1
        VK_KHR_get_surface_capabilities2    : extension revision  1
        VK_KHR_surface                      : extension revision 25
        VK_KHR_wayland_surface              : extension revision  6
        VK_KHR_xcb_surface                  : extension revision  6
        VK_KHR_xlib_surface                 : extension revision  6
        VK_EXT_debug_report                 : extension revision  8
    /tmp/SDK-DEV/Build/Vulkan-LoaderAndValidationLayers/demos/vulkaninfo.c:1670: failed with VK_ERROR_INITIALIZATION_FAILED

    I previously had vulkan working with amd-gpu-pro driver. But I decided to try this oibaf's ppa for playing World of Warcraft with better performance. Any suggestions to what my problem is, or to further troubleshooting the problem?

  2. #2
    Senior Member
    Join Date
    Mar 2016
    Posts
    294
    This usually happens when the kernel has two drivers and chooses to use the legacy (radeon) one.
    But Vulkan RADV implementation needs amdgpu driver.
    Try this: https://wiki.archlinux.org/index.php...CIK.29_support

    PS: If you are not a developer, you should not need the SDK at all. The vulkan-utils package already contains vulkaninfo.
    Last edited by krOoze; 12-29-2017 at 02:56 AM.

  3. #3
    Senior Member
    Join Date
    Mar 2016
    Posts
    294
    Quote Originally Posted by radhakarthi View Post
    Thank you, admin! Nice Information was shared. The same thing has happened to me, now I am clear.
    I am not admin, just community. But you are welcome all the same.
    Last edited by khronos; 01-08-2018 at 06:57 AM. Reason: Remove bad links from signature

  4. #4
    Junior Member
    Join Date
    Dec 2017
    Posts
    4
    Ok, so I should be able to run vulkan with just installing package mesa-vulkan-drivers? And also where is it that I need to specify the kernel to use amdgpu driver. I have triede blacklisting the "radeon". But doesn't help me at all.

    I have tried uninstalling the SDK, and now vulkaninfo gives me this:

    Vulkan API Version: 1.0.42

    INFO: [loader] Code 0 : Found manifest file /home/simon/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0"
    INFO: [loader] Code 0 : Found manifest file /home/simon/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0"
    INFO: [loader] Code 0 : Found ICD manifest file /usr/share/vulkan/icd.d/radeon_icd.x86_64.json, version "1.0.0"
    INFO: [loader] Code 0 : Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0"

    Instance Extensions:
    ====================
    Instance Extensions count = 6
    VK_KHR_get_physical_device_properties2: extension revision 1
    VK_KHR_surface : extension revision 25
    VK_KHR_wayland_surface : extension revision 6
    VK_KHR_xcb_surface : extension revision 6
    VK_KHR_xlib_surface : extension revision 6
    VK_EXT_debug_report : extension revision 8
    /build/vulkan-IbLrZR/vulkan-1.0.42.0+dfsg1/demos/vulkaninfo.c:1523: failed with VK_ERROR_INITIALIZATION_FAILED

  5. #5
    Senior Member
    Join Date
    Mar 2016
    Posts
    294
    Quote Originally Posted by legolasdk View Post
    Ok, so I should be able to run vulkan with just installing package mesa-vulkan-drivers?
    Yup, it should be part of the official repo, or newer versions at the oibaf's or padoka's ppa. You still need to go through that kernel parameter nonsense if you have a SI or CI card (as you do).

    Quote Originally Posted by legolasdk View Post
    And also where is it that I need to specify the kernel to use amdgpu driver. I have triede blacklisting the "radeon". But doesn't help me at all.
    It should be sufficient to just add the amdgpu.si_support=1 radeon.si_support=0 amdgpu.cik_support=1 radeon.cik_support=0 parameters to the kernel. So even if radeon driver has the first dibs on the GPU it should refuse it and let amdgpu have it, and so no blacklisting or priority reordering should be necessary. It should show in dmesg which won.

    Adding kernel parameters can be dependent on distro. Try this guide for Ubuntu: https://wiki.ubuntu.com/Kernel/KernelBootParameters

  6. #6
    Junior Member
    Join Date
    Dec 2017
    Posts
    4
    Seems that my R9 390 card is not supporting amdgpu, https://help.ubuntu.com/community/AMDGPU-Driver

    So I have removed all blacklisting of radeon. And now I am still getting the same error:

    ===========
    VULKAN INFO
    ===========

    Vulkan API Version: 1.0.42

    INFO: [loader] Code 0 : Found manifest file /home/simon/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0"
    INFO: [loader] Code 0 : Found manifest file /home/simon/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0"
    INFO: [loader] Code 0 : Found ICD manifest file /usr/share/vulkan/icd.d/radeon_icd.x86_64.json, version "1.0.0"
    INFO: [loader] Code 0 : Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0"

    Instance Extensions:
    ====================
    Instance Extensions count = 6
    VK_KHR_get_physical_device_properties2: extension revision 1
    VK_KHR_surface : extension revision 25
    VK_KHR_wayland_surface : extension revision 6
    VK_KHR_xcb_surface : extension revision 6
    VK_KHR_xlib_surface : extension revision 6
    VK_EXT_debug_report : extension revision 9
    /build/vulkan-IbLrZR/vulkan-1.0.42.0+dfsg1/demos/vulkaninfo.c:1523: failed with VK_ERROR_INITIALIZATION_FAILED

  7. #7
    Senior Member
    Join Date
    Mar 2016
    Posts
    294
    The article is half year old.
    My card is not there either, but "works". Reason is probably the kernel parameters, which signify that it is a unstable\testing feature.
    I think all GCN should work.

  8. #8
    Junior Member
    Join Date
    Dec 2017
    Posts
    4
    Alright, I have finally got it to work. Here is what I did:

    sudo nano /etc/default/grub
    In here add to the lines GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX so they look like this:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash modprobe.blacklist=radeon si_support=1 radeon.si_support=0 amdgpu.cik_support=1 radeon.cik_support=0"
    GRUB_CMDLINE_LINUX="modprobe.blacklist=radeon"
    Then type sudo update-grub (I also did sudo update-grub2 don't really know what the difference is, but that is what I did)

    Then edit/add /usr/share/X11/20-amdgpu.conf so it looks like this

    Section "Device"
    Identifier "amdgpu"
    Driver "amdgpu"
    Option "DRI" "3"
    Option "TearFree" "on"
    EndSection
    amdgpu kernel driver should now be in use, confirm with lspci -k

    After amdgpu was enabled, I installed Oibaf's mesa repository https://launchpad.net/~oibaf/+archiv...aphics-drivers

    and sudo apt-get install mesa-vulkan-drivers

    And now vulkan seems to work and I don't get the same error anymore.
    But now I have a new question . When I type "vulkaninfo" it says:

    ===========
    VULKAN INFO
    ===========

    Vulkan API Version: 1.0.42

    INFO: [loader] Code 0 : Found manifest file /home/simon/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0"
    INFO: [loader] Code 0 : Found manifest file /home/simon/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0"
    INFO: [loader] Code 0 : Found ICD manifest file /usr/share/vulkan/icd.d/radeon_icd.x86_64.json, version "1.0.0"
    INFO: [loader] Code 0 : Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0"

    Instance Extensions:
    ====================
    Instance Extensions count = 6
    VK_KHR_get_physical_device_properties2: extension revision 1
    VK_KHR_surface : extension revision 25
    VK_KHR_wayland_surface : extension revision 6
    VK_KHR_xcb_surface : extension revision 6
    VK_KHR_xlib_surface : extension revision 6
    VK_EXT_debug_report : extension revision 9
    WARNING: radv is not a conformant vulkan implementation, testing use only.
    And further down it says:
    Device Properties and Extensions :
    ==================================
    GPU0
    VkPhysicalDeviceProperties:
    ===========================
    apiVersion = 0x400039 (1.0.57)
    driverVersion = 75497571 (0x4800063)
    vendorID = 0x1002
    deviceID = 0x67b1
    deviceType = DISCRETE_GPU
    deviceName = AMD RADV HAWAII (LLVM 6.0.0)
    VkPhysicalDeviceLimits:
    So what version of vulkan am I using, 1.0.42 or 1.0.57 ?
    And also how do I upgrade this to the newest version, 1.0.65??

    Thanks for all your help by the way

  9. #9
    Senior Member
    Join Date
    Mar 2016
    Posts
    294
    Very nice.

    The first is the vulkan.h version the vulkaninfo app was compiled against. You could get newer version if you used the SDK version of the app (which is updated more frequently than distro repos), but there is no need if you do not intend to develop. It only influences compilation of apps, not runtime.

    The second is the version the GPU driver reports. It is most likely the SDK they used when compiling the drivers. It is out of your control (unless there is a newer driver to update to).
    Also, all 1.0.X versions are supposed to be functionally equivalent. X is only bugfix/clarification version of the Vulkan specification, and well, it is no guarantee the driver is bug-free, so the number itself is not that useful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean