Score:0

Internal graphics considered primary, even though when discrete graphics is present

td flag

I have Lenovo Ideapad 300, with Intel internal graphics along with AMD radeon discrete one. But many a times I face problem with obtaining proper graphical optimization in Linux (very much so in Linux mint, which forced me to get back into Ubuntu, but faca further issues). Manytimes the system cannot detect the discrete graphics and runs everything on the internal one. After some searching I obtained this.

lsmod | grep amd in my Ubuntu 22.04 returns

amdgpu               9863168  0
iommu_v2               24576  1 amdgpu
gpu_sched              45056  1 amdgpu
drm_ttm_helper         16384  2 amdgpu,radeon
ttm                    86016  4 amdgpu,radeon,drm_ttm_helper,i915
drm_kms_helper        311296  3 amdgpu,radeon,i915
i2c_algo_bit           16384  3 amdgpu,radeon,i915
drm                   622592  14 gpu_sched,drm_kms_helper,amdgpu,radeon,drm_ttm_helper,i915,ttm

Which clearly says that my discrete graphics is visible to the operating system, even - dpkg -l xserver-xorg-video-amdgpu returns

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                      Version           Architecture Description
+++-=========================-=================-============-=======================================
ii  xserver-xorg-video-amdgpu 22.0.0-1ubuntu0.1 amd64        X.Org X server -- AMDGPU display driver

Which also finds my discrete graphics. But when I run glxinfo | grep -iE 'vendor:|device:|version:' after installing mesa-utils I face :

GLX version: 1.4
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) HD Graphics 520 (SKL GT2) (0x1916)
    Version: 22.0.5
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2

Which says that it cannot detect the discrete graphics and detects rather the internal Intel Graphics that's present in it.

What am I missing here?

Besides, isn't there any GUI or at least htop -type of terminal based Graphics utility software for AMD graphics in Linux?

Score:1
cc flag

Laptops typically use the Intel for display and the discrete GPU for the heavy work, but I too have noticed my Nvidia GPU is no longer used all the time I expect it to be used

To should show the situation:

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x45 cap: 0x9, Source Output, Sink Offload crtcs: 4 outputs: 3 associated providers: 1 name:modesetting
Provider 1: id: 0x250 cap: 0x2, Sink Output crtcs: 4 outputs: 6 associated providers: 1 name:NVIDIA-G0

Which is the reverse of what you typically want. When I initially discovered this in 22.04, it seemed the power option of performance would reverse the offload, but that no longer happens. You can force the switch on individual programs with:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia <program>  

Maybe just set these environment variables in your .profile and export them to catch every program, but I haven't done that yet. Things like the CUDA samples now require the prepending of the environment variables to run.

Switching to amd I'd guess instead of nvidia.


If the output of xrandr is not like the above, then maybe you are not running X, but Wayland. Try switching to the xorg or non-wayland choice at the login password prompt by clicking on the little gear in the lower right corner.

prikarsartam avatar
td flag
but `xrandr --listproviders` returns me ```Providers: number : 0``` - which confuses me further.
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.