User Tools

Site Tools


ubuntu:gpu:specify_which_gpu_should_take_priority

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ubuntu:gpu:specify_which_gpu_should_take_priority [2020/08/18 07:42] – created 192.168.1.1ubuntu:gpu:specify_which_gpu_should_take_priority [2020/08/18 07:43] (current) 192.168.1.1
Line 1: Line 1:
-====== Ubuntu - GPU - Determine GPU model and Driver ======+====== Ubuntu - GPU - Specify which GPU should take priority ======
  
-<code bash> +GPU-intensive applications should be rendered on the more powerful discrete card.
-sudo lshw -c video +
-</code>+
  
-returns:+If more than one GPU is install, you can specify which one should be used. 
 + 
 +---- 
 + 
 +===== Get the list of GPU drivers ===== 
 + 
 +See [[Ubuntu:GPU:Check the list of attached graphic drivers|Check the list of attached graphic drivers]] 
 + 
 + 
 +Let's assume you receive this result:
  
 <code bash> <code bash>
-  *-display                  +xrandr --listproviders 
-       description: VGA compatible controller + 
-       productNavi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] +Providersnumber 2 
-       vendorAdvanced Micro Devices, Inc. [AMD/ATI] +Provider 0: id0x7d cap0xb, Source Output, Sink Output, Sink Offload crtcs3 outputs4 associated providers1 name:Intel 
-       physical id: 0 +Provider 1id0x56 cap0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs6 outputs1 associated providers1 name:radeon
-       bus infopci@0000:0b:00.0 +
-       versionc1 +
-       width64 bits +
-       clock33MHz +
-       capabilitiespm pciexpress msi vga_controller bus_master cap_list rom +
-       configurationdriver=amdgpu latency=0 +
-       resourcesirq:115 memory:d0000000-dfffffff memory:e0000000-e01fffff ioport:e000(size=256) memory:fcb00000-fcb7ffff memory:fcb80000-fcb9ffff+
 </code> </code>
- 
-<WRAP info> 
-**NOTE:**  This shows that the driver is **amdgpu**. 
-</WRAP> 
  
 ---- ----
  
-===== Check the AMD Kernel Modules =====+===== Change using the name =====
  
 <code bash> <code bash>
-lsmod | grep amd+xrandr --setprovideroffloadsink radeon Intel
 </code> </code>
  
-returns+---- 
 + 
 +===== Change using the Provider Index =====
  
 <code bash> <code bash>
-edac_mce_amd           32768  0 +xrandr --setprovideroffloadsink 1 0
-kvm_amd                98304  0 +
-kvm                   663552  1 kvm_amd +
-amdgpu               4579328  20 +
-amd_iommu_v2           20480  1 amdgpu +
-gpu_sched              32768  1 amdgpu +
-ttm                   106496  1 amdgpu +
-drm_kms_helper        184320  1 amdgpu +
-ccp                    86016  1 kvm_amd +
-drm                   491520  10 gpu_sched,drm_kms_helper,amdgpu,ttm +
-i2c_algo_bit           16384  2 igb,amdgpu+
 </code> </code>
  
 ---- ----
  
-===== Check boot messages for more information about the graphics card driver in use =====+===== Usage ===== 
 + 
 +Use a specific card for the applications that need it the most, such as games. 
 + 
 +To select the card with Provider 1, prepend **DRI_PRIME=1**:
  
 <code bash> <code bash>
-dmesg | grep -i amdgpu+DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
 </code> </code>
  
Line 61: Line 53:
  
 <code bash> <code bash>
