LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   NVIDIA Driver has priority over amdgpu on OpenGL (xorg.conf) (https://www.linuxquestions.org/questions/linux-desktop-74/nvidia-driver-has-priority-over-amdgpu-on-opengl-xorg-conf-4175674201/)

wow0010 04-29-2020 06:53 AM

NVIDIA Driver has priority over amdgpu on OpenGL (xorg.conf)
 
Hi,
I'm trying to setup 4 screens using 2 graphics card.
Configuration:
  • Vega56 (amdgpu)
  • NVIDIA GeForce GTX 750ti (nvidia)

2 screens are plugged on the Vega56,
2 screens are plugged on the Nvidia

The problem:
By default when using this config file
Code:

Section "ServerLayout"
    Identifier    "default"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
EndSection

Section "Monitor"
    Identifier    "Monitor0"
    VendorName    "Unknown"
    ModelName      "Unknown"
    Option        "DPMS"
EndSection

Section "Device"
    Identifier    "Device0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    BusID          "PCI:5:0:0"
EndSection

Section "Device"
    Identifier    "Device1"
    Driver        "amdgpu"
    VendorName    "Advanced Micro Devices, Inc. [AMD/ATI]"
    BusID          "PCI:8@0:0:0"
EndSection


Section "Screen"
    Identifier    "Screen1"
    Device        "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection


Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection

Everythings works right, except one thing: Graphicals applications (such as games) uses the poor Nvidia power instead of the great AMDGPU.

What could be the solution, or the option to use a GPU in priority ?
Thanks for anything that could help ! :)

business_kid 04-30-2020 06:56 AM

Quote:

Hi,
I'm trying to setup 4 screens using 2 graphics card.
Configuration:

Vega56 (amdgpu)
NVIDIA GeForce GTX 750ti (nvidia)
I think you're out of luck, unless you use kernel open source kernel drivers for both. It's been a while, but closed source stuff hacks Mesa's libGL stuff. If the AMD gpu is part of an APU, it will have a significant bus speed advantage.

When doing this, I would write myself a file /etc/X11/xorg.conf.d/NN-video.conf where NN is 0-99 and works as a priority setting. Put it running early. Mine has ServerLayout, Monitor, Device, and Screen sections for each output using as many options as allowed. And yes, things are going to suck because Nvidia is only interested in developing closed source drivers. Your performance would be best with 2 similar but different cards from the same manufacturer. 'Man xorg.conf' has the options detailed. It goes through the old xorg.conf, but you just want the video section.

Given the sucky situation, you mught well do better on 1 large 4k monitor. If you're staying with what you've got, cut the refresh and dpi to just above where you'd notice it going grainy/jerky. I'd really up cooling as if you're sweating the cpu & gpu, the APU will need serious cooling. I gather Nvidia need serious cooling either way.

wow0010 04-30-2020 07:55 AM

Hey,
Thanks for your answer, both are dedicated GPUs that as you said need a lot of cooling but that's already done ^^
Today i'm using Windows wich handle the situation really really well (Use the low-end graphics for easy tasks and high-end gpu for Games/CAD/3D)

As you said on some config where every screen works but the NVIDIA is the opengl renderer the screen can be a bit jerky for some reason.
I'll have to stay on Windows with Linux virtualization it seems. (I needed an native linux install due to some performance loss and low-level usb stack utilization)

Thank you for taking the time to answer and maybe with a bit of hope someone knows about a dark trick or something like that :)

business_kid 04-30-2020 12:16 PM

Linux hasn't reached the critical mass where game companies write for linux users. Linux users don't want to pay, either.

4 screens in any OS is madness, IMHO. But feel free to disagree.

wow0010 04-30-2020 08:05 PM

4 screens is totaly madness, but actually I use the 4 pretty often that allow me to watch for documentation, chats, code and another window at full screen. I could get away with 3 but 4 is more confort than anything else and since I got these 1080p monitor for free or really cheap and have the desk to put them, I will not deprive myself of it. If you can try to get a 3/4 screen setup, you'll see that it can be really useful in some situations like coding, CAO/3D, gaming with textchat on a screen and the documentation of the game on another one and your music taking one whole screen

business_kid 05-01-2020 03:29 AM

Well, I confess to having 2, but that's just because the monitor was there and surplus.

An obvious solution beckons for you. Keep chat & docs on your 2 poor performing monitors.

wow0010 05-01-2020 08:44 AM

That's what I do on Windows,
But the whole problem on linux is that all monitor performs poorly, that's what I'm trying to solve :) (They all perform poorly due to NVIDIA Priority in OpenGL)

business_kid 05-01-2020 02:17 PM

Quote:

Originally Posted by wow0010 (Post 6118026)
That's what I do on Windows,
But the whole problem on linux is that all monitor performs poorly, that's what I'm trying to solve :) (They all perform poorly due to NVIDIA Priority in OpenGL)

If you use proprietary drivers on Nvidia, the libGL stuff is wrong. Try
Code:

