Welcome to Part II of your Ubuntu install guide on the Gigabyte Aero 14. These steps will continue on those begun in Part I of this guide, and will focus entirely on getting your graphics cards working properly. By the end of this set-up you should have both your nvidia and Intel drivers working, and should be able to quickly/easily switch between driver sets with the click of a button (or a single-line command).
Before beginning this guide you should have a computer (in this case the Gigabyte Aero 14 laptop) with Ubuntu (16.04) freshly installed and ideally minimal other configuration/driver changes. If you’re continuing on from Part I of this guide, the only configuration change that should have been made so far is fixing the trackpad issue. If you don’t have a fresh install, I recommend 1) BACK UP ALL YOUR FILES and 2) purge your current graphics card drivers before we begin using the following command:
sudo apt-get remove --purge nvidia-*
Regardless of where you’re starting from, you should also PRINT A COPY OF THESE INSTRUCTIONS OR HAVE A BACK-UP COMPUTER TO LOOK THINGS UP. With that, on to the instructions:
Luckily for me (and you), I found an ALMOST perfect video guide for the configuration we’re about to do using Ubuntu’s GUI. I recommend watching the entire video before trying it out, just to get a feel for how things will go. Follow the instructions in this video (https://www.youtube.com/watch?v=5nGbWE-pvIE), with the following adjustments:
- DO NOT do sudo prime-select Intel yet (no Intel drivers were installed, so it’ll give you an error),
- Make sure to set default=nvidia (which does exactly what it says that it does) in conf file as well as making the nvidia-367 changes, and
- WAIT TO RESTART UNTIL THE VERY END.
If bumblebee freezes on add user $USER to bumblebee (this happened to me 3/4 of the time in various install attempts), run:
sudo rm *
sudo gpasswd -a $USER bumblebee
sudo gpasswd -a $USER video
If for some reason the instructions above don’t work for you, I would suggest wiping and trying the same steps above again from scratch. If that isn’t an option or still doesn’t work, there is an alternative command-line-only version below. Note: lines starting with a # are comments, and should not be typed as is:
sudo apt-add-repository ppa:graphics-drivers
sudo apt-add-repository bumblebee/testing #/stable wasn't working
sudo apt-add-repository ppa:nilarimogard/webupd8
sudo apt-get update
#Before the next step you can check the available driver versions using: apt-cache search nvidia
sudo apt-get install nvidia-367 bumblebee-nvidia bbswitch-dkms prime-indicator
# This is a placeholder for where you'd install Intel drivers and Intel-microcode
sudo prime-select intel
If after some/all of the steps above everything is working, congratulations! If not, don’t feel bad – I probably tried 10 different things before I got everything working stably.
If your computer crashed -or- after restarting you are either unable to boot into Ubuntu or boot to an entirely black screen, don’t panic. You can recover from this without wiping and starting over. All you need to do is enter “Recovery Mode” from the GRUB menu. As a reminder, the GRUB menu is the black screen after starting up your computer where you select your operating system, and the correct option is the line that ends with the text “(recovery mode).” Select the “dpkg” option to repair broken packages. The repair should semi-automatically fix any packages that got broken (probably xserver xorg/Intel graphics related). Picture below so you know you’re in the right spot:
If after all of the above your computer still aren’t working properly, drop me a comment below and I’ll see if I can help or at least point you to some other resources.
Once you think things are working, check if Nvidia graphics card is on:
If you’ve made it to this point, and things are working, hurray! You can stop here if you’re happy. However, the last step is to set specific programs to automatically run with specific graphics cards (you can already do this manually from the command line at this point, but that’s just not ideal in my mind) without logging out.
Unfortunately, during the time I was fiddling with this is when my keyboard turned out to be defective…and I had to send in my laptop for repairs (which took a month including shipping), so I never got to find a solution. The terms to google here are bumblebee + optirun / primus (note: be aware that as Bumblebee is using low-level hardware information, it is impossible to run it in a virtual machine). Hopefully I’ll have more time in the coming weeks to figure this out/update the guide. In the meantime, if you try this step on your own, please leave comments of successes/failures in the comments below 🙂 . Possible useful link:
Part III of this guide will address battery life issues and miscellaneous configurations.