How can I select a primary GPU by the PCIe ID?

Forum rules
Before you post please read how to get help
Post Reply
coolpx
Level 1
Level 1
Posts: 5
Joined: Tue Oct 04, 2022 8:45 pm

How can I select a primary GPU by the PCIe ID?

Post by coolpx »

So, I have two AMD GPUs in my system right now. One is integrated Vega 3 graphics, and the other is an RX 6500 XT. Everything I've found online about selecting a primary GPU or disabling one does it by AMD/Intel/NVIDIA or driver, but both GPUs in my case are AMD cards running on the amdgpu driver. Here is the output of inxi -Fxxxrz:

Code: Select all

System:
  Kernel: 5.15.0-48-generic x86_64 bits: 64 compiler: gcc v: 11.2.0 Console: pty pts/0
    DM: LightDM 1.30.0 Distro: Linux Mint 21 Vanessa base: Ubuntu 22.04 jammy
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME A320M-K v: Rev X.0x serial: <superuser required>
    UEFI: American Megatrends v: 6042 date: 04/28/2022
CPU:
  Info: dual core model: AMD Athlon 3000G with Radeon Vega Graphics bits: 64 type: MT MCP
    smt: enabled arch: Zen/Zen+ note: check rev: 1 cache: L1: 192 KiB L2: 1024 KiB L3: 4 MiB
  Speed (MHz): avg: 1649 high: 2120 min/max: 1600/3500 boost: enabled cores: 1: 1463 2: 1549
    3: 1466 4: 2120 bogomips: 27945
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD vendor: Gigabyte driver: amdgpu v: kernel pcie: speed: 16 GT/s lanes: 16 ports:
    active: HDMI-A-1 empty: DP-1 bus-ID: 03:00.0 chip-ID: 1002:743f class-ID: 0300
  Device-2: AMD Picasso/Raven 2 [Radeon Vega Series / Radeon Mobile Series] vendor: ASUSTeK
    driver: amdgpu v: kernel pcie: speed: 8 GT/s lanes: 16 ports: active: DP-2 empty: HDMI-A-2
    bus-ID: 0a:00.0 chip-ID: 1002:15d8 class-ID: 0300
  Display: server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.1 driver: X: loaded: amdgpu,ati
    unloaded: fbdev,modesetting,radeon,vesa gpu: amdgpu tty: 120x50
  Monitor-1: DP-2 model: HP W2072a serial: <filter> res: 1600x900 dpi: 92
    size: 443x249mm (17.4x9.8") diag: 508mm (20") modes: max: 1600x900 min: 720x400
  Monitor-2: HDMI-A-1 model: L215E serial: <filter> res: 1920x1080 dpi: 102
    size: 477x269mm (18.8x10.6") diag: 548mm (21.6") modes: max: 1920x1080 min: 720x400
  Message: GL data unavailable in console. Try -G --display
Audio:
  Device-1: AMD Navi 21 HDMI Audio [Radeon RX 6800/6800 XT / 6900 XT] driver: snd_hda_intel
    v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 03:00.1 chip-ID: 1002:ab28 class-ID: 0403
  Device-2: AMD Raven/Raven2/Fenghuang HDMI/DP Audio vendor: ASUSTeK PRIME B450M-A
    driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s lanes: 16 bus-ID: 0a:00.1
    chip-ID: 1002:15de class-ID: 0403
  Device-3: AMD Family 17h HD Audio vendor: ASUSTeK PRIME B450M-A driver: snd_hda_intel
    v: kernel pcie: speed: 8 GT/s lanes: 16 bus-ID: 0a:00.6 chip-ID: 1022:15e3 class-ID: 0403
  Sound Server-1: ALSA v: k5.15.0-48-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK PRIME B450M-A
    driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 08:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: enp8s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 465.76 GiB used: 108.73 GiB (23.3%)
  ID-1: /dev/sda vendor: Western Digital model: WD5000LPCX-00VHAT0 size: 465.76 GiB
    speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter> rev: 1A01 temp: 33 C scheme: GPT
Partition:
  ID-1: / size: 456.89 GiB used: 108.73 GiB (23.8%) fs: ext4 dev: /dev/sda2
  ID-2: /boot/efi size: 511 MiB used: 5.2 MiB (1.0%) fs: vfat dev: /dev/sda1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile
Sensors:
  System Temperatures: cpu: N/A mobo: N/A
  Fan Speeds (RPM): N/A
  GPU: device: amdgpu temp: 40.0 C mem: 38.0 C fan: 0 device: amdgpu temp: 33.0 C
