How to find out on which card Wayland runs?

Hi everyone,
I have laptop with 2 graphic cards, integrated and dedicated GPUs, AMD and Nvidia.
I suspect Wayland runs on the dedicated card, causing the laptop to drain battery faster. Also the fans are running non stop.

I tried wayland-info but it is difficult to make any sense of the several pages of output. What should I look for?

If I understand inxi output, then my dGPU is the fist card.
That might have caused Wayland to pick dGPU by default?

espinosa-asus:/home/espinosa # inxi -G
Graphics:
  Device-1: NVIDIA AD106M [GeForce RTX 4070 Max-Q / Mobile] driver: nvidia
    v: 550.144.03
  Device-2: Advanced Micro Devices [AMD/ATI] Strix [Radeon 880M / 890M]
    driver: amdgpu v: kernel
  Device-3: Shinetech ASUS FHD webcam driver: hid-sensor-hub,usbhid,uvcvideo
    type: USB
  Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4
    compositor: kwin_wayland driver: X: loaded: modesetting,nvidia
    unloaded: vesa dri: radeonsi gpu: amdgpu resolution: 3840x2400~60Hz
  API: EGL v: 1.5 drivers: nvidia,radeonsi,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.144.03
    renderer: NVIDIA GeForce RTX 4070 Laptop GPU/PCIe/SSE2
  API: Vulkan v: 1.4.304 drivers: N/A surfaces: xcb,xlib,wayland
  Info: Tools: api: eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor wl: wayland-info
    x11: xdpyinfo, xprop, xrandr

Are you using NVIDIA PRIME?

prime-select query
xrandr --listproviders

I don’t have prime-select installed.

I’m trying to run supergfxd, an alternative tool from Asus. Though I have difficulties to run it: Supergfxd is not starting

My understanding is you cannot run Bumblebee or Prime together with Supergfxd, they are mutually exclusive.

espinosa-asus:/home/espinosa # xrandr --listproviders
Providers: number : 0
espinosa-asus:/home/espinosa # prime-select query

The program 'prime-select' can be found in following packages:
  * suse-prime [ path: /usr/sbin/prime-select, repository: download.opensuse.org-oss ]
  * suse-prime [ path: /usr/sbin/prime-select, repository: openSUSE:repo-oss ]

https://asus-linux.org/manual/supergfxctl-manual/
https://software.opensuse.org/package/supergfxctl

Ok. As your hybrid graphics is not being effectively managed currently you should stay with the other topic you have open. Until then, you’re likely using what ever graphics card is physically connected to the display output. Hopefully, someone else can advise more definitively.

This should show the current power state of each GPU…
cat /sys/class/drm/card*/device/power_state

1 Like

@deano_ferrari @espinosa_cz both inxi and lspci will show the Class ID type or if its VGA (0300), Display or 3D (320 or 380)…

inxi -GSaz or /sbin/lspci -nnk | grep -EA3 "VGA|Display|3D"

I have also found that with Nvidia GPU’s to set the environment variable MESA_VK_DEVICE_SELECT

1 Like

@malcolmlewis From my read, the OP hasn’t successfully got the hybrid graphics managed as they would like. I have no idea about about whether supergfxd is a better fit over using PRIME render offload for example. I’m sure you can assist more meaningfully here. :slight_smile:

Hybrid Nvidia/AMD are a pain power management, openCL for starters.

1 Like

