I have a Dell XPS-15 9560 with Windows 10 pre-installed. It has 2 graphics cards, a NVIDIA GTX 1050 and an Intel 620 Kabylake GT2.
I install ubuntu 16.04 through live-USB. The installation finishes and everything seems functional. It is using the default Intel graphics card and kernel 4.10.0-36.
When I try to shut down, this happens. I am stuck on this screen, watching these random error messages and having to force-shutdown.
-When I use an older kernel, there are no errors and it shuts down normally. I do get this screen on startup but no crashes/freezes.
-Ubuntu doesn't recognize the NVIDIA card right off the bat. When I install the proprietary nvidia drivers everything works across the board (I can even shutdown in kernel 4.10!) but the laptop is always using the NVIDIA card, meaning that I only have 1-2h battery life.
-HOWEVER, and this is the strangest part, when I try through 'NVIDIA X Settings'/'PRIME profiles' to change to the Intel card which WAS working perfectly before, all hell breaks loose. I get errors when I try to shut down, and failure on boot.
Why does the change of a kernel solve the first problem? Why when I update NVIDIA's drivers I can't go back to Intel? All this makes no sense..
I've tried everything, read through every post, followed any tactic suggested in similar posts to no avail. Any insight or ideas for further debugging would be welcome.