How to Install Ubuntu 16.04 on a Gigabyte Aero 14 Laptop, Part II: Graphics Drivers and Troubleshooting

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:

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:

  1. DO NOT do sudo prime-select Intel yet (no Intel drivers were installed, so it’ll give you an error),
  2. 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
  3. 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:

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:

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.

14 comments

  1. Hi Zax. I followed the video with your instructions. At some point, I didn’t know what to do next, since there were no specific instructions about how to do this: “If bumblebee freezes on add user $USER to bumblebee (this happened to me 3/4 of the time in various install attempts), run”.

    In any case, at that point I restarted (I had finished following the video), but then Ubuntu didn’t load anymore. When I try to boot into it, I will get to the start screen, but the keyboard and trackpad won’t work, and after 20 seconds or so, the computer will freeze (I have no real way to tell if it freezes or not, other than the text cursor on the password box stops blinking). Using the recovery options doesn’t do anything (updating packages fails, and booting in failsafe graphics mode doesn’t work either.

    Any suggestions?

    1. Hey, Juan. Sorry for the delay – I was traveling.

      For the freezing on $USER part, did you try exiting the terminal and running the four lines of code from the article?

      On first restart, did any kind of restore run? If not, not sure why the trackpad wouldn’t work anymore, but the same instructions from part I should again fix the issue.

      When you try the recovery options, what specific errors are you getting?

  2. Hello,
    I m using a gigabyte aero 15 instead of the 14 , installing ubuntu went smoothly except for the usual first black screen due to nvidia drive (blacklist nouveau ) everything worked from the get go. The sole problem that I’m facing right now is the battery life that is really low I get 2 hours when fully charged , did you find any solution for this problem yet ?
    thank you again for the great article !

  3. Hi,

    Thank you for the guide!

    I’ve recently purchased an Aero 15 laptop, and – after much trial and error – successfully installed Ubuntu on it.

    In my opinion, the best way to deal with the integrated/dedicated graphics issue (which can be a real pain to deal with) is to simply *disable* the dedicated Nvidia card in the UEFI (BIOS) *before* installing Ubuntu, and reactivating it *after* the installation is complete. (Just to be sure, I did the same thing with the Secure Boot function – disable it *before* installing, reactivating it *after* the installation is complete – from the UEFI/Bios.)

    Ubuntu will automatically ignore the NVidia card every time it boots after the installation, regardless of its state. It’s an easy and efficient way of saving a lot of battery power (easily above 8 hrs for me), and it poses absolutely no difficulty – the installation runs very smoothly and the OS works like a charm. Of course I’m no longer able to use the NVIdia dedicated card on Ubuntu – but I have Windows installed on the other partition for all that, right?

    I’ve also installed the Intel firmware from 01.org (Kabylake DMC) and applied the “battery life” fix suggested here (http://jyavariousideas.blogspot.com/2016/08/linux-ubuntu-1604-on-gigabyte-aero-14.html). It all works!

    Cheers,

    G.

    1. Update: Apologies — I was too excited about this possible fix for the NVIDIA/Intel conflict, so that I didn’t test it enough before posting. It has stopped working this morning. However, I managed to get the same results by installing bumblebee (and bumblebee *only*, without any additional packages: https://wiki.ubuntu.com/Bumblebee) and setting up bbswitch (https://github.com/Bumblebee-Project/bbswitch). I’ve also turned off the nouveau drivers in the GRUB (https://askubuntu.com/questions/757177/disable-nvidia-optimus-graphics-card). The results are the same. 🙂

      G.

    2. Hi! Thanks for sharing your exp. – I have also Aero 15, and I had struggle alot with the bumblebee to make it work on Mint 18.3. Now, did you manage to work with Intel GPU and HDMI and notebook display altogether? (Dual display). Thanks for sharing.

  4. Hi Zac,

    thankyou for this useful information

    I want just to add a note (manly for my future), to make ubuntu start with intel card i had to add some options to linux kernel in grub:

    acpi_osi=! acpi_osi=”Windows 2009″

    without these options the system was hanging with a black screen before starting X.

    I have an aero 14 with
    00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
    01:00.0 VGA compatible controller: NVIDIA Corporation Device 1c20 (rev ff)

    Linux kernel: 4.13.0-38-generic

  5. Thank you for this post! I have a Gigabyte Aero 14 and am having problems with the screen hanging every time I try to restart it. Anyone else run into this issue?

    Note: I was unsuccessful trying to install the latest Ubuntu 18.04 version – thought I would try 16.04 as you have, and sure enough the install went smoothly. The only issue I have is the desktop freezing every time I try a shutdown/restart.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.