You are not logged in.

#1 2019-11-04 18:49:17

lulu
Member
Registered: 2019-11-04
Posts: 6

Selecting a specific graphic driver for Xorg to use at boot

Hi,
I'm using Arch for more than a year now, I don't think we can consider me as a newbie anymore but I need help.

My issue is :
I want to use DaVinci Resolve for my YouTube video editing but I use AMDGPU. DaVinci Resolve don't seem to work at all with the open source implementation of the driver and I don't want to switch to AMDGPU-PRO as I also use that system to do some gaming... Windows dual boot is not an option either.

My system :
Ryzen 5 2400G (the Vega 11 GPU is deactivated in BIOS)
RX480 8Gb
16Gb RAM
All packages are up to date and I use the stock Arch kernel.
I use systemd-boot as bootloader.

I was wondering, is there a way (kernel parameter, bash script, config files...) to select at boot which graphics driver Xorg should start with ?

I heard that DaVinci Resolve doesn't work when non-proprietary OpenCL implementations are present on the system (opencl-mesa) but that's not an issue for me. If I can select which driver to use, I just have to select the proprietary driver when I want to do rendering and use OpenCL, after deleting all open-source OpenCL related packages.

I also considered to eventually set the Vega 11 with the AMDGPU-PRO driver and use the RX480 with AMDGPU but when I activate the Vega 11, it is recognized with "lspci" but I can't connect a display to it (black screen), sign that it doesn't get initialized... Note that the Vega works fine when the RX480 is not there...

Or, if you somehow managed to get DaVinci Resolve to work with the open-source driver, let me know how you did it !

Offline

#2 2019-11-04 20:30:11

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,284
Website

Re: Selecting a specific graphic driver for Xorg to use at boot

You can set up two boot options with different kernel parameters to blacklist the other module(s) if this is a matter of modules loaded at boot time.  If you really just need to use different Xorg drivers, there's no reason this needs to be specified at boot time, just use different invocations of startx/xinit/whatever that specify a xorg config to use.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2019-11-04 23:29:29

Ropid
Member
Registered: 2015-03-09
Posts: 608

Re: Selecting a specific graphic driver for Xorg to use at boot

You can use AMD's proprietary OpenCL driver on top of the open amdgpu kernel module. That OpenCL driver works fine by itself, without the rest of the AMDGPU-PRO package.

There is an AUR package named "opencl-amd" that does all the work of extracting the OpenCL files out of AMD's AMDGPU-PRO Ubuntu installation files.

https://aur.archlinux.org/packages/opencl-amd/

The package is not conflicting with "opencl-mesa", so you need to make sure to remove "opencl-mesa" yourself.

Last edited by Ropid (2019-11-04 23:29:53)

Offline

#4 2019-11-04 23:32:36

Pse
Member
Registered: 2008-03-15
Posts: 406

Re: Selecting a specific graphic driver for Xorg to use at boot

AMDGPU and AMDGPU-PRO in fact use the same kernel and Xorg drivers (the open source ones). The only thing that AMDGPU-PRO changes is the userspace components, namely libgl and the Vulkan libraries. If you take a look at how this works in the AMDGPU-PRO package in AUR you will see that there's a file that tells the dynamic linker which libgl and Vulkan lib to pick when starting apps (/etc/ld.so.conf.d/20-amdgpu.conf). Presumably, you could also do this before starting apps by using something like LD_PRELOAD, therefore running whichever app with either libgl/Vulkan implementation. Note I haven't actually tried to do this, but at first sight there doesn't appear to be a need to restart the whole desktop, or have separate Xorg instances for this to work.

Last edited by Pse (2019-11-04 23:34:24)

Offline

#5 2019-11-05 07:30:20

lulu
Member
Registered: 2019-11-04
Posts: 6

Re: Selecting a specific graphic driver for Xorg to use at boot

Ropid wrote:

You can use AMD's proprietary OpenCL driver on top of the open amdgpu kernel module. That OpenCL driver works fine by itself, without the rest of the AMDGPU-PRO package.

There is an AUR package named "opencl-amd" that does all the work of extracting the OpenCL files out of AMD's AMDGPU-PRO Ubuntu installation files.

https://aur.archlinux.org/packages/opencl-amd/

The package is not conflicting with "opencl-mesa", so you need to make sure to remove "opencl-mesa" yourself.

I already have that package installed but DaVinci Resolve crashes too, letting me think that other implementations of the driver might be in conflict too...

Offline

#6 2019-11-05 09:17:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 7,798

Re: Selecting a specific graphic driver for Xorg to use at boot

Then we have an XY Problem at our hands your actual question should be Davinci Code is crashing despite installing AMDs opencl and you will want to post the output you are receiving.

Last edited by V1del (2019-11-05 09:17:54)

Offline

#7 2019-11-05 09:23:13

lulu
Member
Registered: 2019-11-04
Posts: 6

Re: Selecting a specific graphic driver for Xorg to use at boot

I've already created a post on Reddit with the error logs but nobody seemed to want to help me...
https://www.reddit.com/r/linuxquestions … no_errors/

