Optimus manager, switching GPU issues on Dell Inspiron 15 Gaming (7567)

If i switch Intel GPU to NVIDIA GPU, i will usually stuck on this screen. Successfully entering into the system is random, i never know if will be success or fail.
How to fix, please?

Are you sure optimus-manager has been implemented properly?
(check the project page here: GitHub - Askannz/optimus-manager: A Linux program to handle GPU switching on Optimus laptops. )
Is there a reason you need to use optimus manager as opposed to the regular just PRIME switchable graphics?

I know about prime-run command, but app will start with intel GPU, this is a reason why i use optimus manager.

Well yeah … theres no reason for your desktop, text editor, etc to use the nvidia. Its just a waste of power.
You invoke it when you need it such as for steam games or blender or something. No restart required.
But if you want to use optimus manager and its not working … all I can suggest is to double-check the configuration.
You can also probably get logs from the failed sessions to figure out whats wrong.

I Have the same notebook and installed the ’ optimus-manager’ in Hybrid mode. I start Applications and Games with this command:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia applications-name

Then whats the point?
Thats exactly how things would run without optimus-manager.
Except prime-run has a little extra magic besides your env vars…

__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia "$@"

(for vulkan)
But otherwise … you just have extra stuff for no reason :woman_shrugging:

My Nvidia X Server do not display option to use Intel 630 if i need and i don’t know why…

Is that in response to my post?
Is it related, or the same issue, or ? …
Optimus-manager attempts to forcibly set ‘only intel’, ‘only nvidia’, or ‘hybrid’ in between restarts.
The ‘hybrid’ method you are using should be the same as a regular system without optimus-manager … but I cant guess at how OM mangled it.

As far as I know that wont be an option at all … cuz … its an nvidia application that only handles nvidias.

In the Kubuntu Nvidia X Server display 3 options:

  • Performance
  • On Demand
  • Intel
    In manjaro my Nvidia X Server stay in on-demand and I’m not sure if on-demand(default) uses the Intel 630.

If you are using PRIME … then everything is using the intel until you tell it otherwise such as by using prime-run … then its using the nvidia (for that application).

ex:

glxinfo | grep renderer
prime-run glxinfo | grep renderer

You completely alright. I made some tests and with your command i confirmed. Optimus-manager is not needed. It’s a redundant procedure.

You told me this command:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia application-name

is better than prime-run, it’s correct?

1 Like

I dont think so.
prime-run is shorter … and is really just an alias for the same command with this added:

__VK_LAYER_NV_optimus=NVIDIA_only

(which wont hurt anything, but is helpful if you use vulkan)

So again … no point in not just using prime-run

NOTE … I should mention that some people who really use their machine 2 different ways at different times. Usually meaning that its a laptop to conserve power most of the time but every now and then you use it for gaming. And of those systems some are likely to get noticeable improvement in battery life if they use optimus-manager to fully shut down one card or the other between uses.

1 Like

Well, but if i want to run games from Steam. How to use prime-run? I readed wiki, but it didn’t help.

The very easiest way is to use lutris to launch steam and you can toggle prime on as well as gamemode. If you are doing it in steam then open launch options and type prime-run %command % and save it in the launch options

1 Like

It doesn’t work, i use command prime-run %command % in launch options and my games have 1 or 10fps, stuck on the Intel GPU. If i switch GPU with optimus manager, I will get 100fps. I don’t know why prime-run %command % dosen’t work. Lutris too doesn’t help.

If you are using something like optimus-manager then I dont think prime-run will work unless you are in hybrid mode.

The above method for steam is how it should work. If it doesnt … there is something wrong.
And it is covered in the wiki:
https://wiki.manjaro.org/index.php?title=Configure_Graphics_Cards#PRIME_GPU_offloading

For example, in Steam, select a game - that you want to run using your discrete Nvidia card - from the Library page of the Steam client, right-click, and select Properties. Click the SET LAUNCH OPTIONS… button and specify for the command line options followed by the default launch hook %command%.

DRI_PRIME=1 %command%

(though note … until recently PRIME was only available to opensource drivers … nvidia is newly compatible … hence the above example is using DRI_PRIME … but while proprietary nvidia works the same it uses the command prime-run)

If i use hybrid mode, prime-run works, but lower performance. If i switched to nvidia gpu by use optimus-manager, I have 93fps in the Trackmania benchmark and with prime-run i have 83fps.

I must accept slightly raw performance drop if i want to use prime-run, right?

Not usually. But it might be down to configuration.

I also use Lutris to launch my games. Different laptop, but same type of hybrid graphics with the Intel / Nvidia RTX2060 mix.

For me, I launch everything via lutris for games… to simplify my life, i set the environment variables in the Lutris global configuration:

  1. Open Lutris
  2. Hamburger Icon in top right (View Options)
  3. Preferences
  4. System Options
  5. Add the environment variables as mentioned above: __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia

It works well with Steam, GOG Galaxy, Epic Games Store, and many others. I even have the classic i enjoyed so many years ago working “Total Annihilation” (bought from GOG)

1 Like