Switch between graphical cards (integrated Intel / NVidia)

Hello,

I just installed the last OpenSuse Tumbleweed on my computer, and I noticed that OpenSuse is using my integrated Intel graphical card by default.

This prevent me to use dual screen, dans my NVidia GeForce RTX is really more interesting to use.

How can I force OpenSuse to use only my NVidia card, so I can have good performances and use my dual screen ? Which command lines can I use to do that ?

Thanks

@Nilsson84 Hi and welcome to the Forum :smile:
What is your Laptop/Desktop model?

When you say dual screen, what do you mean, perhaps you can show the output from inxi -GSaz.

There are a multitude of different ways to use both gpuā€™s depending on the hardware setup and you use case for applications, eg suse-prime or switcherooctl, BIOS settings etcā€¦

There are also a number of recent Forum threads on dual graphics you may wish to peruse.

1 Like

Hi Malcolm :grin:

Thanks for your answer ! My laptop model is Dell G7 17, below you can find more informations :
Operating System: openSUSE Tumbleweed 20240628
KDE Plasma Version: 6.1.1
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.6-1-default (64-bit)
Graphics Platform: X11
Processors: 12 Ɨ IntelĀ® Coreā„¢ i7-10750H CPU @ 2.60GHz
Memory: 15.4 Gio of RAM
Graphics Processor: Mesa IntelĀ® UHD Graphics
Manufacturer: Dell Inc.
Product Name: G7 7700