-[    7.899654] [drm] amdgpu kernel modesetting enabled. +OpenGL renderer stringGallium 0.4 on AMD TURKS
-[    7.899892] amdgpu 0000:0b:00.0: remove_conflicting_pci_framebuffers: bar 0: 0xd0000000 -> 0xdfffffff +
-[    7.899894] amdgpu 0000:0b:00.0: remove_conflicting_pci_framebuffers: bar 2: 0xe0000000 -> 0xe01fffff +
-[    7.899894] amdgpu 0000:0b:00.0: remove_conflicting_pci_framebuffers: bar 5: 0xfcb00000 -> 0xfcb7ffff +
-[    7.899896] fb0: switching to amdgpudrmfb from EFI VGA +
-[    7.900035] amdgpu 0000:0b:00.0: vgaarb: deactivate vga console +
-[    7.900065] amdgpu 0000:0b:00.0: enabling device (0006 -> 0007) +
-[    7.930462] amdgpu 0000:0b:00.0: VRAM: 8176M 0x0000008000000000 - 0x00000081FEFFFFFF (8176M used) +
-[    7.930463] amdgpu 0000:0b:00.0: GART: 512M 0x0000000000000000 - 0x000000001FFFFFFF +
-[    7.930796] [drm] amdgpu: 8176M of VRAM memory ready +
-[    7.930799] [drm] amdgpu: 8176M of GTT memory ready. +
-[    8.826969] amdgpu: [powerplay] smu driver if version = 0x00000033, smu fw if version = 0x00000035, smu fw version = 0x002a3200 (42.50.0) +
-[    8.826971] amdgpu: [powerplay] SMU driver if version not matched +
-[    8.839519] amdgpu: [powerplay] SMU is initialized successfully! +
-[    8.867710] snd_hda_intel 0000:0b:00.1: bound 0000:0b:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu]) +
-[    8.974665] fbcon: amdgpudrmfb (fb0) is primary device +
-[    8.974715] amdgpu 0000:0b:00.0: fb0: amdgpudrmfb frame buffer device +
-[    9.002813] amdgpu 0000:0b:00.0: ring 0(gfx_0.0.0) uses VM inv eng 4 on hub 0 +
-[    9.002815] amdgpu 0000:0b:00.0: ring 1(gfx_0.1.0) uses VM inv eng 5 on hub 0 +
-[    9.002816] amdgpu 0000:0b:00.0: ring 2(comp_1.0.0) uses VM inv eng 6 on hub 0 +
-[    9.002816] amdgpu 0000:0b:00.0: ring 3(comp_1.1.0) uses VM inv eng 7 on hub 0 +
-[    9.002817] amdgpu 0000:0b:00.0: ring 4(comp_1.2.0) uses VM inv eng 8 on hub 0 +
-[    9.002818] amdgpu 0000:0b:00.0: ring 5(comp_1.3.0) uses VM inv eng 9 on hub 0 +
-[    9.002819] amdgpu 0000:0b:00.0: ring 6(comp_1.0.1) uses VM inv eng 10 on hub 0 +
-[    9.002820] amdgpu 0000:0b:00.0: ring 7(comp_1.1.1) uses VM inv eng 11 on hub 0 +
-[    9.002820] amdgpu 0000:0b:00.0: ring 8(comp_1.2.1) uses VM inv eng 12 on hub 0 +
-[    9.002821] amdgpu 0000:0b:00.0: ring 9(comp_1.3.1) uses VM inv eng 13 on hub 0 +
-[    9.002822] amdgpu 0000:0b:00.0: ring 10(kiq_2.1.0) uses VM inv eng 14 on hub 0 +
-[    9.002822] amdgpu 0000:0b:00.0: ring 11(sdma0) uses VM inv eng 15 on hub 0 +
-[    9.002823] amdgpu 0000:0b:00.0: ring 12(sdma1) uses VM inv eng 16 on hub 0 +
-[    9.002824] amdgpu 0000:0b:00.0: ring 13(vcn_dec) uses VM inv eng 4 on hub 1 +
-[    9.002824] amdgpu 0000:0b:00.0: ring 14(vcn_enc0) uses VM inv eng 5 on hub 1 +
-[    9.002825] amdgpu 0000:0b:00.0: ring 15(vcn_enc1) uses VM inv eng 6 on hub 1 +
-[    9.002826] amdgpu 0000:0b:00.0: ring 16(vcn_jpeg) uses VM inv eng 7 on hub 1 +
-[    9.028708] [drm] Initialized amdgpu 3.35.0 20150101 for 0000:0b:00.0 on minor 0+
 </code> </code>
  
 +
 +<WRAP info>
 +**NOTE:**  Other applications will still use the default first card.  
 +
 +These settings are also lost once the X server restarts.  You may want to make a script and auto-run it at the startup of your desktop environment (alternatively, put it in /etc/X11/xinit/xinitrc.d/).
 +
 +This may reduce your battery life and increase heat though. 
 +
 +</WRAP>
 +
 +----
 +
 +===== References =====
 +
 +https://wiki.archlinux.org/index.php/PRIME
ubuntu/gpu/specify_which_gpu_should_take_priority.1597736538.txt.gz · Last modified: 2020/08/18 07:42 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki