Use integrated graphics for particular program

Hi everyone!

I have integrated Intel graphics and a discrete NVIDIA card. I would like to use the NVIDIA card for everything (as it currently is) except for one program (in this case a Steam game), where I would like to use my Intel integrated graphics.

Is this possible?

Output of inxi -Ga:

  Device-1: Intel Raptor Lake-S GT1 [UHD Graphics 770] vendor: Gigabyte
    driver: i915 v: kernel arch: Gen-13 process: Intel 7 (10nm) built: 2022+
    ports: active: none empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0
    chip-ID: 8086:a780 class-ID: 0300
  Device-2: NVIDIA AD104 [GeForce RTX 4070] vendor: Gigabyte driver: nvidia
    v: 530.41.03 alternate: nouveau,nvidia_drm non-free: N/A
    status: unknown device ID pcie: gen: 1 speed: 2.5 GT/s lanes: 16 link-max:
    gen: 4 speed: 16 GT/s bus-ID: 01:00.0 chip-ID: 10de:2786 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.8 compositor: Picom v: git-b700a
    driver: X: loaded: modesetting,nvidia alternate: fbdev,intel,nouveau,nv,vesa
    dri: iris gpu: i915,nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x1080 s-dpi: 93 s-size: 1049x292mm (41.30x11.50")
    s-diag: 1089mm (42.87")
  Monitor-1: DP-0 pos: primary,left res: 1920x1080 dpi: 94
    size: 521x293mm (20.51x11.54") diag: 598mm (23.53") modes: N/A
  Monitor-2: HDMI-0 pos: right res: 1920x1080 hz: 60 dpi: 92
    size: 531x298mm (20.91x11.73") diag: 609mm (23.97") modes: N/A
  API: OpenGL v: 4.6.0 NVIDIA 530.41.03 renderer: NVIDIA GeForce RTX
    4070/PCIe/SSE2 direct-render: Yes

Yes. At least, it is advertised as such.

Install switcheroo-control.
Run man switcherooctl in terminal for usage.
In short:

  • Find your GPU identifiers:
switcherooctl list
  • Start a program manually (example):
switcherooctl launch --gpu=0 steam-game

Thanks, I was not aware of that program! Note that the service must be initiated by systemd, otherwise the output of switcherooctl list will be empty. To start the service:

systemctl start switcheroo-control.service

It reports that the Intel graphics are Device 1. However, when I run the game as instructed, the game reports it is still using the NVIDIA graphics. Steam launch options:

switcherooctl launch --gpu=1 %command%

The game is running through Wine… Maybe it’s causing issues?

I don’t know. I don’t use gaming software.
Maybe someone else could help you. :person_shrugging: