LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-21-2018, 06:10 PM   #1
BenKenoobi
LQ Newbie
 
Registered: Dec 2018
Distribution: Arch
Posts: 19

Rep: Reputation: Disabled
Question Xrandr listing only 1 provider on AMD/AMD laptop


Hi all,
I am running Debian 8 "Jessie" (via Deepin 15.8).
My laptop configuration is given below :
Quote:
Model: Acer Nitro 5 AN515-42

CPU: Ryzen 5 2500U

integrated GPU : Radeon Vega 8

dedicated GPU : Radeon RX 560X
I am trying to find a way to switch from the integrated GPU to the dedicated GPU. The most promising option for me seems to be the xrandr offloadsink command.
However, when I run
Code:
xrandr --listproviders
only the integrated GPU is listed :
Quote:
Providers: number : 1
Provider 0: id: 0x55 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 2 associated providers: 0 name:Unknown AMD Radeon GPU @ pci:0000:04:00.0
How do I get xrandr to locate my dedicated GPU (which is located at PCI 0) ?

I have tried different methods to solve this but xrandr seems to be my only choice. Further, I have also confirmed that the dGPU is indeed recognized by my system:

First, I attempted to use VGA Switcheroo as described here but that failed to work as my laptop has a muxless configuration.

Second, I installed Radeontop. Radeontop indicates the RX 560X connected to PCI 0 and 1, while the Vega 8 is listed on PCI 4, which seems to be correct.
Executing either one of
Code:
sudo radeontop -b 0
sudo radeontop -b 1
brings up the radeontop screen with everything at 0%.
Interestingly, executing
Code:
sudo radeontop -b 4
throws a warning saying the GPU is older than R500 (clearly untrue), and brings up a screen with everything at 100% !

Third, I ran lspci :
Code:
lspci -k | grep -EA3 'VGA|Display'
which outputs
Quote:
01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 460] (rev c0)
Subsystem: Acer Incorporated [ALI] Baffin [Radeon RX 460/560D / Pro 450/455/460/560]
Kernel modules: amdgpu
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader (rev 01)
--
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Bridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev c4)
Subsystem: Acer Incorporated [ALI] Raven Bridge [Radeon Vega Series / Radeon Vega Mobile Series]
Kernel driver in use: amdgpu
Kernel modules: amdgpu
indicating that both the GPUs are indeed recognized, and the PCI slot of the dGPU is 0.
(the dGPU is wrongly mentioned as RX 460 but that's a driver issue so can be ignored).

PS: This is my first post here, and I'm really sorry if I've broken any of the rules.
 
Old 12-22-2018, 10:53 AM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
$ glxinfo

You might be missing some packages (drivers).

$ sudo apt-get install xserver-xorg-video-amdgpu

For my older generation, but still newer driver set AMD laptop.

$ lspci -nnk

Code:
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Carrizo [1002:9874] (rev ca)
	Subsystem: Hewlett-Packard Company Wani [Radeon R5/R6/R7 Graphics] [103c:81f9]
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
 
Old 12-22-2018, 10:57 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,978

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
Quote:
Originally Posted by BenKenoobi View Post
PS: This is my first post here, and I'm really sorry if I've broken any of the rules.
The post is ok. I wish all the users could construct initial posts like this.

I have only one question: did you try to disable the built-in VGA in BIOS?
 
Old 12-22-2018, 03:12 PM   #4
BenKenoobi
LQ Newbie
 
Registered: Dec 2018
Distribution: Arch
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Shadow_7 View Post
$ glxinfo

You might be missing some packages (drivers).

$ sudo apt-get install xserver-xorg-video-amdgpu

For my older generation, but still newer driver set AMD laptop.

$ lspci -nnk

Code:
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Carrizo [1002:9874] (rev ca)
	Subsystem: Hewlett-Packard Company Wani [Radeon R5/R6/R7 Graphics] [103c:81f9]
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
It says that the latest version of amdgpu is already installed. I am enclosing a list of other installed xorg video drivers I found by searching, are any of them incorrect ?
Quote:
xserver-xorg-video-amdgpu 18.0.1-1+b1 amd64 X.Org X server -- AMDGPU display driver
xserver-xorg-video-amdgpu-dbg 18.0.1-1+b1 amd64 X.Org X server -- AMDGPU display driver (debugging symbols)
xserver-xorg-video-ati 1:18.0.1-1+b1 amd64 X.Org X server -- AMD/ATI display driver wrapper
xserver-xorg-video-radeon 1:18.0.1-1+b1 amd64 X.Org X server -- AMD/ATI Radeon display driver
$ glxinfo|egrep "OpenGL vendor|OpenGL renderer"
gives :
Code:
OpenGL vendor string: X.Org
OpenGL renderer string: AMD RAVEN (DRM 3.23.0 / 4.15.0-29deepin-generic, LLVM 6.0.0)
$ lspci -nnk
outputs:
Quote:
01:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 460] [1002:67ef] (rev c0)
Subsystem: Acer Incorporated [ALI] Baffin [Radeon RX 460/560D / Pro 450/455/460/560] [1025:125d]
Kernel modules: amdgpu

04:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raven Bridge [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15dd] (rev c4)
Subsystem: Acer Incorporated [ALI] Raven Bridge [Radeon Vega Series / Radeon Vega Mobile Series] [1025:125c]
Kernel driver in use: amdgpu
Kernel modules: amdgpu
The dedicated GPU does not seem to be using any Kernel driver, is that normal ?

Thanks
 
Old 12-22-2018, 04:24 PM   #5
BenKenoobi
LQ Newbie
 
Registered: Dec 2018
Distribution: Arch
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
I have only one question: did you try to disable the built-in VGA in BIOS?
My BIOS doesn't seem to have any option to disable/change the primary video adapter. An option would be to blacklist the driver of my integrated card but that won't work as the dedicated card uses the same driver.