Since I tried the command prime-select nvidia, I donā€™t see my second screen any more in the System configuration any more :smiling_face_with_tear: Anyway, here is the output of the command inixi -GSaz :
Device-1: Intel CometLake-H GT2 [UHD Graphics] vendor: Dell driver: i915

  • v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports:*
  • active: eDP-1 empty: none bus-ID: 00:02.0 chip-ID: 8086:9bc4*
  • class-ID: 0300*
  • Device-2: NVIDIA TU104M [GeForce RTX 2070 SUPER Mobile / Max-Q]*
  • vendor: Dell driver: N/A alternate: nouveau, nvidia_drm, nvidia*
  • non-free: 550.xx+ status: current (as of 2024-06; EOL~2026-12-xx)*
  • arch: Turing code: TUxxx process: TSMC 12nm FF built: 2018-2022 pcie:*
  • gen: 3 speed: 8 GT/s lanes: 8 link-max: lanes: 16 bus-ID: 01:00.0*
  • chip-ID: 10de:1e91 class-ID: 0300*
  • Display: x11 server: X.Org v: 21.1.12 with: Xwayland v: 24.1.0*
  • compositor: kwin_x11 driver: X: loaded: modesetting dri: iris gpu: i915*
  • display-ID: :0 screens: 1*
  • Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")*
  • s-diag: 582mm (22.93")*
  • Monitor-1: eDP-1 model: AU Optronics 0x449d built: 2019 res: 1920x1080*
  • hz: 144 dpi: 128 gamma: 1.2 size: 382x215mm (15.04x8.46")*
  • diag: 438mm (17.3") ratio: 16:9 modes: 1920x1080*
  • API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris*
  • device: 1 drv: swrast gbm: drv: iris surfaceless: drv: iris x11: drv: iris*
  • inactive: wayland*
  • API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.1.2 glx-v: 1.4*
  • direct-render: yes renderer: Mesa Intel UHD Graphics (CML GT2)*
  • device-ID: 8086:9bc4 memory: 7.51 GiB unified: yes*
  • API: Vulkan v: 1.3.283 layers: 2 device: 0 type: integrated-gpu name: Intel*
  • UHD Graphics (CML GT2) driver: N/A device-ID: 8086:9bc4 surfaces: xcb,xlib*

I just tried the prime-select boot offload command but I donā€™t see any difference :
xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x42; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 3; outputs: 1; associated providers: 0; name: modesetting

  • output eDP-1*
    glxinfo | grep ā€˜OpenGL renderer stringā€™
    OpenGL renderer string: Mesa Intel(R) UHD Graphics (CML GT2)

I will investigate on existing threads too !

@Nilsson84 This is the issue Dell driver: N/A which is a result of suse-prime, which from Forum experience doesnā€™t seem to work well with the RTX gpuā€™s and also harware quirks. A quick fix it to remove suse-prime and lock, look at using switcherooctl instead and also look at setting some module parameters for the Nvidia gpuā€¦

https://en.opensuse.org/SDB:NVIDIA_Switcheroo_Control

You also excluded the /proc/cmdline info as this is also important from the inxi -GSaz info

@Nilsson84 also have a read of this thread https://forums.opensuse.org/t/extra-battery-drain-in-sleep-mode/176323

Hi Malcolm,

I just followed the steps to install switchrootctl instead of suse-prime. Unfortunately, I donā€™t see the option Launch Using Integrated or Dedicated Graphics Card. Moreover, after uninstalling suse-prime, I saw my second screen in Display configuration - although I cannot extend my desktop to this second screen.

After installing switchrootctl, it is like the OS doesnā€™t detect my second screen anymore.

Below are some informations I see on my system :

xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x42; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 3; outputs: 1; associated providers: 1; name: modesetting
output eDP-1
Provider 1: id: 0x26c; cap: 0x2 (Sink Output); crtcs: 4; outputs: 7; associated providers: 1; name: NVIDIA-G0
output DP-1-0
output DP-1-1
output HDMI-1-0
output DP-1-2
output DP-1-3
output DP-1-4
output DP-1-5

glxinfo | grep ā€˜OpenGL renderer stringā€™
OpenGL renderer string: Mesa Intel(R) UHD Graphics (CML GT2)

Sorry, here is the line I excluded :

Kernel: 6.9.6-1-default arch: x86_64 bits: 64 compiler: gcc v: 13.3.0
clocksource: tsc avail: acpi_pm
parameters: BOOT_IMAGE=/boot/vmlinuz-6.9.6-1-default
root=UUID=51177c3d-a24d-4b00-b29c-cb2bbc89cb15 mitigations=auto quiet
security=apparmor nosimplefb=1

I will read the second thread you mentioned. Thanks again :grin:

@Nilsson84 So what about running switcherooctl glxinfo | grep "OpenGL renderer"

Looks like your dGPU is tied to the Nvidia cardā€¦

If you fire up nvidia-settings does it see the external monitor? What about in the Plasma settings?

@malcolmlewis, here is the result of this command :

switcherooctl glxinfo | grep ā€œOpenGL rendererā€
OpenGL renderer string: NVIDIA GeForce RTX 2070 Super/PCIe/SSE2

nvidia-settings see only my laptop dedicated monitor, and in the Plasma settings I donā€™t see my second screen anymoreā€¦

nvidia-settings

(nvidia-settings:3856): GLib-GObject-CRITICAL **: 15:44:25.490: g_object_unref: assertion ā€˜G_IS_OBJECT (object)ā€™ failed

ERROR: nvidia-settings could not find the registry key file or the X server is not accessible. This file should have
been installed along with this driver at /usr/share/nvidia/nvidia-application-profiles-key-documentation. The
application profiles will continue to work, but values cannot be prepopulated or validated, and will not be
listed in the help text. Please see the README for possible values and descriptions.

@Nilsson84 what does xrandr --listproviders and xrandr --listmonitors show?

Have you tried Wayland rather than Xorg?

It seems worth emphasizing that the page malcolmlewis linked earlier seems to indicate that switcheroo ONLY works with wayland, not X11.

FWIW I use suse-prime set to nvidia with an RTX gpu + intel integrated, and dual monitors with an external monitor, and it works fine for me.

I did used to have problems with prime-select being flaky, but have not had any problems in quite some time. But what I used to have to do was some kind of silly dance involving running ā€œprime-select unsetā€ before running ā€œprime-select nvidiaā€ and rebooting. Iā€™m sorry I donā€™t remember the exact steps of the dance, but it seemed that prime-select set commands did not always ā€œstickā€ and some combination of doing it multiple times ā€œfixedā€ something. Recheck using glxinfo | grep 'OpenGL renderer string' after running prime-select or rebooting to make sure it is still as expected.

Not true. switcherooctl works with X11 and wayland. Using it here on an Optimus laptop with Plasma X11. If you use Plasma with X!! you donā€™t have the right click menu (as in Gnome), but can easily invoke switcherooctl from the command line / application starter.

@Nilsson84 and @hui Can you both paste the output from the following command;

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

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.