@deano_ferrari

Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Wani [Radeon R5/R6/R7 Graphics]
    vendor: Hewlett-Packard driver: amdgpu v: kernel arch: GCN-3 ports:
    active: eDP-1 empty: HDMI-A-1 bus-ID: 00:01.0 chip-ID: 1002:9874
  Device-2: Advanced Micro Devices [AMD/ATI] Topaz XT [Radeon R7 M260/M265
    / M340/M360 M440/M445 530/535 620/625 Mobile] vendor: Hewlett-Packard
    driver: amdgpu v: kernel arch: GCN-3 pcie: speed: 2.5 GT/s lanes: 4
    bus-ID: 04:00.0 chip-ID: 1002:6900 temp: 37.0 C
  Device-3: Chicony HP Wide Vision HD driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 1-1.3:3 chip-ID: 04f2:b56d
  Display: wayland server: X.org v: 1.21.1.12 with: Xwayland v: 24.1.1
    compositor: gnome-shell v: 46.4 driver: X: loaded: modesetting
    alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: 0
  Monitor-1: eDP-1 model: ChiMei InnoLux 0x15c6 res: 1366x768 dpi: 101
    diag: 394mm (15.5")
  API: EGL v: 1.5 platforms: device: 0 drv: radeonsi device: 1 drv: radeonsi
    device: 2 drv: swrast gbm: drv: radeonsi surfaceless: drv: radeonsi wayland:
    drv: radeonsi x11: drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.1.3 glx-v: 1.4
    direct-render: yes renderer: AMD Radeon R5 Graphics (radeonsi carrizo LLVM
    18.1.8 DRM 3.57 6.10.3-1-default) device-ID: 1002:9874 display-ID: :0.0
  Info: Tools: api: eglinfo,glxinfo x11: xprop

switherooctl list
Device: 0
  Name:        Advanced Micro Devices, Inc. [AMD®/ATI] Wani [Radeon R5/R6/R7 Graphics]
  Default:     yes
  Environment: DRI_PRIME=pci-0000_00_01_0

Device: 1
  Name:        Advanced Micro Devices, Inc. [AMD®/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile]
  Default:     no
  Environment: DRI_PRIME=pci-0000_04_00_0

switcherooctl -g 0 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: AMD Radeon R5 Graphics (radeonsi, carrizo, LLVM 18.1.8, DRM 3.57, 6.10.3-1-default)

switcherooctl -g 1 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: AMD Radeon R7 M340 (radeonsi, iceland, LLVM 18.1.8, DRM 3.57, 6.10.3-1-default)

/sbin/lspci -nnk | grep -EA3 "VGA|Display|3D"

00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Wani [Radeon R5/R6/R7 Graphics] [1002:9874] (rev ca)
	Subsystem: Hewlett-Packard Company Device [103c:81fe]
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
--
04:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile] [1002:6900] (rev 83)
	DeviceName: AMD Radeon (TM) R7 440M
	Subsystem: Hewlett-Packard Company Device [103c:81fe]
	Kernel driver in use: amdgpu

I need to update this system, it’s running Aeon…

Let’s see if this helps the OP to make progress. :wink:

@deano_ferrari Hopefully, as you can see the second GPU is Display or if Nvidia it would be 3D (like my Nvidia Tesla P4) so it’s only used for offload and no connection to the system display connectors.

Yeah…not sure how this applies to OP’s hybrid graphics setup though. (I’ve never owned any laptop with such a setup.)

Well if either GPU is a Display or 3D Controller, then will know the other is being used for Primary graphics, the other will be pure offload

Just to clarify here, when a hybrid graphics implementation is not not managed as such, my understanding is that it will just look like two independent graphics cards to openSUSE, is that correct? To use offload (rendering via the NVIDIA GPU), PRIME is required, right?

Yes, Class-ID 300, then inxi output will show what any monitor attached is connected too.

Only switcherooctl, suse-prime, bumblebee is deprecated, the newer GPU’s in the OP’s case should be using switcherooctl.

So in my case I have three GPU’s in my desktop, one is using vfio-pci for passthrough to virtual machines;

Graphics:
  Device-1: NVIDIA TU117GLM [Quadro T400 Mobile] driver: vfio-pci v: N/A
    arch: Turing pcie: speed: 2.5 GT/s lanes: 8 bus-ID: 01:00.0
    chip-ID: 10de:1fb2
  Device-2: NVIDIA TU104GL [Quadro RTX 4000] vendor: Hewlett-Packard
    driver: nvidia v: 570.86.16 arch: Turing pcie: speed: 2.5 GT/s lanes: 16
    ports: active: none empty: DP-4, DP-5, DP-6, Unknown-1 bus-ID: 02:00.0
    chip-ID: 10de:1eb1
  Device-3: Intel DG2 [Arc A380] vendor: ASRock driver: i915 v: kernel
    arch: Xe-HPG pcie: speed: 2.5 GT/s lanes: 1 ports:
    active: DP-2,HDMI-A-1,HDMI-A-4 empty: DP-1, DP-3, HDMI-A-2, HDMI-A-3
    bus-ID: 05:00.0 chip-ID: 8086:56a5

Device 2 has no ports active and three empty, Device 3 has DP-2,HDMI-A-1,HDMI-A-4 active as I have three monitors connected… 1 via DP and the other 2 on HDMI

I think you meant switcherootctl on its own, and that the other two frameworks are deprecated, correct?

Yes, just switcherooctl. Now in saying that, it also depends on the hardware BIOS as to what can be done, I believe disabling hardware in the BIOS can cause issues, better to run and use the appropriate distribution tools.

1 Like

For the benefit of others who may come searching:

2 Likes

Could you expand on the issues or link to something This is new information to me. :eyes:

@ciello hardware design (pass through to iGPU), use it like it’s meant to be used… It’s hard to know the impact on an operating system that can potentially see the hardware and try to use it, but disabled, especially graphics, sleep/resume if used etc. It’s just an observation from Forum posts and the difficulties they seem to have with dual graphics. Intel/Nvidia or AMD/AMD seems to be more accommodating AMD/Nvidia not much so…

Edit: Google “Should I disable my iGPU”

2 Likes