So, is there any way of unlinking (disabling) the integrated GPU given that I know its PCI address ?
 
Old 12-25-2018, 07:40 AM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
The ati and radeon drivers are moot when it's amdgpu. Different and exclusive drivers. There's also mesa drivers for software versions of things the GPU does NOT provide. Or does provide, but not yet supported in the driver(s).

$ sudo apt-get install mesa-utils

Generally grabs most of the things needed. And provides glxinfo which should let you know if DRI is enabled, generally a good sign that your drivers are present and in use if it is "Yes".

$ glxinfo | grep -i direct
Code:
direct rendering: Yes
$ glxinfo | grep -v ^\\\ | grep -v ^0 | grep -i string
Code:
server glx vendor string: SGI
server glx version string: 1.4
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
OpenGL vendor string: X.Org
OpenGL renderer string: AMD CARRIZO (DRM 3.26.0, 4.18.0-3-amd64, LLVM 7.0.1)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.2.6
OpenGL core profile shading language version string: 4.50
OpenGL version string: 4.4 (Compatibility Profile) Mesa 18.2.6
OpenGL shading language version string: 4.40
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
If the "renderer" string is Mesa then you're not using the right driver. Which would still work, but slower and perhaps not as many bells and whistles.

$ lsmod | grep -i amd
Code:
edac_mce_amd           28672  0
amdkfd                221184  1
amdgpu               3354624  3
chash                  16384  1 amdgpu
gpu_sched              28672  1 amdgpu
ttm                   131072  1 amdgpu
drm_kms_helper        196608  1 amdgpu
drm                   475136  6 gpu_sched,drm_kms_helper,amdgpu,ttm
i2c_algo_bit           16384  1 amdgpu
A 3rd column number > 0 means that it's "in use". Without said drivers almost all cards support "VESA", so you'll get output and usability, but relative to an accelerated graphics stack, notice-ably slow and relatively painful to use.

Last edited by Shadow_7; 12-25-2018 at 07:42 AM.
 
Old 12-26-2018, 01:01 AM   #7
BenKenoobi
LQ Newbie
 
Registered: Dec 2018
Distribution: Arch
Posts: 19

Original Poster
Rep: Reputation: Disabled
It says that Mesa utils is already at the latest version (8.4.0-1).

$ glxinfo | grep -i direct
Quote:
direct rendering: Yes
$ glxinfo | grep -v ^\\\ | grep -v ^0 | grep -i string
Quote:
server glx vendor string: SGI
server glx version string: 1.4
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
OpenGL vendor string: X.Org
OpenGL renderer string: AMD RAVEN (DRM 3.23.0 / 4.15.0-29deepin-generic, LLVM 6.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.4
OpenGL core profile shading language version string: 4.50
OpenGL version string: 3.0 Mesa 18.0.4
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.0.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
$ lsmod | grep -i amd
Quote:
edac_mce_amd 28672 0
kvm_amd 86016 0
kvm 593920 1 kvm_amd
amdkfd 180224 2
amd_iommu_v2 20480 1 amdkfd
amdgpu 2703360 25
chash 16384 1 amdgpu
i2c_algo_bit 16384 1 amdgpu
ttm 102400 1 amdgpu
drm_kms_helper 172032 1 amdgpu
drm 397312 13 amdgpu,ttm,drm_kms_helper
I'm starting to suspect it's an issue with the amd drivers themselves. Is there any repository from where I can manually download and install the latest amdgpu drivers ?
 
Old 12-27-2018, 06:59 AM   #8
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
You probably need the latest "kernel" and GPU drivers. It's simpler just to run something like Arch. Until what's todays arch is debian derivatives tomorrow. Although debian has testing and sid repos for similar options. I've got testing running on this laptop since gaming on debian stable with this GPU is not an option.
 
Old 12-29-2018, 02:13 AM   #9
BenKenoobi
LQ Newbie
 
Registered: Dec 2018
Distribution: Arch
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Shadow_7 View Post
You probably need the latest "kernel" and GPU drivers. It's simpler just to run something like Arch. Until what's todays arch is debian derivatives tomorrow. Although debian has testing and sid repos for similar options. I've got testing running on this laptop since gaming on debian stable with this GPU is not an option.
Yeah, it looks like the testing of the GPU drivers is still a work in progress.

The current linux kernel isn't optimized for the GPU, though there seem to be some versions of the kernel with the support. I'll try building one when I get time and update here.
 
Old 02-02-2019, 02:27 PM   #10
BenKenoobi
LQ Newbie
 
Registered: Dec 2018
Distribution: Arch
Posts: 19

Original Poster
Rep: Reputation: Disabled
OK so the problem has been solved by installing Manjaro Linux (Deepin) with Kernel 4.19.

Xrandr is listing both of the devices and I am able to use
Quote:
DRI_PRIME = 1
to run on the discrete GPU.

Radeontop also reported usage correctly.

I also successfully ran Keras over plaidml which worked pretty flawlessly on the dGPU.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Openldap - Convert single master (provider) / Consumer to Multi-master (provider) nitrohuffer2001 Linux - Software 0 12-02-2018 01:45 AM
sftp ls command, short listing vs long listing slufoot80 Linux - General 3 02-05-2013 10:40 AM
Triple Monitors Xorg with AMD&NVIDIA: XRANDR and Xinerama not working. kernel_geek Linux - Hardware 1 03-27-2011 02:07 PM
radeon and dual head, to xrandr or not to xrandr, that's the question i92guboj Linux - Desktop 1 06-17-2009 05:48 AM
xrandr not listing available resolutions correctly Mugatu Linux - Software 1 06-29-2005 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration