Choice between intel and nvidia graphics

Hi :slight_smile:
I have problem with my graphics. I can’t choose between nvidia and intel graphics card. My laptop is launching default with intel graphics. Nvidia is disabled. All drivers are installed. I’ve installed optimus-manager-qt but isn’t working. I’ve tried to fix it but I’m doing something wrong and none graphic cards are working.
Could someone help me get started intel and nvidia graphics ?
I have intel UHD 620 and nvidia MX150.

provide output from:
mhwd-kernel -li && mhwd -l -li
pacman -Qs optimus

and use formatting for the outputs, click this icon in editor </> and copy the output there;
or use:

```
your output here
```

or:

~~~
your output here
~~~

mhwd-kernel -li && mhwd -l -li:

Currently running: 6.1.11-1-MANJARO (linux61)
The following kernels are installed in your system:
   * linux61
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
     video-modesetting            2020.01.13                true            PCI
video-hybrid-intel-nvidia-prime            2021.11.04               false            PCI


Warning: No installed USB configs!
> 0000:02:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


> 0000:01:00.0 (0302:10de:1d10) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.11.04               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.11.04               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2021.11.26               false            PCI
          video-nvidia            2021.11.04               false            PCI
    video-nvidia-470xx            2021.11.04               false            PCI
    video-nvidia-390xx            2021.11.26               false            PCI
           video-linux            2018.05.04                true            PCI


> 0000:00:02.0 (0300:8086:5917) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.11.04               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.11.04               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2021.11.26               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


pacman -Qs optimus nothing returned. I had to reinstall the system

looks ok… post also output from:
inxi -xG

and why did you had to reinstall the system?

inxi -xG:

Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Lenovo driver: i915 v: kernel
    arch: Gen-9.5 bus-ID: 00:02.0
  Device-2: NVIDIA GP108M [GeForce MX150] vendor: Lenovo driver: nvidia
    v: 525.89.02 arch: Maxwell bus-ID: 01:00.0
  Device-3: Acer EasyCamera type: USB driver: uvcvideo bus-ID: 1-8:3
  Display: x11 server: X.Org v: 21.1.7 driver: X: loaded: modesetting,nvidia
    dri: iris gpu: i915 resolution: 1600x900~60Hz
  API: OpenGL v: 4.6 Mesa 22.3.5 renderer: Mesa Intel UHD Graphics 620 (KBL
    GT2) direct-render: Yes

I had to reinstall the system because I messed up so much in the configuration and installation of various types of packages that no graphics cards were turned on anymore. I had a black screen after booting up.

ok i see…
and what exactly do you want to do? do you want to switch between gpus via optimus manager? (dont install it yet)

That’s what I mean. I followed various guides and nothing worked. When I installed optimus manager and wanted to run it, all cards turned off during startup and I had a black screen. So I had to reinstall the system. I need the option to switch to navidia gpu due to the need to do some more advanced calculations on the card.

does prime-run command work?
prime-run program_name
for example:
prime-run firefox
you can check and also post output from:
nvidia-smi

and whad DE are you running? kde/gnome/xfce?

With parametr prime-run nvidia started and everything works on nvidia graphics.

nvidia-smi:

Wed Mar  1 08:06:38 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   30C    P8    N/A /  N/A |      4MiB /  2048MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       559      G   /usr/lib/Xorg                       4MiB |
+-----------------------------------------------------------------------------+


I have KDE.

so edit the file:
kate /etc/sddm.conf
and simply put a # before the line starting with DisplayCommand and the one starting with DisplayStopCommand:
#DisplayCommand
#DisplayStopCommand
(you may not have there these lines, so proceed with installation)
save the file and install optimus:

sudo pacman -S optimus-manager optimus-manager-plasma

now add the ibt parameter:
kate /etc/default/grub
and inside this line: GRUB_CMDLINE_LINUX_DEFAULT inside the quotes add this parameter:
ibt=off
dont remove anything, just add it to existing parameters; save the file and reboot and try switching…

if you get stuck at a black screen, enter into TTY with ctrl+alt+f2 or f1-f6 keys, enter your username and password, and remove optimus:

sudo pacman -Rs optimus-manager optimus-manager-plasma

reboot:
systemctl reboot

Optimus worked. I can now switch between graphics cards. Thank you very much for your help. I am very grateful.