Nvidia Optimus on MSI Laptop: Nvidia GPU not turning off when using the Intel one

I’m using Fedora 33 on my MSI GE60 Apache 2 laptop, it features an Nvidia GTX 860M discrete GPU plus an Intel 4600 CPU integrated one.

While using windows my laptop works as follow:

  • While the integated graphic processor (the intel one) is beeing used, the NVIDIA card is switched OFF, this condition is indicated by the power status LED of the laptop that is BLUE in this case and the laptop runs quiet cold;

  • While dedicated graphic processor (the Nvidia one) is beeing used, the laptop power status LED turns ORANGE signaling the Nvidia GPU has been powered ON and the laptop produces more heat.

This behavior was the same even on Fedora 33 while using Bumblebee and bbswitch kernel module, but on a clean Fedora 33 installation, following this guide:

https://rpmfusion.org/Howto/Optimus

my laptop has ALWAYS the ORANGE power status led turned ON, and produces a lot of heat, no matter if I use PrimaryGPU in order to allows to use the NVIDIA driver by default instead of the iGPU or not.

Another unwanted behavior is that without PrimaryGPU set on Nvidia Xorg conf section I can’t see most of display settings in my nvidia-settings control panel.

Aside all this unwanted side effects the system runs quiet well and the games are really fast when I request dedicated GPU to run them, instead all other processes runs on the integrated GPU if I not specify anything. I can confirm the correct behavior with the following commands:

    [andreabellitto@localhost ~]$ glxinfo|egrep "OpenGL vendor|OpenGL renderer"
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 4600 (HSW GT2)

(Intel gpu by default)

 [andreabellitto@localhost ~]$ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo|egrep "OpenGL vendor|OpenGL renderer"
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 860M/PCIe/SSE2

(Nvidia GPU if requested)

All seems to be working quiet fine except that the NVIDIA GPU will NOT be turned off COMPLETELY when not in use.

Some useful system info:

[andreabellitto@localhost ~]$ screenfetch
           /:-------------:\          andreabellitto@fedora
        :-------------------::        OS: Fedora 33 ThirtyThree
      :-----------/shhOHbmp---:\      Kernel: x86_64 Linux 5.9.12-200.fc33.x86_64
    /-----------omMMMNNNMMD  ---:     Uptime: 50m
   :-----------sMMMMNMNMP.    ---:    Packages: 2272
  :-----------:MMMdP-------    ---\   Shell: bash 5.0.17
 ,------------:MMMd--------    ---:   Resolution: 1920x1080
 :------------:MMMd-------    .---:   DE: GNOME 3.38.2
 :----    oNMMMMMMMMMNho     .----:   WM: Mutter
 :--     .+shhhMMMmhhy++   .------/   WM Theme: 
 :-    -------:MMMd--------------:    GTK Theme: Adwaita [GTK2/3]
 :-   --------/MMMd-------------;     Icon Theme: Adwaita
 :-    ------/hMMMy------------:      Font: Cantarell 11
 :-- :dMNdhhdNMMNo------------;       Disk: 184G / 871G (22%)
 :---:sdNMMMMNds:------------:        CPU: Intel Core i7-4710HQ @ 8x 2.5GHz [60.0°C]
 :------:://:-------------::          GPU: GeForce GTX 860M
 :---------------------://            RAM: 4218MiB / 15924MiB