How to Use NVIDIA graphics only with NVIDIA Optimus?

The first result:

inxi --admin --verbosity=7 --filter --no-host --width
System:
  Kernel: 6.6.32-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.1.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64
    root=UUID=ec779e91-f4d7-494e-925a-dd52a1046a8c rw quiet apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: Cinnamon v: 6.0.4 tk: GTK v: 3.24.42 wm: Muffin v: 6.0.1
    tools: cinnamon-screensaver vt: 7 dm: LightDM v: 1.32.0 Distro: Manjaro
    base: Arch Linux
Machine:
  Type: Laptop System: Micro-Star product: GF63 Thin 10SCXR v: REV:1.0
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Micro-Star model: MS-16R4 v: REV:1.0 serial: <superuser required>
    part-nu: 16R4.1 uuid: <superuser required> UEFI: American Megatrends
    v: E16R4IMS.105 date: 04/17/2020
Battery:
  ID-1: BAT1 charge: 34.7 Wh (100.0%) condition: 34.7/51.3 Wh (67.6%)
    volts: 12.7 min: 11.4 model: MSI Corp. MS-16R4 type: Li-ion serial: N/A
    status: full
Memory:
  System RAM: total: 32 GiB available: 31.17 GiB used: 2.24 GiB (7.2%)
  Message: For most reliable report, use superuser + dmidecode.
  Array-1: capacity: 32 GiB slots: 2 modules: 2 EC: None
    max-module-size: 16 GiB note: est.
  Device-1: ChannelA-DIMM0 type: DDR4 detail: synchronous size: 16 GiB
    speed: 2667 MT/s volts: note: check curr: 1 min: 1 max: 1 width (bits):
    data: 64 total: 64 manufacturer: Crucial part-no: CT16G4SFRA266.C8FE
    serial: <filter>
  Device-2: ChannelB-DIMM0 type: DDR4 detail: synchronous size: 16 GiB
    speed: 2667 MT/s volts: note: check curr: 1 min: 1 max: 1 width (bits):
    data: 64 total: 64 manufacturer: Crucial part-no: CT16G4SFRA266.C8FE
    serial: <filter>
