Intel/AMD Hybrid graphics Ubuntu 18.04
Working through a minefield of information at the moment and need help.
I've got a Dell Latitude E5570 which is setup with Hybrid graphics, Intel/AMD as such:
$inxi -Fzx
Graphics: Card-1: Intel HD Graphics 530 bus-ID: 00:02.0
Card-2: Advanced Micro Devices [AMD/ATI] Mars [Radeon HD 8670A/8670M/8750M] bus-ID: 01:00.0
Display Server: x11 (X.Org 1.19.6 ) drivers: i915,radeon Resolution: [email protected]
OpenGL: renderer: Mesa DRI Intel HD Graphics 530 (Sk
I've tried playing with switcheroo, but this doesn't seem to work. https://www.dell.com/support/article/au/en/auchn1/sln298475/a-guide-to-hybrid-video-on-dell-pcs-with-an-ubuntu-operating-system?lang=en
Also, I've installed the proprietary drivers from AMD here: https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-18.20-Early-Preview-Release-Notes.aspx
This seemed to work, however when launching steam games I received an error about OpenGL incompatibility. In an attempt to fix this, I ended up with a boot loop and a very unstable system.
EDIT - this is how I ended up boot looping.... https://linuxconfig.org/how-to-install-the-latest-amd-radeon-drivers-on-ubuntu-18-04-bionic-beaver-linux
I've now completed a fresh install and everything is back to vanilla, no other poking - looking for advice.
Just for completeness, can you also test your Steam game, whether it also runs on 100 FPS on AMD using amdgpu driver?
I've done this and can confirm that the Steam game (Portal) will easily hit 100 FPS with both the radeon and amdpgu drivers - no appreciable difference - but much less headache using the radeon drivers shipped with Ubuntu rather than the proprietary amdgpu drivers.
Solution 1:
I have the exact same setup (Intel Latitude E5570 / Hybrid graphics, Intel/AMD). I have installed Ubuntu 18.04 very recently.
Here are my experiences:
Although I marked Install third-party software for graphics and Wi-Fi hardware and additional media formats during installation, the Additional Drivers tab in Software & Updates (to reach this type software-properties-gtk
in a terminal) claims that no additional drivers are available. Did you experience the same? Maybe somebody knows why. Before installing any proprietary drivers I decided to test the vanilla installation before doing anything else.
lspci -k | grep -EA3 'VGA|Display'
gives me the following output
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
Subsystem: Dell HD Graphics 530
Kernel driver in use: i915
Kernel modules: i915
--
01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Mars [Radeon HD 8670A/8670M/8750M] (rev 81)
Subsystem: Dell Mars [Radeon HD 8670A/8670M/8750M]
Kernel driver in use: radeon
Kernel modules: radeon, amdgpu
I guess that last line about the Kernel module amdgpu means that the OpenSource drivers are installed (can anybody confirm this?). More information on AMD drivers for Ubuntu can be found here on the Ubuntu help wiki.
Aside from switcheroo there is another possibility to switch between GPUs using xrandr
:
- Hybrid Graphics | Ubuntu help wiki
- PRIME | Arch wiki
Using xrandr
(as stated in the second link) use the following command to show the providers:
xrandr --listproviders
My output was
Providers: number : 2
Provider 0: id: 0x6b cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 7 associated providers: 1 name:modesetting
Provider 1: id: 0x41 cap: 0x6, Sink Output, Source Offload crtcs: 2 outputs: 0 associated providers: 1 name:OLAND @ pci:0000:01:00.0
To be able to render GPU-intensive applications by the more powerful discrete card use
xrandr --setprovideroffloadsink 1 0
Now you should be able to choose a GPU for your application. For example you can test this with a command (using glxinfo
, sudo apt install mesa-utils
) I found here on Ubuntu Forums:
DRI_PRIME=0 glxinfo | grep "OpenGL renderer"
DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
So I have done a benchmarktest (using glmark2, sudo apt install glmark2
) for both GPUs using the following commands:
DRI_PRIME=0 glmark2 --fullscreen
DRI_PRIME=1 glmark2 --fullscreen
The resulting score was:
- 507 for Intel integrated GPU
- 367 for AMD descrete GPU
This is strange, since I thought that AMD GPU should be more performant than the integrated Intel GPU. What are your results on this? Can you confirm this?
You might also test starting Steam on the discrete GPU using the stated xrandr
commands.
Maybe I will also install the proprietary AMD GPU drivers (amdgpu-pro
) and repeat the benchmarks. I hope this is helpful, especially the parts regarding the alternative way of switching GPUs.
Solution 2:
In my case (HP 15-N, Radeon 8670m), I had the same problem, but I fixed it. Earlier it was:
$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x64 cap: 0x9, Source Output, Sink Offload crtcs: 3
outputs: 2 associated providers: 1 name:modesetting
Provider 1: id: 0x3f cap: 0x4, Source Offload crtcs: 0 outputs: 0
associated providers: 1 name:HAINAN @ pci:0000:0a:00.0
$ lspci -k | grep -EA3 'VGA|3D|Display'
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT
Integrated Graphics Controller (rev 09)
Subsystem: Hewlett-Packard Company Haswell-ULT Integrated Graphics
Controller
Kernel driver in use: i915
Kernel modules: i915
--
0a:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun
XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430] (rev ff)
Kernel driver in use: radeon
Kernel modules: radeon, amdgpu
After installing amdgru-pro
to fix it, I thought it helped, but I was wrong.
The reason is simple, amdgru-pro
doesn't work for old Video cards on Unix systems. If you install it you can face same errors like me. (Sorry that I don't have a screenshot. There was a black screen with some text, which said that I hadn't installed drivers correctly.)
After reinstalling Ubuntu, I fixed the problem by following the steps below
using listproviders
:
$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x64 cap: 0x9, Source Output, Sink Offload crtcs: 3
outputs: 2 associated providers: 1 name:modesetting
Provider 1: id: 0x3f cap: 0x4, Source Offload crtcs: 0 outputs: 0
associated providers: 1 name:HAINAN @ pci:0000:0a:00.0
After that:
$ xrandr --setprovideroffloadsink 0x3f 0x64
Test of Steam showed results (e.g. cs go on minimal-medium ~60 +- fps),
But before calling some program which needed AMD Radeon, I closed it and wrote in terminal:
$ DRI_PRIME=1 steam # or some program (e.g. openshot)
Also you can do this or check your mistake by link.