Optimus not working properly

My laptop has a integrated amd gpu and a dedicated nvidia gpu.
I have switched to nvidia using optimus yet

glxinfo | grep -E "OpenGL vendor |OpenGL renderer"  

OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Vega 8 Graphics (radeonsi, raven, LLVM 16.0.6, DRM 3.54, 6.6.26-1-MANJARO)
 xrandr --listproviders 

Providers: number : 0

Edit: I switched from wayland to x11 and optimus started working.

Hi @Adilol, and welcome!

In order for us, or anyone for that matter, to be able to provide assistance, more information is necessary. To that end, please see:

Please also note and heed: Forum Rules - Manjaro

Hope you manage!


:bangbang: Tip: :bangbang:

To provide terminal output, copy the text you wish to share, and paste it here, surrounded by three (3) backticks, a.k.a grave accents. Like this:

```
pasted text
```

Or three (3) tilde signs, like this:

~~~
pasted text
~~~

This will just cause it to be rendered like this:

Portaest sed
elementum
cursus nisl nisi
hendrerit ac quis
sit
adipiscing
tortor sit leo commodo.

Instead of like this:

Portaest sed elementum cursus nisl nisi hendrerit ac quis sit adipiscing tortor sit leo commodo.

Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as described above.

Thereby improving legibility and making it much easier for those trying to be of assistance.


:bangbang::bangbang: Additionally

If your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:

LC_ALL=C bluetoothctl

This will just cause the terminal output to be in English, making it easier to understand and debug.

Please edit your post accordingly.

Edit:

Perhaps this helps:

Edit #2:

And/or this:

https://wiki.archlinux.org/title/NVIDIA_Optimus

What does that mean?

The default configuration would rquire using prime-run

prime-run glxinfo | grep -E "OpenGL vendor |OpenGL renderer"  

But do provide system information if you need more assistance;

mhwd -li -l
inxi -Farz

so when I run the command you referred to I do get the nvidia one

prime-run glxinfo | grep -E "OpenGL vendor |OpenGL renderer"                                   ✔ 
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1050/PCIe/SSE2

but running

lxinfo | grep "renderer"                                                                      ✔ 
    GLX_MESA_copy_sub_buffer, GLX_MESA_gl_interop, GLX_MESA_query_renderer, 
    GLX_MESA_gl_interop, GLX_MESA_query_renderer, GLX_MESA_swap_control, 
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: AMD Radeon Vega 8 Graphics (radeonsi, raven, LLVM 16.0.6, DRM 3.54, 6.6.26-1-MANJARO)

gives the amd one can you tell me the difference please thnx.

the output for

mhwd -li -l
inxi -Farz

You have a hybrid system using prime.
Thats how it works.
AMD iGPU by default, nvidia dGPU with prime-run.

This is also covered in the wiki.

What else do you need to know?

so by default i am using the amd one?
how do I switch to the nvidia one and why does xrandr shows 0 providers?

???
this is one way but not the way it works.

sudo systemctl stop optimus-manager
sudo systemctl disable optimus-manager
sudo systemctl mask optimus-manager
pamac install envycontrol
sudo envycontrol -s nvidia

reboot, make sure that you select x11-session at the login screen (left-bottom at the login screen)

echo $XDG_SESSION_TYPE && glxinfo | grep server

nvidia ? fine, it runs

1 Like

yes.

You appear to be using wayland.

Use prime-run

If you mean to switch semi-permanently … I implore you to reanalyze if you really want or need to.

If you do tools like envycontrol exist.

Please refer to the wiki.


It is indeed how it works.
You can make it work differently, true.
But that is how it works by default.

They also did not confirm they installed/enabled optimus-manager.

1 Like

a lot of users experience that the external displays work only proper if nvidia is used. prime is no solution and that is a hardware-related design.

1 Like

…huh?

tools like envycontrol are still using prime.

And, despite your belief, there do exist ways to handle external monitors plugged into the dGPU without switching tools.

Is it an easy solution applicable in some cases? Yes.

Do I think you are confused? Also yes.

(examples like here: Second screen doesn't work with proprietary drivers (Laptop with amd hybrid drivers needed) - #8 by Yochanan , and here: PRIME - ArchWiki)