This suggestion comes from an answer to another post on AskUbuntu. Credit to @ArnovanderWeijden:
Please keep in mind that rebooting requires you to hold the power button when it hangs. (alt+prtscn/sysrq+reisub doesn't work)
step 1: reinstall you system without swap (if you encrypt your home
directory that is)
step 2: boot into your new installation but don't log in. go to tty1
(ctrlaltf1)
step 3: upgrade your kernel to 4.7.6
step 4: reboot (and hold the power button when it hangs to kill it)
and log into tty1
step 5: install the Nvidia drivers and prime
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-367 nvidia-prime
choose lightdm when prompted
and reboot.
When grub shows up press 'e' and at the end of the line that starts with 'linux' add 'nomodeset'.
Press F10 to boot into your system
- step 8: log in (that's possible thanks to lightdm and nomodeset)
Download this and install it. (your firefox will probably not work at this point. to get it to work execute sudo chown -R $USER:$USER ~/.cache
)
sudo dpkg -i intel-grapics-update-tool_2.0.2_amd64.deb
sudo apt -f install
wget -q0 - https://download.01.org/gfx/RPM-GPG-KEY-ilg-r | sudo apt-key add -
and
#!/bin/bash
prime-select nvidia
grub-reboot 7
reboot
make them executable (and perhaps add them to visudo) and you are done!!
if steam doesn't work on intel see Edit ∞².
ooh and if sudo update-initramfs -u -k all
gives you errors you can find the missing firmware here. Read the readme file to find out how to install them (some need --install operator while others just work)