You are not logged in.

#1 2020-06-29 01:15:12

ignormies
Member
Registered: 2016-08-15
Posts: 21

Mesa drivers being used, despite having AMD drivers loaded

My (eGPU) AMD RX 5700 XT card is not being used for hardware acceleration despite the drivers being loaded:

┌─[ignormies][~]
└──▪ glxinfo | grep -i opengl
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics 620 (WHL GT2)
┌─[ignormies][~]
└──▪ lsmod | grep amdgpu     
amdgpu               5738496  2
gpu_sched              40960  1 amdgpu
i2c_algo_bit           16384  2 amdgpu,i915
ttm                   118784  1 amdgpu
drm_kms_helper        258048  2 amdgpu,i915
drm                   581632  15 gpu_sched,drm_kms_helper,amdgpu,i915,ttm
┌─[ignormies][~]
└──▪ lspci
08:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Upstream Port of PCI Express Switch (rev c1)
09:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch
0a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] (rev c1)
0a:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio

In Gnome+Wayland, the displays are also driven, but I'm (fairly) confident that they are being drawn using the integrated graphics in my CPU and passed through the GPU.
(https://i.imgur.com/NjrSsHy.jpg)
My ultrawide is having some major issues where everything is drawn sheared (except the cursor, oddly), almost like a frequency problem. If I disable the internal display, windows/GUI elements/extra cursors start getting drawn in the wrong places and flickering and it gets fairly laggy.


I have been able to use Nvidia eGPUs just fine and switching to another enclosure with a 1070 in it works fine after adding an xorg.conf configuration and telling Gnome to use X.

Section "Device"
    Identifier     "eGPU"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:08:0:0"
    Option         "AllowExternalGpus" "true"
EndSection

I have been unable to get a modified, similar configuration to work with my AMD card on X. Using this configuration, I get a blank or pure green (probably #00ff00) screens with no ability to interact.

Section "Device"
    Identifier     "AMD eGPU"
    Driver         "amdgpu"
    BusID          "PCI:10:0:0"
    Option         "AllowExternalGpus" "true"
EndSection

Lastly, the enclosure+card works perfectly fine on Windows, so it's not the card's fault.

Offline

#2 2020-06-29 01:26:46

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,422

Re: Mesa drivers being used, despite having AMD drivers loaded

AllowExternalGpus is a nvidia driver option so it's not entirely surprising it doesn't work. You probably want to look at https://wiki.archlinux.org/index.php/PR … offloading

Offline

#3 2020-06-29 11:24:03

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Mesa drivers being used, despite having AMD drivers loaded

BusID          "PCI:10:0:0"

That BusID doesn't match the lspci output.
Edit: lspci uses hex, xorg uses decimal notation , busid does match lspci output.

Your system does appear to use hybrid graphics, thoroughly check the page V1del linked to to understand the possiblities and how to use them.

Last edited by Lone_Wolf (2020-06-30 10:38:51)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2020-06-29 12:42:39

seth
Member
Registered: 2012-09-03
Posts: 49,969

Re: Mesa drivers being used, despite having AMD drivers loaded

That BusID doesn't match the lspci output.

It should not - lspci is hexadecimal, xorg.conf useses decimal.
https://wiki.archlinux.org/index.php/Bu … hics_Cards

Online

#5 2020-06-30 17:53:55

ignormies
Member
Registered: 2016-08-15
Posts: 21

Re: Mesa drivers being used, despite having AMD drivers loaded

Thanks for the responses. I should have made it clear in my original post that

  • I want to use the dedicated eGPU for as much hardware acceleration as possible. My laptop does not have an internal, dedicated GPU (only Intel integrated).

  • I want to be able to use this card with Wayland, not just X. I used the xorg config just to demonstrate that the problem wasn't specific to using Wayland

  • All my displays are connected to the eGPU and I'm not interested in driving the internal screen while using it.

With that being said, is PRIME what I even need to be looking at? I don't think I'm interested in hybrid graphics/dynamic offloading. Plus the instructions for this rely on xrandr which, to my understanding, doesn't work with Wayland?

Offline

#6 2020-06-30 22:14:39

seth
Member
Registered: 2012-09-03
Posts: 49,969

Re: Mesa drivers being used, despite having AMD drivers loaded

"i915.modeset=0" should effectively block the intel chip from being used for display servers - remove all funky xorg configs, do NOT have xf86-video-vesa installed and see what happens.

Online

#7 2020-07-01 00:11:58

ignormies
Member
Registered: 2016-08-15
Posts: 21

Re: Mesa drivers being used, despite having AMD drivers loaded

Ok I did each of those things and the card was used for hardware acceleration/displays. I did have to manually launch my gnome session, however (gdm hangs on startup).

Attempting to diagnose the issue further, I determined that I can even leave xf86-video-vesa installed, only setting the i915.modeset=0 kernel parameter, and the card is still used.

Last edited by ignormies (2020-07-01 00:17:46)

Offline

#8 2020-07-01 06:22:31

seth
Member
Registered: 2012-09-03
Posts: 49,969

Re: Mesa drivers being used, despite having AMD drivers loaded

How is GDM configured? Wayland or Xorg backend?

and the card is still used

Until it isn't (X11 only)
The VESA driver is capable to run X11 on the modeset disabled i915 chip - and I can't think of a good reason to have it installed on this system.

Online

#9 2020-07-01 07:41:16

ignormies
Member
Registered: 2016-08-15
Posts: 21

Re: Mesa drivers being used, despite having AMD drivers loaded

How is GDM configured? Wayland or Xorg backend?

I currently have it configured to use the Wayland backend.

I can't think of a good reason to have it installed on this system.

I use this laptop detached from the eGPU on the go, and also occasionally plug in an Nvidia eGPU (I use X11 when I do this). I can't remember why I originally installed xf86-video-vesa, however. It may have just been me trying to resolve this or another issue weeks or months ago. Is it important when running without the eGPU and only with the iGPU?

Offline

#10 2020-07-01 12:30:56

seth
Member
Registered: 2012-09-03
Posts: 49,969

Re: Mesa drivers being used, despite having AMD drivers loaded

I guess GDM/wayland will try to use the intel chip and fail on that - check the journal.
Possibly changing the framebuffer device for the console can help you out here, https://unix.stackexchange.com/question … ole-output

Is it important when running without the eGPU and only with the iGPU?

No.
Respectively: yes.
But no.

The VESA driver will allow you to run on the intel chip w/o KMS enabled, but that's not what you want.
If you want to use both setups, you could start the server w/ different configs where "PrimaryGPU" Option in either device is reversed. Potentially only having the entry "True" for your amdgpu is going to cut it, but this will not impact wayland sessions and idk whether gnome allows you to select the GPU (last I know is that wayland/gnome has no hybrid graphics support, but that could have changed)

So for wayland the only way I know is to control the GPU during the boot phase.

Online

#11 2021-05-21 19:31:45

ignormies
Member
Registered: 2016-08-15
Posts: 21

Re: Mesa drivers being used, despite having AMD drivers loaded

After giving up on this problem for nearly a year, I finally decided to come back and look at it again.

I was able to get the AMD card working on X11 without disabling modesetting by simply installing xf86-video-amdgpu.

The card still doesn't work on Wayland -- it's still not used for hardware acceleration just as before. Interestingly, the graphical glitch on the large center monitor doesn't happen anymore and the display just refuses to be enabled entirely.

seth wrote:

I guess GDM/wayland will try to use the intel chip and fail on that - check the journal.

I found this in the logs:

May 21 11:54:34 pancake gnome-shell[22998]: Adding device '/dev/dri/card0' (amdgpu) using atomic mode setting.
May 21 11:54:34 pancake gnome-shell[22998]: Boot VGA GPU /dev/dri/card1 selected as primary
May 21 11:54:36 pancake gnome-shell[22998]: Using public X11 display :1024, (using :1025 for managed services)
May 21 11:54:36 pancake gnome-shell[22998]: Using Wayland display name 'wayland-0'
May 21 11:54:36 pancake /usr/lib/gdm-wayland-session[22989]: dbus-daemon[22989]: [session uid=120 pid=22989] Activating service name='org.a11y.Bus' requested by ':1.4' (uid=120 pid=22998 comm="/usr/bin/gnome-shell ")
May 21 11:54:36 pancake /usr/lib/gdm-wayland-session[22989]: dbus-daemon[22989]: [session uid=120 pid=22989] Successfully activated service 'org.a11y.Bus'
May 21 11:54:36 pancake gnome-shell[22998]: Getting parental controls for user 120
May 21 11:54:36 pancake gnome-shell[22998]: Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session. Asking logind directly.
May 21 11:54:36 pancake gnome-shell[22998]: Will monitor session 40

The "Boot VGA GPU /dev/dri/card1 selected as primary" seems like an important thing to pay attention to. I couldn't find a way to get the AMD gpu to be the primary card.
Also interesting is that it looks like Wayland is using X11 for the displays? Not sure what's going on there, perhaps this is XWayland at play?

Offline

Board footer

Powered by FluxBB