ls -l /usr/{lib, lib64}}/libGL*
symlinks like libGL.so will point at a library. Is it a Mesa lib (e.g.libGL.so.1.2) or a nutty Nvidia version number? If it's the latter, that will upset/crash your amd drivers so everything sucks.Ideally, put that nvidia card on ebay, buy another amd one and make sure they're either both proprietary drivers or OSS ones.

wow0010 05-01-2020 06:45 PM

Just tried your command, there is no libGL files what so ever in lib or lib64 (Btw i'm on ubuntu 20.04)

Sadly I can't sell that card for an new amd because I need the Cuda thing (Nvidia should really allow AMD to have cuda acceleration in there graphics cards)

wow0010 05-01-2020 06:53 PM

https://i.ibb.co/XFKbTzw/Capture-d-c...2-01-51-31.png
Included a screenshot to help you visualize the whole install

biker_rat 05-01-2020 09:34 PM

How much do you need the NVIDIA CUDA thing? Can you use AMD OpenCL? If you can use OpenCL, try removing nvidia driver and use the opensource nouveau driver (for the GTX 750ti)? The GTX 750ti even supports manual reclocking under nouveau, so it can be used at full speed and will work for some games (nouveau driver has no vulkan support, but supports opengl- this will mean that some games which only work in linux in conjunction with vulkan will not start with the GTX 750ti under nouveau). The AMD Vega 56 is a powerful gaming card on linux with the amdgpu driver and RADV vulkan support. You will probably be able to play a lot of games with the Vega 56, once you get NVIDIA proprietary blobs off of your system. Drivers aside, the GTX750ti is a very weak card compared to the Vega 56.

sp331yi 05-01-2020 10:25 PM

Quote:

That's what I do on Windows,
Welcome, newbie -- Linux Is Not Windows -- and get used to it!

Stay and learn, with an open mind.

wow0010 05-02-2020 05:46 AM

Hello, both of you :)
Quote:

How much do you need the NVIDIA CUDA
I do only use it on windows, I should not use it on linux. (This system has a dualboot installed)
Quote:

Can you use AMD OpenCL
That's what I'm trying to do. AMD OpenCL works only when the 2 NVIDIA Screens are disabled/not working.
Quote:

use the opensource nouveau driver
I tryied that but some really weird reasons the nouveau drivers crashes the whole system at startup. (It was the default driver I had to remove it in the recovery mode to get a working system)

I can provide logs if you tell me which one :)

Quote:

Quote: That's what I do on Windows,
Welcome, newbie -- Linux Is Not Windows -- and get used to it!

Stay and learn, with an open mind.
I'm using linux systems for about 8 years for server administration, I currently manage about 4 h24 servers, so stability is the top idea here. Sure I could get away on linux with 4 poor performing desktops but no. I have plenty of performances available, not using it will slow me down a lot.
The dualboot that's i'm trying to install is not for daily-usage but for tools compilations, tests, using low-level usb stacks to flash firmwares. Theses operations can be lengthy, I need those monitor to be working as excepted to do something else.

biker_rat 05-02-2020 10:36 AM

On some systems nouveau gives me trouble in its default minimal clocked state (not a failure to boot in my case , but bad rendering errors ). Maybe your issue is something to do with the low performance of those cards under nouveau at the minimal default clock state. If you pass the command to speed up the gpu & memory clocks before starting X (you can google kepler reclocking on phoronix site for those commmands- GTX 750ti is a gen I maxwell, but kepler reclocking also works for the GTX 750 & 750ti [gen 1 maxwell]) the card might work better under nouveau.

From what I reading from you , you might be statisfied with full acceleration on the beefy AMD card and the weaker Nvidia just to drive the monitors stably. Getting the open source driver to work for you is your straight forward path to that. If zero hardware acceleration on the nvidia screens would work for you the, using unaccelerated generic opensource vesa or fbdev drivers on those screens could be another option (YMMV, those are completely unaccelerated and I have no experience using them with 2 cards).

On a seperate note,which Ubuntu version are you using? I don't deal with Ubuntu much. Everything is too automated and it's not obvious to me how to doctor it.Maybe a different version of Ubuntu has an unborked nouveau? I prefer slackware. Do you have interest to try booting alienbob's latest spin of his live slackware dvd/pen drive distribution and fiddle with it for an hour and see it all four monitors come up on that with the open source drivers?

wow0010 05-02-2020 11:16 AM

Most of the time I use chromium based app (So a bit of acceleration bit but not a lot) on the monitors that are plugged to the Nvidia.
I'll try again with Nouveau (I know that it worked on the Ubuntu LiveCD so I don't know why it dosen't work on a fresh install)
I'm using Ubuntu 20.04 (Latest) btw
I could try with slackware and see if I still have problems. I don't have problems about trying another distribution with cleaner drivers
Thank you for your answer I'll try and come to you when I've got news ^^ For now I need to move forward on a project on Windows, so I may test it tonight


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