Score:3

How to check if Ubuntu is actually utilizing my dedicated graphics card?

us flag

I am running Ubuntu Unity 22.10 in an iMac (Late 2011 model), with an AMD Radeon HD 6750M graphics processor. Is there any way to check whether Ubuntu detects and utilizes the graphics card?

I searched for "Additional Drivers", but there are not any (I also know that the kernel supports many cards out of the box, so it may just be that Ubuntu is utilizing the card).

archisman@iMac:~$ glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: AMD TURKS (DRM 2.50.0 / 5.19.0-21-generic, LLVM 15.0.2)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.2.1
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 22.2.1
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.2.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
archisman@iMac:~$ DRI_PRIME=1 glxinfo | grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 2000 (SNB GT1)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.2.1
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.2.1
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 22.2.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
guiverc avatar
cn flag
Have you tried using just `sudo lshw -C display`, ie. list-hardware of class display; it'll show you what the kernel detected, and the `driver=` bit tells you the kernel module in use for that hardware.
hu flag
It looks like there is no additional GPU, so if there is anything on the screen, it is safe to assume the Radeon HD 6750M is in use. There aren't any "additional drivers" for a card that old. The kernel driver named "radeon" should be auto-loaded.
us flag
@guiverc I have edited the question with the terminal output. It does not show any `driver=`, but it seems that the card is being detected. You can turn your comment into an answer.
cc flag
See line configuration: depth=32 driver=radeon latency=0 resolution=1920,1080 for the driver=, and it is radeon.
us flag
@ubfan1 Thanks for pointing it out.
Score:1
us flag

As suggested by @guiverc, sudo lshw -C display shows that the radeon driver is in use.

$ sudo lshw -C display
[sudo] password for archisman: 
  *-display                 
       description: VGA compatible controller
       product: Whistler [Radeon HD 6630M/6650M/6750M/7670M/7690M]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: /dev/fb0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=radeon latency=0 resolution=1920,1080
       resources: irq:31 memory:90000000-9fffffff memory:a8800000-a881ffff ioport:2000(size=256) memory:a8820000-a883ffff
  *-display
       description: Display controller
       product: 2nd Generation Core Processor Family Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm bus_master cap_list
       configuration: driver=i915 latency=0
       resources: irq:30 memory:a8000000-a83fffff memory:a0000000-a7ffffff ioport:3000(size=64)
Levente avatar
cn flag
I believe that does not mean that the dedicated video card will actually be used. It means that it is available, but not necessarily in use. That's why there are in the dash those context menu options for various launchers: "Launch using dedicated graphics card". That suggests that unless you click that, still the integrated graphics remains preferred by the system. (Also there was some way to launch graphical programs with the dedicated graphics through the cli, by presetting an environment variable, but I don't find my notes about it (I thought I made notes, but dunno where).)
us flag
@Levente Thanks for suggesting it. If you come up with any definite answer/find your notes, feel free to post it.
Levente avatar
cn flag
Right, the env var I remembered that needed to be preset seems to be `DRI_PRIME`: in [this answer](https://askubuntu.com/a/1246127/1157519) two variants of the command will display different drivers, correspondingly: `glxinfo | grep OpenGL` will indicate that the integrated graphics responded to it, while `DRI_PRIME=1 glxinfo | grep OpenGL` will reveal the driver for the dedicated card. Apparently one can launch stuff with the dedicated card, with the `DRI_PRIME=1` cli prefix?
us flag
@Levente It seems that their roles are swapped. See the output in the updated question
Levente avatar
cn flag
O.k. I have missed your update. Anyhow, I double-checked, for me `DRI_PRIME=1` brings the dedicated card. Interesting. I might have left some abandoned config attempts here and there on my OS back when I was trying to assume control over this topic...
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.