Repos:
  Packages: 2775 apt: 2762 flatpak: 9 snap: 4
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/additional-repositories.list
    1: deb https://dl.winehq.org/wine-builds/ubuntu/ jammy main
  No active apt repos in: /etc/apt/sources.list.d/amdgpu-proprietary.list
  Active apt repos in: /etc/apt/sources.list.d/amdgpu.list
    1: deb https://repo.radeon.com/amdgpu/22.20/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http://packages.linuxmint.com vanessa main upstream import backport
    2: deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/vscode.list
    1: deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
Info:
  Processes: 234 Uptime: 10m wakeups: 0 Memory: 13.57 GiB used: 1.26 GiB (9.3%) Init: systemd
  v: 249 runlevel: 5 Compilers: gcc: 11.2.0 alt: 11/9 Shell: Bash v: 5.1.16
  running-in: pty pts/0 (SSH) inxi: 3.3.13
What I want is a way to either disable the integrated graphics or set the dedicated GPU as the default OpenGL renderer.
Last edited by SMG on Tue Oct 04, 2022 9:09 pm, edited 1 time in total.
Reason: Moved from Software & Applications to Graphics Cards & Monitors because this is a GPU-related issue.
User avatar
SMG
Level 23
Level 23
Posts: 19053
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: How can I select a primary GPU by the PCIe ID?

Post by SMG »

coolpx wrote:
Tue Oct 04, 2022 9:07 pm
So, I have two AMD GPUs in my system right now. One is integrated Vega 3 graphics, and the other is an RX 6500 XT. Everything I've found online about selecting a primary GPU or disabling one does it by AMD/Intel/NVIDIA or driver, but both GPUs in my case are AMD cards running on the amdgpu driver.
Welcome to the forum, coolpx.

The tutorial I created does address that type of issue How to switch to the dedicated GPU on a laptop with Intel-AMD switchable graphics or AMD-AMD switchable graphics.

Did that not come up in your searches or did it not help? If you have any questions about that information, just ask them in this thread.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
coolpx
Level 1
Level 1
Posts: 5
Joined: Tue Oct 04, 2022 8:45 pm

Re: How can I select a primary GPU by the PCIe ID?

Post by coolpx »

Thank you for the reply. Your tutorial didn't appear in search results, but neither method worked for me. My BIOS doesn't allow me to disable the iGPU and DRI_PRIME didn't seem to have any effect. I did some further Googling and found this Ubuntu help page. My dedicated GPU is not on the list of cards with "good 3D acceleration support" in amdgpu, so that could have some effect on DRI_PRIME working or not. I'll try out nouveau since every other AMD driver seems pretty outdated.
User avatar
SMG
Level 23
Level 23
Posts: 19053
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: How can I select a primary GPU by the PCIe ID?

Post by SMG »

coolpx wrote:
Tue Oct 04, 2022 10:02 pm
My dedicated GPU is not on the list of cards with "good 3D acceleration support" in amdgpu, so that could have some effect on DRI_PRIME working or not.
The link you provided does not even have Linux Mint 21 / Ubuntu 22.04 on it, so I'm not sure to what you are referring.
coolpx wrote:
Tue Oct 04, 2022 10:02 pm
I'll try out nouveau since every other AMD driver seems pretty outdated.
I'm not sure I understand your statement here. nouveau is for Nvidia GPUs so it does not apply in your case.

What do you mean when you say "every other AMD driver seems pretty outdated"? The AMD driver is in the kernel and you are using the 5.15 kernel so your driver is just about the latest available. It is not outdated at all.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
SMG
Level 23
Level 23
Posts: 19053
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: How can I select a primary GPU by the PCIe ID?

Post by SMG »

coolpx wrote:
Tue Oct 04, 2022 10:02 pm
Thank you for the reply. Your tutorial didn't appear in search results, but neither method worked for me.
I think you should describe what criteria you are using to say it didn't work for you.

Please run DRI_PRIME=1 in a terminal and provide the output of glxinfo -B.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
coolpx
Level 1
Level 1
Posts: 5
Joined: Tue Oct 04, 2022 8:45 pm

Re: How can I select a primary GPU by the PCIe ID?

Post by coolpx »

SMG wrote:
Tue Oct 04, 2022 10:08 pm
The link you provided does not even have Linux Mint 21 / Ubuntu 22.04 on it, so I'm not sure to what you are referring.
I should have realized, it invalidates the entire list. It's very likely if it doesn't include a release from May of 2022 it won't include a GPU from January of 2022.
SMG wrote:
Tue Oct 04, 2022 10:08 pm
I'm not sure I understand your statement here. nouveau is for Nvidia GPUs so it does not apply in your case.
I barely have any experience with GPU drivers on Linux, so please forgive me if I come off as a bit incompetent.
SMG wrote:
Tue Oct 04, 2022 10:08 pm
What do you mean when you say "every other AMD driver seems pretty outdated"? The AMD driver is in the kernel and you are using the 5.15 kernel so your driver is just about the latest available. It is not outdated at all.
It seems like radeon and amdgpu-pro haven't received any updates lately.
Do you think updating my kernel could fix it? My graphics card is from 19 January 2022, while kernel 5.15 is from 31 October 2021. I upgraded from Linux Mint 20.3 to 21 because I got nothing on kernel 5.4, and while I get output from the card's HDMI port, it runs at the same speed as the iGPU.
User avatar
SMG
Level 23
Level 23
Posts: 19053
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: How can I select a primary GPU by the PCIe ID?

