7

My laptop has a dedicated GPU, it is an AMD Radeon HD 6300. How can I test it with glmark2?
By default it is using the iGPU. glmark2 man page doesn't show an option to choose the dGPU.

David Foerster
  • 35,754
  • 55
  • 92
  • 145
Necktwi
  • 1,047
  • 2
  • 14
  • 28

2 Answers2

9

Launch the benchmark using the dGPU with the DRI_PRIME=1 option:

DRI_PRIME=1 glmark2

Edit : This answer is from mid 2018 when Xorg was the default session.

This means the solution is valid if the system is running a Xorg session.

cl-netbox
  • 30,845
  • 7
  • 93
  • 131
  • This works perfectly. Thank you @cl-netbox –  Jul 06 '18 at 11:06
  • 2
    didn't work for me on ubuntu 21.10 – fccoelho Mar 12 '22 at 20:30
  • 1
    Also did not work on (x)ubuntu 22.04 LTS – demaniak Jan 27 '23 at 08:10
  • 1
    didn't work for me on ubuntu 22.04. answer by @demaniak did work. – rrosa Aug 11 '23 at 20:58
  • 1
    @rrosa (and demaniak and fccoelho) : You are running a Wayland session, correct ? Didn't you see that I posted the answer five years ago ? At that time the default session was Xorg ! So - "didn't work for me" (and a downvote) might not be appropriate ... right ? :) – cl-netbox Aug 12 '23 at 12:15
  • i'm sorry for that, the comment was suggested by askubuntu automation. i thought it was protocol to explain why. Regarding the downvote, I was trying to get the "selected answer" (or at least the one with most votes) to be the one that works today. i've removed the downvote, didn't intend to be offensive. – rrosa Aug 14 '23 at 23:27
  • Thank you @rrosa ! :) – cl-netbox Aug 15 '23 at 09:53
3

I'm on Xubuntu (22.04 Jammy). My laptop has an AMD Integrated graphics chip, and a nVidia RTX3070 discrete graphics accelerator.

I have the proprietary nVidia drivers installed.

This worked for me:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glmark2

Ref: How NVIDIA On-Demand option works in NVIDIA X Server Settings?

Note: I should also maybe mention:

  • BIOS graphics is set to Hybrid
  • in nvidia-settings it is set to "On Demand"
demaniak
  • 131
  • 5
  • One weird thing though - the glmark2 score when run with the AMD integrated graphics, was for some reason significantly higher than when running with the above settings. Like 9806 vs 2537. – demaniak Jan 27 '23 at 08:55
  • this has crashed my Xorg session :-o – Palo Mar 13 '23 at 15:36