CPU:
  Info: model: Intel Core i7-10750H bits: 64 type: MT MCP arch: Comet Lake
    gen: core 10 level: v3 note: check built: 2020 process: Intel 14nm family: 6
    model-id: 0xA5 (165) stepping: 2 microcode: 0xFA
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB
    L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 809 high: 912 min/max: 800/5000 scaling:
    driver: intel_pstate governor: powersave cores: 1: 800 2: 800 3: 912 4: 800
    5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800 bogomips: 62431
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush
    clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64
    dtherm dts epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu
    fsgsbase fxsr ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs
    ibrs_enhanced ida intel_pt invpcid lahf_lm lm mca mce md_clear mmx monitor
    movbe mpx msr mtrr nonstop_tsc nopl nx ospke pae pat pbe pcid pclmulqdq
    pdcm pdpe1gb pebs pge pku pln pni popcnt pse pse36 pts rdrand rdseed
    rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3
    stibp syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx
    vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: Enhanced IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS; IBPB: conditional;
    RSB filling; PBRSB-eIBRS: SW sequence; BHI: SW loop, KVM: SW loop
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel CometLake-H GT2 [UHD Graphics] vendor: Micro-Star MSI
    driver: i915 v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20
    ports: active: HDMI-A-2 off: eDP-1 empty: DP-1,HDMI-A-1 bus-ID: 00:02.0
    chip-ID: 8086:9bc4 class-ID: 0300
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q]
    vendor: Micro-Star MSI driver: nvidia v: 550.90.07
    alternate: nouveau,nvidia_drm 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: 1 speed: 2.5 GT/s lanes: 16 link-max: gen: 3
    speed: 8 GT/s bus-ID: 01:00.0 chip-ID: 10de:1f99 class-ID: 0302
  Display: x11 server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0 driver: X:
    loaded: modesetting,nvidia alternate: fbdev,nouveau,nv,vesa dri: iris
    gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1200 s-size: <missing: xdpyinfo>
  Monitor-1: HDMI-A-2 mapped: HDMI-2 pos: primary model: Samsung S24E650
    serial: <filter> built: 2016 res: 1920x1200 hz: 60 dpi: 94 gamma: 1.2
    size: 518x324mm (20.39x12.76") diag: 611mm (24.1") ratio: 16:10 modes:
    max: 1920x1200 min: 640x480
  Monitor-2: eDP-1 note: disabled model: AU Optronics 0xaf90 built: 2020
    res: 1920x1200 dpi: 142 gamma: 1.2 size: 344x193mm (13.54x7.6")
    diag: 394mm (15.5") ratio: 16:9 modes: 1920x1080
  API: EGL v: 1.5 hw: drv: intel iris drv: nvidia platforms: device: 0
    drv: nvidia device: 1 drv: iris device: 3 drv: swrast gbm: drv: kms_swrast
    surfaceless: drv: nvidia x11: drv: iris inactive: wayland,device-2
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 24.0.9-manjaro1.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel UHD Graphics (CML GT2)
    device-ID: 8086:9bc4 memory: 30.44 GiB unified: yes
Audio:
  Device-1: Intel Comet Lake PCH cAVS vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl
    bus-ID: 00:1f.3 chip-ID: 8086:06c8 class-ID: 0403
  Device-2: GN Netcom Lenovo Pro Wired Stereo VoIP Headset
    driver: jabra,snd-usb-audio,usbhid type: USB rev: 2.0 speed: 12 Mb/s lanes: 1
    mode: 1.1 bus-ID: 1-3.1.1:6 chip-ID: 0b0e:a800 class-ID: 0300
    serial: <filter>
  API: ALSA v: k6.6.32-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.0.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Comet Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:06f0 class-ID: 0280
  IF: wlo1 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Micro-Star MSI driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 3000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0 state: down mac: <filter>
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-14:3 chip-ID: 8087:0026
    class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: N/A rfk-block:
    hardware: no software: no address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 1.38 TiB used: 8.19 GiB (0.6%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Kingston
    model: RBUSNS8154P3512GJ5 size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 15.8 Gb/s lanes: 2 tech: SSD serial: <filter>
    fw-rev: E8FK12.D temp: 43.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM048-2E7172
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: HDD rpm: 5400 serial: <filter> fw-rev: 0001 scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 476.64 GiB size: 468.09 GiB (98.21%) used: 8.19 GiB (1.7%)
    fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2 label: N/A
    uuid: ec779e91-f4d7-494e-925a-dd52a1046a8c
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 296 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 label: N/A
    uuid: C0AF-3B99
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/sda1 maj-min: 8:1 size: 300 MiB fs: vfat label: N/A
    uuid: FF3C-41DF
  ID-2: /dev/sda2 maj-min: 8:2 size: 238.42 GiB fs: ext4 label: N/A
    uuid: 8c572459-880d-4989-b5e0-96ed99d23fa6
  ID-3: /dev/sda3 maj-min: 8:3 size: 8.8 GiB fs: swap label: N/A
    uuid: 42569afe-0e3a-49ef-9c01-93d866fdac4a
  ID-4: /dev/sda4 maj-min: 8:4 size: 684 GiB fs: ext4 label: misc
    uuid: f417ae0c-6b9f-45d7-affb-827b6ad26286
USB:
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 16 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-2: 1-3:2 info: Genesys Logic Hub ports: 4 rev: 2.1
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 power: 100mA
    chip-ID: 05e3:0610 class-ID: 0900
  Hub-3: 1-3.1:4 info: Genesys Logic Hub ports: 4 rev: 2.1
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 power: 100mA
    chip-ID: 05e3:0610 class-ID: 0900
  Device-1: 1-3.1.1:6 info: GN Netcom Lenovo Pro Wired Stereo VoIP Headset
    type: audio,HID driver: jabra,snd-usb-audio,usbhid interfaces: 4 rev: 2.0
    speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1 power: 100mA
    chip-ID: 0b0e:a800 class-ID: 0300 serial: <filter>
  Device-2: 1-3.1.2:7 info: Lenovo Traditional USB Keyboard
    type: keyboard,HID driver: hid-generic,usbhid interfaces: 2 rev: 2.0
    speed: 1.5 Mb/s (183 KiB/s) lanes: 1 mode: 1.0 power: 100mA
    chip-ID: 17ef:6099 class-ID: 0300
  Device-3: 1-3.3:5 info: Logitech Optical Wheel Mouse type: mouse
    driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s (183 KiB/s)
    lanes: 1 mode: 1.0 power: 100mA chip-ID: 046d:c016 class-ID: 0301
  Device-4: 1-14:3 info: Intel AX201 Bluetooth type: bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1
    power: 100mA chip-ID: 8087:0026 class-ID: e001
  Hub-4: 2-0:1 info: super-speed hub ports: 8 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-5: 2-3:2 info: Genesys Logic Hub ports: 4 rev: 3.2
    speed: 5 Gb/s (596.0 MiB/s) lanes: 1 mode: 3.2 gen-1x1 chip-ID: 05e3:0626
    class-ID: 0900
  Hub-6: 2-3.1:3 info: Genesys Logic Hub ports: 4 rev: 3.2
    speed: 5 Gb/s (596.0 MiB/s) lanes: 1 mode: 3.2 gen-1x1 chip-ID: 05e3:0626
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 45.0 C pch: 52.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Processes: 320 Power: uptime: 3m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 12.46 GiB services: csd-power,upowerd
    Init: systemd v: 255 default: graphical tool: systemctl
  Packages: pm: pacman pkgs: 1044 libs: 293 tools: pamac pm: flatpak pkgs: 0
    Compilers: N/A Shell: Bash v: 5.2.26 running-in: gnome-terminal inxi: 3.3.35

The second:

echo $XDG_SESSION_TYPE && glxinfo | grep server
x11
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:

i would recommend to use envycontrol instead of optimus. more simple, more easy. to do so install it with

pamac install envycontrol

then run

sudo envycontrol -s nvidia

reboot and check with

glxinfo | grep server

it should be nvidia instead the actual sgi (intel).
if so then success

How does work envycontrol?
Now, I have two cases:

  1. Starting games (any game) from Steam
  2. Starting a game development suite (Windows based) with wine

Must to execute any command or anything else to do this?
Or out of the box they will work?

you switch permanent to nvidia with the command given above. further help

envycontrol -h

So, it is enough to only once in the lifetime of the OS to execute the change to nvidia and I don’t have to care anymore with envycontrol?
The OS will use only the nvidia gpu after each and every boot, automatically?

exact that’s all you have to do

OK, that is I need. I am going to install that right now.

I would give you the Solution but cscs gave first timme the tip.
Thank both of you two.
The thing seems to me works well.

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