I’m honestly not sure if the issue is Prime or just the drivers.
Brand new Dell XPS 15 9560, Intel IDG and Nvidia 1050
Ubuntu 16.04.1
Kernel 4.4.0-62-generic
Without the nvidia drivers and prime, works great in “Intel mode”.
I then install the native drivers (nvidia-378, nvidia-prime, nvidia-settings). After logging in, everything is great. I checked and I was using the Nvidia drivers (the only issue being that not all screen resolutions were available).
However, anything that causes X to shutdown completely freezes the laptop - video stops, can’t ping, even the Caps lock button is disabled.
At first I couldn’t figure out the problem. I was just trying to switch from Intel to Nvidia and back and it froze. Then I went to the console to restart lightdm, which restarts X and it froze. Then I realized just logging off, which also causes X to reset made the machine freeze.
Then I simply uninstalled the Nvidia drivers and everything worked again.
Wondering if anyone else has seen anything similar. Googling the issue I do see some similar problems.
The Dell XPS 15 9560 appears to be designed for and ships with Windows 10.
If one is intent upon buying an Intel-based notebook for use with Ubuntu then a purpose-built System76 lappy is one time saving option worth checking out:
Tried with 375. Same issues. However, to add more info; when NVIDIA is selected there are no issues restarting lightdm or the computer. When you switch back to Intel you have the issues after rebooting (IOW while set to “Intel”).
Switching back to Nvidia (which will require are hard reboot), things work well again.
Want to mention once again that some display resolutions are missing, which is frustrating.
Since the driver by itself works, this forum is the wrong place for bug hunting. You would rather have to report a bug with ubuntu and their prime-select infrastructure.
The issue with resolutions missing is a prime bug, this sure has to be discussed here as it is kind of annoying. Can be worked around by generating modelines, of course.
Sooo… I installed ubuntu 17.04 on an usb drive and for me, switching works. I used the official ubuntu drivers nvidia-375. But I suspect this could be a timing problem, i.e. only apparent on fast drives, SSDs.
Could you do me a favor and
post contents of /var/log/gpu-manager.log when switched to intel
remove the file /lib/systemd/system/nvidia-persistenced.service and try to boot while switched to intel
Using a Dell XPS 15 9560 with Nvidia 1050 and a fresh install of Ubuntu 16.04.2
kernel 4.8.0-36-generic nvidia-378
Can’t reboot at the moment, but I’ll try to remove /lib/systemd/system/nvidia-persistenced.service and report back.
Eventualy I’ll try also nvidia-375 and kernel 4.9.
cat /var/log/gpu-manager.log
log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can’t access /run/u-d-c-fglrx-was-loaded file
Looking for fglrx modules in /lib/modules/4.8.0-36-generic/updates/dkms
Looking for nvidia modules in /lib/modules/4.8.0-36-generic/updates/dkms
Found nvidia module: nvidia_378.ko
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is fglrx loaded? no
Was fglrx unloaded? no
Is fglrx blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is fglrx kernel module available? no
Is nvidia kernel module available? yes
Vendor/Device Id: 8086:591b
BusID “PCI:0@0:2:0”
Is boot vga? yes
Vendor/Device Id: 10de:1c8d
BusID “PCI:1@0:0:0”
Is boot vga? no
Skipping “/dev/dri/card1”, driven by “i915”
Skipping “/dev/dri/card0”, driven by “nvidia-drm”
Skipping “/dev/dri/card1”, driven by “i915”
Skipping “/dev/dri/card0”, driven by “nvidia-drm”
Skipping “/dev/dri/card1”, driven by “i915”
Skipping “/dev/dri/card0”, driven by “nvidia-drm”
Found “/dev/dri/card1”, driven by “i915”
output 0:
card1-eDP-1
output 1:
card1-HDMI-A-1
Number of connected outputs for /dev/dri/card1: 2
Does it require offloading? yes
last cards number = 1
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards? 2
The number of cards has changed!
Has the system changed? Yes
main_arch_path x86_64-linux-gnu, other_arch_path i386-linux-gnu
Current alternative: /usr/lib/nvidia-378-prime/ld.so.conf
Current core alternative: (null)
Current egl alternative: /usr/lib/nvidia-378-prime/ld.so.conf
Is nvidia enabled? no
Is nvidia egl enabled? no
Is fglrx enabled? no
Is mesa enabled? no
Is mesa egl enabled? no
Is pxpress enabled? no
Is prime enabled? yes
Is prime egl enabled? yes
Is nvidia available? yes
Is nvidia egl available? no
Is fglrx available? no
Is fglrx-core available? no
Is mesa available? yes
Is mesa egl available? yes
Is pxpress available? no
Is prime available? yes
Is prime egl available? no
System configuration has changed
Intel IGP detected
Intel hybrid system
Nvidia driver version 378.9 detected
Invalid /sys/class/dmi/id/product_version=“”
/sys/class/dmi/id/product_name=“XPS 15 9560”
1st try: bbswitch without quirks
Loading bbswitch with “load_state=-1 unload_state=1” parameters
Removing xorg.conf. Path: /etc/X11/xorg.conf
Moved /etc/X11/xorg.conf to /etc/X11/xorg.conf.02152017
Powering off the discrete card
Disabling persistence mode
Unloading nvidia-uvm with “no” parameters
Unloading nvidia-drm with “no” parameters
Unloading nvidia-modeset with “no” parameters
Unloading nvidia with “no” parameters
gpu-manager.log looks unsuspicious.
As you have a Kaby Lake cpu it might be interesting what kind of driver the xserver uses.
Can you please post the outputs of (as root, when switched to intel):
cat /var/log/Xorg.0.log
lspci -v
cat /proc/acpi/bbswitch
cat /usr/lib/nvidia-378-prime/ld.so.conf
lsmod
dmesg
Maybe put them in a zip-archive and attach that to your post.