Note that I've uninstalled opencl-mesa and amdapp-sdk since with no effects...

I'm currently installing DaVinci Resolve to see if it work on my Intel/AMD hybrid graphics laptop.
EDIT : It doesn't work on that laptop either.

Last edited by lulu (2019-11-05 12:58:49)

Offline

#8 2019-11-05 13:02:27

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 7,370

Re: Selecting a specific graphic driver for Xorg to use at boot

https://wiki.archlinux.org/index.php/Da … stallation

The table there suggests that won't work .

DVR can't use opencl intel drivers or opengl amdgpu driver.

Looks like you might want to look for an alternative to DaVinci Resolve that does work with opensource drivers.
If that's not doable, maybe you can passthrough one card to a VM that will use amdgpu-pro drivers ?


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#9 2019-11-05 16:14:13

Pse
Member
Registered: 2008-03-15
Posts: 406

Re: Selecting a specific graphic driver for Xorg to use at boot

Lone_Wolf wrote:

https://wiki.archlinux.org/index.php/Da … stallation

The table there suggests that won't work .

DVR can't use opencl intel drivers or opengl amdgpu driver.

Looks like you might want to look for an alternative to DaVinci Resolve that does work with opensource drivers.
If that's not doable, maybe you can passthrough one card to a VM that will use amdgpu-pro drivers ?

As I said above, there is no need to do that. AMDGPU-PRO just replaces the OpenGL/Vulkan/OpenCL userspace libraries. It still uses the same underlying open source kernel driver (and the same Xorg DDX driver).

Last edited by Pse (2019-11-05 16:15:14)

Offline

#10 2019-11-05 17:06:56

Ropid
Member
Registered: 2015-03-09
Posts: 608

Re: Selecting a specific graphic driver for Xorg to use at boot

lulu wrote:

I already have that package installed but DaVinci Resolve crashes too, letting me think that other implementations of the driver might be in conflict too...


According to that reddit post you linked to, you have both "opencl-mesa" and "opencl-amd" installed at the same time. You should remove opencl-mesa and see what happens.

When I wrote that the packages are "not conflicting", I meant that the PKGBUILD of the opencl-amd package is not telling pacman to remove the opencl-mesa package. You have to remove opencl-mesa yourself.

Last edited by Ropid (2019-11-05 17:07:16)

Offline

#11 2019-11-05 17:19:44

lulu
Member
Registered: 2019-11-04
Posts: 6

Re: Selecting a specific graphic driver for Xorg to use at boot

Ropid wrote:
lulu wrote:

I already have that package installed but DaVinci Resolve crashes too, letting me think that other implementations of the driver might be in conflict too...


According to that reddit post you linked to, you have both "opencl-mesa" and "opencl-amd" installed at the same time. You should remove opencl-mesa and see what happens.

When I wrote that the packages are "not conflicting", I meant that the PKGBUILD of the opencl-amd package is not telling pacman to remove the opencl-mesa package. You have to remove opencl-mesa yourself.

I've already done that and it still doesn't work !

Offline

#12 2019-11-05 17:40:33

loqs
Member
Registered: 2014-03-06
Posts: 9,077

Re: Selecting a specific graphic driver for Xorg to use at boot

What is the output of `clinfo` from the clinfo package?
Editr:
Also the output of `glinfo` from the mesa-demos package?

Last edited by loqs (2019-11-05 17:42:13)

Offline

#13 2019-11-06 07:47:33

lulu
Member
Registered: 2019-11-04
Posts: 6

Re: Selecting a specific graphic driver for Xorg to use at boot

loqs wrote:

What is the output of `clinfo` from the clinfo package?
Editr:
Also the output of `glinfo` from the mesa-demos package?

Note that I've activated the Vega 11 embedded in the Ryzen 5 2400G because I need it for Blender. My monitor is plugged into the RX480, making it the main renderer for OpenGL...
By the way, Blender sees and can use both GPUs (and even my CPU) for OpenCL computing without any issue.

clinfo : https://pastebin.com/rbYac4kH

glinfo : https://pastebin.com/v6kzBpfs

Offline

#14 2019-11-06 13:47:08

loqs
Member
Registered: 2014-03-06
Posts: 9,077

Re: Selecting a specific graphic driver for Xorg to use at boot

What is the result if you use https://aur.archlinux.org/packages/amdgpu-pro-libgl/ instead of mesa to provide OpenGL?

Offline

#15 2019-11-06 14:13:27

lulu
Member
Registered: 2019-11-04
Posts: 6

Re: Selecting a specific graphic driver for Xorg to use at boot

loqs wrote:

What is the result if you use https://aur.archlinux.org/packages/amdgpu-pro-libgl/ instead of mesa to provide OpenGL?

I can't install it, as many amdgpu-pro related packages... The files are said to be invalid.
EDIT: The provided source link is broken, AMD moved or deleted the file from their website. So there's no chance to see DaVinci Resolve work with proprietary drivers...

Does anyone have a solution to make it work with open-source drivers ?

Last edited by lulu (2019-11-07 15:15:52)

Offline

Board footer

Powered by FluxBB