The lspci command is based off a database of IDs. Unluckily the R7 M370 card reuses an ID from another card. But you can safely ignore the output from that command.
First of all the Lenovo e560 has what's called a hybrid graphics system, specifically the muxless kind. Some interesting reading:
https://01.org/linuxgraphics/gfx-doc...witcheroo.html
Anyway in an Ubuntu 16.04 fresh install this kinda works already. First check the output of:
Code:
$ xrandr --listproviders
Providers: number : 3
Provider 0: id: 0x6b cap: 0x9, Source Output, Sink Offload crtcs: 4 outputs: 6 associated providers: 2 name:Intel
Provider 1: id: 0x41 cap: 0x6, Sink Output, Source Offload crtcs: 2 outputs: 0 associated providers: 2 name:OLAND @ pci:0000:03:00.0
Provider 2: id: 0x41 cap: 0x6, Sink Output, Source Offload crtcs: 2 outputs: 0 associated providers: 2 name:OLAND @ pci:0000:03:00.0
Should show both, the Intel card and Radeon (OLAND) card. If the radeon one doesn't show then there's probably something wrong with the driver (in kernel or in X server).
You can also test it by installing mesa-utils package and then running:
Code:
DRI_PRIME=1 glxgears
Except it doesn't work for more than a few seconds before crashing, or even completely locking up the OS.
To solve the crashes I had to take two steps:
- Enable DRI3
- Enable Dynamic Power Management (DPM)
I read that enabling DRI3 on the Intel card helped fix the crashes from here:
https://wiki.archlinux.org/index.php...s.2Fworkspaces
So I enabled DRI3 on both the Intel and Radeon cards. For that I created the file /usr/share/X11/xorg.conf.d/20-gpu.conf with the following contents:
Code:
Section "Device"
Identifier "intel"
Driver "intel"
Option "DRI" "3"
EndSection
Section "Device"
Identifier "RADEON"
Driver "radeon"
Option "DRI3" "1"
EndSection
https://www.phoronix.com/forums/foru...lt-with-glamor
Once you reboot (or restart X) you should see the following lines in /var/log/Xorg.0.log:
Code:
$ grep 'DRI3' /var/log/Xorg.0.log
[ 36.468] (**) RADEON(G0): Option "DRI3" "1"
[ 37.649] (**) RADEON(G0): DRI3 enabled
[ 37.901] (II) intel(0): direct rendering: DRI2 DRI3 enabled
Next step is to enable DPM. Do this by adding a radeon.dpm=1 parameter to your kernel boot line. Edit /etc/default/grub and modify add it linux command line like so:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.dpm=1"
Then update grub menu:
Now try running again:
Code:
DRI_PRIME=1 glxgears
Should be able to run without crashing.
One last issue is that the Radeon card will power off after being idle for only 5 seconds:
Code:
$ cat /sys/class/drm/card0/device/power/autosuspend_delay_ms
5000
For program that's continually rendering it might not be much of an issue but some programs use the OpenGL intermittently and the card takes like 5~10 seconds to power back on after powering off. This will adjust it to 60 seconds delay instead:
Code:
echo 60000 > /sys/class/drm/card0/device/power/autosuspend_delay_ms
Bookmarks