Ubuntu 16.04 + GTX 1060 ends up in login loop unless I "prime select" intel

Hi,

as described in the title, the outer most problem I face is that I end up in a login loop when the nvidia card is selected via “prime select”.

I have the following notebook https://www.xmg.gg/xmg-apex15 with an SSD instead of SATA and 16GB RAM configured.

When I ctrl + alt + f1 for the terminal and execute “prime select intel”, I can log in and use my notebook, but I can’t use external monitors then (I assume all the hdmi and display ports are from the 1060).
When I “prime select nvidia” after the login, I can’t open any window anymore, which lets me assume that lightdm or something like gets crashed when using the nvidia card (this is just a guess on my side).

I can not open the Nvidia X Server settings. The Icon will appear on the left side in the bar, then blink for a while and disappear without any message being displayed.

What I have tried to fix the problem so far:

  • I tried installing different driver versions reaching from 384 to 390. All versions ended up showing the same behavior
  • I verified that I have secure boot disabled in BIOS
  • I verified that I didn’t start with “nomodeset”
  • I installed tried installing the drivers via the “additional drivers” and the ppa repository, all methods ending up in the same behavior

Please find my bugreport file here: https://drive.google.com/open?id=1bvnPiLR3wX7QOZXzezLRrNxtAvZUda1V
I created this file after I verified that the login loop exists by trying to log in, then switching to the terminal with crtl + alt + f1 and executing the shell script.
I looked at the log myself but can’t really tell what the errors mean (3 EE entries), since I installed a nvidia driver and nvidia-prime.

I’m appreciating every single bit of help. Googling for 2 days now and still struggling with that Problem.

Best regards, Matthias

The kernel is too old for your intel gpu, you can enable alpha grade support using kernel parameter

i915.alpha_support=1

but better install a later kernel (4.15) from the kernel ppa.

So what I did now was switching to Fedora, which seems to run WAY better with my hardware.

Still a problem remains:

After booting, I get an error message that the nvidia driver caused a kernel module to crash, but the system recovered from it.

Here is the bug log https://drive.google.com/open?id=1wJ208u8LotppQmlLa8XKX6Mwr7ypQUB-

I can also provide the crash report if you need it.

Should I open a new thread or rename this one, because we’re not talking about Ubuntu nor a login loop anymore :D

See this thread about the problem you’re encountering:
[url]https://devtalk.nvidia.com/default/topic/1031067/linux/-linux416-nvidia-390-48-nvidia_stack_cache-rip-0010-usercopy_warn-0x7e-0xa0/[/url]

Thx a lot for the answer. The prompt disappeared by itself after another restart.