How do you switch beetween hybrid graphic cards? (Solved)

Screen resolution, 3D Acceleration, nVidia, ATI
Forum rules
Before you post please read this
stevep3129
Level 2
Level 2
Posts: 77
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: How do you switch beetween hybrid graphic cards?

Post by stevep3129 » Sun Oct 14, 2018 9:07 pm

Changed DRI_PRIME=glmark2 to DRI_PRIME=1 glmark2 .

Ran glmark2 and DRI_PRIME=1 glmark2, big difference.

steve@steve:~$ glmark2
=======================================================
glmark2 2014.03+git20150611.fa71af2d
=======================================================
OpenGL Information
GL_VENDOR: Intel Open Source Technology Center
GL_RENDERER: Mesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2)
GL_VERSION: 3.0 Mesa 18.0.5
=======================================================
glmark2 Score: 1079

steve@steve:~$ DRI_PRIME=glmark2
steve@steve:~$ DRI_PRIME=1 glmark2
=======================================================
glmark2 2014.03+git20150611.fa71af2d
=======================================================
OpenGL Information
GL_VENDOR: X.Org
GL_RENDERER: AMD ICELAND (DRM 3.23.0 / 4.15.0-36-generic, LLVM 6.0.0)
GL_VERSION: 3.0 Mesa 18.0.5
=======================================================
glmark2 Score: 470

I hope lower score is better.

Tried to attach a text file of the outputs to these commands, they are too long to just copy and paste, can't figure out how. Grab and drop doesn't work.

To summarize this; in order to run a program with the AMD gpu I'll have to:
1: Run xrandr --setprovideroffloadsink 0x3f 0x64 after boot.
2: DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
3: DRI_PRIME=1 [program name] every time I wish to use AMD gpu output.
If I missed a step please let me know.

Looks like if I want to run VLC or any other application with AMD gpu output I'll have to start it from terminal.
It could be chore to find the correct application name or can I just use the name listed in Applications?
Again big thank you to roblm for your help!

Edit
Just for the heck of it after sleep mode of about 4 Hrs. just to see if sleep mode would affect it.
I tried

Code: Select all

 DRI_PRIME=1 glmark2
It ran. Score 473.
No head banging, just a glass wine.
Always in learning mode.

User avatar
roblm
Level 9
Level 9
Posts: 2764
Joined: Sun Feb 24, 2013 2:41 pm

Re: How do you switch beetween hybrid graphic cards?

Post by roblm » Mon Oct 15, 2018 1:07 pm

stevep3129 wrote:I hope lower score is better.
Unfortunately, higher is better :( . I was surprised by the lackluster score when using AMD graphics, and I don’t have a good explanation except that perhaps PRIME GPU Offloading doesn’t work well or doesn’t work well with your hardware. The glmark2 score is obtained by running 33 tests and the fps that the GPU is able to process during each test is given. The total fps of the 33 tests is added up and then divided by 33 to get the average, which is the final score.

Intel HD Graphics 620 - glmark2 Score: 1079
AMD Radeon R7 M440/M445 - glmark2 Score: 470

According to a Dell user manaul, the Dell Inspiron 5567 has either the M440 or M445 card. These AMD cards are in the mid-range of performance. For comparison, these are the results of previous testing I did, using the same Mesa 18.0.5 version.

1. Laptop with hybrid graphics (intel+nvidia) with the same Intel HD Graphics 620 as yours:
Intel HD Graphics 620 - glmark2 Score: 1379
Nvidia GeForce GTX 1050 using the Nvidia driver - glmark2 Score: 2685

2. Desktop PC with Nvidia GeForce GT 730 card:
Using Nvidia driver - glmark2 Score: 1790
Using nouveau driver - glmark2 Score: 417

3. Desktop PC with AMD Radeon R7 240 card:
Using radeon driver - glmark2 Score: 1954
Using amdgpu driver - glmark2 Score: 2282
Using amdgpu-pro driver - glmark2 Score: 1276

Your AMD GPU is using the amdgpu driver. Ideally, you would use the Intel graphics for most tasks and switch to AMD graphics for more graphics intensive applications, but from the glmark2 results, there may be worse performance, but only one benchmark was tested. I would like to see other results in similar testing from other users.

stevep3129 wrote:To summarize this; in order to run a program with the AMD gpu I'll have to:
1: Run xrandr --setprovideroffloadsink 0x3f 0x64 after boot.
2: DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
3: DRI_PRIME=1 [program name] every time I wish to use AMD gpu output.
The second step is not needed. You can add the xrandr command to Startup Applications, so it will be automatically executed at each restart. Open Startup Apps, click the + sign and select Custom command. Add the xrandr command to the Command line.

stevep3129 wrote:Looks like if I want to run VLC or any other application with AMD gpu output I'll have to start it from terminal.
It could be chore to find the correct application name or can I just use the name listed in Applications?
Sometimes the command used to execute the app is the same as the app name; for example vlc, firefox, and gimp. Or it can be a little different; for example, libreoffice --draw for Libreoffice Draw, or a lot different; for example, mpv --player-operation-mode=pseudo-gui for mpv Media Player.

You can get the command name by opening the Menu Editor, right clicking on the app, and selecting Properties, or open the File Manager and go to /usr/share/applications, which lists all the apps on one page and right clicking on it and selecting Properties. Sometimes the command will have a %U at the end. If the app doesn’t open, then try removing the %U. For example, the command listed for mpv is mpv --player-operation-mode=pseudo-gui -- %U, but that won’t work in the Terminal unless the %U is removed.

To avoid having to use the Terminal, you can make a desktop launcher that can be clicked on to start the app. Right click on the desktop and select Create a new launcher here. Add the DRI_PRIME=1 <app-name> to the Command line. You can also change the icon by clicking on it. I think that will work but I'm not 100% certain.
Last edited by roblm on Wed Oct 17, 2018 7:19 am, edited 1 time in total.

stevep3129
Level 2
Level 2
Posts: 77
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: How do you switch beetween hybrid graphic cards?

Post by stevep3129 » Mon Oct 15, 2018 5:03 pm

Hi roblm!

Thank you for your effort to solve this problem.
Your solution works but not with the results I was hoping for. That's a bummer.
That is a hardware problem. Maybe others who use this solution will have better luck.
The good news is that I learned a lot going through this exercise.

A short summary of how to switch to AMD gpu output. I hope this works for other Mint users.

Run
xrandr --listproviders
To find the id of the gpus

Run after every boot
xrandr --setprovideroffloadsink yyyy xxxx
where xxxx is the id of provider 0
where yyyy is the id of provider 1

Run
PRIME=1 [application name]
To run desired application

See previous reply for more info on the PRIME=1 command

Once again big THANK YOU to roblm!

stevep3129
Level 2
Level 2
Posts: 77
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: How do you switch beetween hybrid graphic cards? (Solved)

Post by stevep3129 » Tue Oct 16, 2018 10:57 pm

A Post Script to my last reply.

If the solution I outlined has errors please reply and point them out and show where it is and post a correction.

Also I would appreciate a solution to increasing the performance of the AMD gpu.

Thank you.

Post Reply

Return to “Graphics Cards & Monitors”