Problem: VK_ERROR_INITIALIZATION_FAILED
I have ubuntu 18.04, and I've downloaded and compiled example program, that draws triangle. It does not work, because cannot initialize vulkan context.
For install I've used apt install build-essential libglfw3-dev libvulkan-dev vulkan-utils
vulkaninfo
is writing same thing.
Someone said, that I need to blacklist radeon
and install amdgpu
. It ruined the OS in a mindblowing way:
- I've downloaded, installed
./amdgpu-pro-install -pro -no-32
, - After reboot I got console only. I dont want to use console mode OS for debugging graphics APP! So
- Did rollback:
amdgpu-pro-uninstall
and reboot again - After reboot fullscreen refreshes now taking like 5 seconds, I virtually see scanline, and mouse is jerky. OS is still usable, but very unpleasant, unresponsive feeling!
I did that on windows. It involves 4 pretty standart stps, thay you can do in a single, pretty standart way:
- Install win
- Install amd driver (only one driver, from official site, latest version)
- Install vulkan sdk and glfw
- Install free visual studio community, create project, add downloaded source code, press RUN
In result - You WILL SEE TRIANGLE, running at MAX FPS, that your GPU can afford. It is very simple, and with low entry level. Portable across any gpu, that claims to support vulkan. You focus on coding, but not on tweaking poorly designed OS graphics stack!
Now I need to do same in Ubuntu. What steps should I take?
After a day of shamanism with a tambourine, I've finally figured out: default driver is old
radeon
driver, instead of actualamdgpu
(probably just because "it would show picture everywhere"). So basically you have to take following steps:sudo nano /etc/modprobe.d/blacklist.conf
blacklist radeon
sudo update-initramfs -u
sudo nano /etc/grub/default
sudo update-grub
sudo reboot
After it you should be using
amdgpu
. To check currently selected driver, use:To get vulkan SDK on Ubuntu (you would require at least
glslc
), no need to bother withtar
- just check out premade packages. Bionic 18.04 packages are confirmed to work well on my fresh lubuntu 20.04PS.