I am running Ubuntu 20.04 on Dell Inspirion 15 5000 series which has a hybrid graphics system (Intel as integrated and AMD Radeon R7 M445 as dedicated). It appears however that only the integrated is used. Switching the GPU using the switcheroo mechanism, as described in https://help.ubuntu.com/community/HybridGraphics did not solve the problem. After each 'switch' back an forth the output of
sudo cat /sys/kernel/debug/vgaswitcheroo/switch
remained unchanged:
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynOff:0000:01:00.0
I also gave the DRI_PRIME=1 environment a go (followed by running given application/software) but the discrete GPU was still not active.
There is a guide showing how to install AMD drivers on Ubuntu 20.04:
https://linuxconfig.org/amd-radeon-ubuntu-20-04-driver-installation
I am using the drivers that come installed by default. To check if the amdgpu driver is indeed installed I ran sudo lshw -c video
which resulted in
*-display
description: VGA compatible controller
product: HD Graphics 620
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 02
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:130 memory:de000000-deffffff memory:b0000000-bfffffff ioport:f000(size=64) memory:c0000-dffff
*-display
description: Display controller
product: Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 0
bus info: pci@0000:01:00.0
version: c3
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi bus_master cap_list rom
configuration: driver=amdgpu latency=0
resources: irq:132 memory:c0000000-cfffffff memory:d0000000-d01fffff ioport:e000(size=256) memory:df200000-df23ffff memory:df240000-df25ffff
Good news that the driver amdgpu is there but how to put it to work is still beyond my understanding. The problem doesn't seem to be unique for Ubuntu 20.04, since I had the same issue with 18.04 which I could not resolve. Suggestions?
You can run programs using your AMD GPU by addyng
DRI_PRIME=1
prefix.E..g.
You can check that the AMD GPU is in use by running
Running Linux Mint 20 based on Ubuntu 20.04 over here, but I am pretty sure it is the same.
Ok, I had the same problem. I have fixed it in the sense that the
# echo ON > /sys/kernel/debug/vga_switcheroo/switch
and related commands are now working and the non-integrated ("discrete") is the one working by default. What I still don't know is how to get automatic switching between the two or if that is even possible.
First, it seems that you need to have
radeon.runpm=0
as a grub boot parameter for these command to work (don't forget to runsudo update-grub
after you have modified the/etc/default/grub
file.)Note that I am using the
radeon
driver here so you may want to tryamdgpu.runpm=0
or switch (back?) to theradeon
driver.From what I understand it disables some kind of power management (pm?) by the driver but this is just a guess.
Second, those commands need to be run as root by switching to the root user with
sudo su
. I imagine it is extra security that thesudo
command will not work as a regular user (Permisson denied
).After that, I did put DRI_PRIME=1 in the
/etc/environment
file and rebooted.Now both gpu seem to be powered (
Pwr
?) when I runcat /sys/kernel/debug/vgaswitcheroo
(as root).Note also that I have it listed the other way around as
I have NO idea it it changes anything.
When I run
glxheads
, it uses the AMD gpu. When I typeabout:support
in Firefox's bar, the AMD gpu is detected.When I run
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
(as root), the X server crashes and then ask me if I want to run in fallback mode, so it does seem to actually turn off the graphic card that is in use.I dit not notice any performance change but I am not playing video games either.
All corrections, precisions, explanations are more than welcome
I just found a listing of the vgaswticheroo commands at : https://www.kernel.org/doc/html/v4.14/gpu/vga-switcheroo.html
I should add that VLC
Automatic
option for the hardware-accelerated decoding setting did not work for me. Other options worked, but for other it apparently fails and fall back on the integrated gpu.