Post by SMG »

coolpx wrote:
Tue Oct 04, 2022 10:24 pm
It seems like radeon and amdgpu-pro haven't received any updates lately.
I don't know what you mean by radeon. It can be used in at least two different contexts.

The radeon graphics driver is for much older hardware. Newer hardware uses the amdgpu driver.
coolpx wrote:
Tue Oct 04, 2022 10:24 pm
My graphics card is from 19 January 2022, while kernel 5.15 is from 31 October 2021.
You are using a 5.15 kernel maintained by Canonical and not the mainline kernel from last year.
coolpx wrote:
Tue Oct 04, 2022 10:24 pm
I upgraded from Linux Mint 20.3 to 21 because I got nothing on kernel 5.4, and while I get output from the card's HDMI port, it runs at the same speed as the iGPU.
What do you mean it runs at the same speed. What is "it"?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
coolpx
Level 1
Level 1
Posts: 5
Joined: Tue Oct 04, 2022 8:45 pm

Re: How can I select a primary GPU by the PCIe ID?

Post by coolpx »

SMG wrote:
Tue Oct 04, 2022 10:48 pm
What is "it"?
"It" is the video output. Whether DRI_PRIME is on or off, I get the same performance in any game I've tested, and oddly 5000 more FPS in glxgears with DRI_PRIME set to 0. The GPU does appear in /dev/dri, but lshw says it has a 33MHz clock.
User avatar
SMG
Level 23
Level 23
Posts: 19053
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: How can I select a primary GPU by the PCIe ID?

Post by SMG »

coolpx wrote:
Wed Oct 05, 2022 9:11 am
Whether DRI_PRIME is on or off
Please supply the

Code: Select all

glxinfo -B
output for each of those options.
coolpx wrote:
Wed Oct 05, 2022 9:11 am
I get the same performance in any game I've tested
Which may or may not be relevant to the renderer. Many games require settings within the games preferences to be set before a specific renderer is used. Please give some example games you are trying.
coolpx wrote:
Wed Oct 05, 2022 9:11 am
The GPU does appear in /dev/dri, but lshw says it has a 33MHz clock.
What is the relevance of this to the discussion? I am not familiar with checking that to select the GPU being used.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
coolpx
Level 1
Level 1
Posts: 5
Joined: Tue Oct 04, 2022 8:45 pm

Re: How can I select a primary GPU by the PCIe ID?

Post by coolpx »

Unity and OpenGL use integrated graphics and Vulkan games use the dedicated GPU. glxinfo -B gives me the same output with DRI_PRIME set to 0 or 1. The GPU appearing in /dev/dri but lshw stating incorrect specifications could imply something wrong with the driver.
User avatar
SMG
Level 23
Level 23
Posts: 19053
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: How can I select a primary GPU by the PCIe ID?

Post by SMG »

coolpx wrote:
Wed Oct 05, 2022 4:04 pm
Unity and OpenGL use integrated graphics and Vulkan games use the dedicated GPU.
You keep saying things with no data at all to back up your statements and given your earlier statement of "I barely have any experience with GPU drivers on Linux" I don't know that you are using the correct criteria. You might be, but without data I can not confirm that.
coolpx wrote:
Wed Oct 05, 2022 4:04 pm
glxinfo -B gives me the same output with DRI_PRIME set to 0 or 1.
Then it sounds like that is not working. I do not know the specifics of your motherboard to know how it handles dual graphics (onboard plus PCIe). Not all motherboards handle that type of situation the same way.

The graphics data you posted with inxi was not taken the proper way so the OpenGL data is missing. It's fine if you don't want to provide data, but I can not help you if you do not provide data.

The data you did provide shows you appear to have attempted to install the AMD drivers from their website, but the kernel drivers are the ones which are loaded. Quite a few people have been having issue getting the AMD drivers from their website to install properly. Apparently there are problems with the packages from AMD. I do not know when that will be fixed. However, the drivers from the kernel should work and those drivers are also from AMD because AMD gives the drivers to the kernel developers.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Post Reply

Return to “Graphics Cards & Monitors”