Seemingly no GPU utilisation after enabling Nvidia PRIME.

First the basics
Nvidia version: 375.26-6
Kernel version: 4.9.6-1
xorg-server v: 1.19.1-1
Distribution: Arch Linux
GPU: GTX 1060 (GP106M)
CPU: Intel i7-6700HQ
I’ve enabled PRIME synchronization (without it I had some… interesting graphical lag.)
My Xorg configuration file is as follows:

<i>##/etc/X11/xorg.conf.d/20-nvidia.conf</i>
Section "ServerLayout"
	Identifier	"layout"
	Screen 0	"nvidia" 0 0
	Inactive	"intel" 
EndSection

Section "Device"
	Identifier	"intel"
	BusID		"PCI:0:2:0"
	Driver		"modesetting"
	Option		"AccelMethod" "none"
EndSection

Section "Screen"
	Identifier	"nvidia"
	Device		"nvidia"
EndSection

Section "Device"
	Identifier	"nvidia"
	Driver		"nvidia"
	BusID		"PCI:1:0:0"
	Option		"AllowEmptyInitialConfiguration"
EndSection

Section "ServerFlags
	Option		"IgnoreABI" "1"
EndSection

Xorg.0.log shows no errors or uncommon warnings so I won’t bother including it right now.

Basically, what happens is everything is seemingly fine, and all config files are set up according to the PRIME thread (and the resources linked therein.) However GNOME Shell sits at ~10% CPU usage (or rather, always uses 1 thread 100%) and everything is a slow horrible mess.
I don’t even know where to start on this one.

Any ideas?

Ps. I’ve created a bug report with the script but I see no way of actually adding it to this post…
Edit: Also, while at it, nvidia-settings cannot find any screen information now that I’m using PRIME (it appears as usual in Xorg.0.log) and if anyone’s got any idea about that one I’m all ears.

Regards,
Kristian
nvidia-bug-report.log.gz (133 KB)

Errm, according to your logs, the display is connected to the nvidia gpu (probably switchable in bios) so you don’t need to use prime at all. All you get is kernel oopses.
So either just use a plain nvidia xorg.conf (or none at all) or switch to integrated intel gpu in bios and use prime.
By the way, IgnoreABI is not needed.

The BIOS switch lets me choose either hybrid (iGPU+dGPU) or discrete, are you saying leaving it in hybrid I do not need to follow the config steps laid out in the stickied PRIME thread and the default X configuration will be fine?

How would I then go about using the iGPU as my main GPU? That is the goal (mainly for the sake of reducing fan noise, the 1060 gets hot…)

No,
Setting ‘Discrete’ means don’t/can’t use prime, not necessary
Setting ‘Hybrid’ means prime necessary to use the nvidia gpu
Your log showed:
[ 4.763] (–) NVIDIA(GPU-0): SDC (DFP-1): connected
[ 4.763] (–) NVIDIA(GPU-0): SDC (DFP-1): Internal DisplayPort
[ 4.763] (–) NVIDIA(GPU-0): SDC (DFP-1): 1440.0 MHz maximum pixel clock
So it was switched to discrete, yet your xorg.conf was configured for prime offload. If it wasn’t, maybe bios bug.

While it is questionable to use prime on a hardware with switchable outputs.

Some more thoughts on the goal you want to achieve, three possibilities:

  1. Run without an xorg.conf and use bios-switch. ‘Hybrid’ should(?) use intel, ‘discrete’ nvidia gpu.
  2. Switch to hybrid, use bumblebee (out of the scope of this forum)
  3. Switch to hybrid,
    have two xorg.conf, one for plain intel, one for prime offload.
    to switch from nvidia to intel and other way round , you have to:
    -stop all xservers
    -switch xorg.conf
    -switch opengl implementations
    -start xserver
    optionally to save more power while on intel
    -unload nvidia modules
    -turn off nvidia gpu