I am trying to run Ubuntu 16.04. No matter what I have tried, I keep getting stuck in the log in loop.

Machine is Gigabyte Aero 15x v8-BK4 laptop. It has an Intel i7-8750H, and NVIDIA GTX 1070.

After many hours, and many consultations of internet resources (including askubuntu -- please don't mark this question as duplicate..), I am still unable to do so.

Has anyone been able to successfully run 16.04 on this machine? I have tried many fixes, and so far have been unable to get past the log in loop.

Note: To the best of my knowledge, there is no Secure Boot option on this machine. I have gone through every BIOS page and haven't been able to find a disable/enable option, or anything similar. (Therefore, I don't think I can "disable Secure Boot," which has been suggested as a fix for this problem.)

A (non-exhaustive) list of things that haven't worked, i.e. have got me stuck in log in loop (all starting with clean install of 16.04):

Attempt A:

Logging in to the GUI, navigating to Settings > Software & Updates > Additional Drivers. Then selecting the "NVIDIA binary driver - version 384" (only other option between Nouveau).

Attempt B:

Running these commands:

sudo apt purge nvidia-*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get upgrade
sudo service lightdm stop
sudo apt-get install nvidia-367

Also did this with (non-exhaustive) nvidia-396, nvidia-390, nvidia-384, nvidia-current

Attempt C:

Followed these instructions: https://gist.github.com/iSkore/ad043b64c8576d8eb818f7027da18b09

Also did those instructions without the sudo apt-get autoremove

Attempt D:

Followed the instructions under the answer titled "Ubuntu 14.04 through 16.10" here: Install Nvidia driver instead of nouveau

I used

wget us.download.nvidia.com/XFree86/Linux-x86_64/384.90/NVIDIA-Linux-x86_64-384.90.run
chmod +x NVIDIA-Linux-x86_64-384.90.run

to get the drivers from the NVIDIA website.

Also did these instructions with the PPA install, i.e.

sudo apt purge nvidia-*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get upgrade
sudo service lightdm stop
sudo apt-get install nvidia-367

I also tried with both PPA and from NVIDIA website doing blacklisting sections from both https://gist.github.com/iSkore/ad043b64c8576d8eb818f7027da18b09 and Install Nvidia driver instead of nouveau at same time. (maybe not a good idea? lol)

Please help!!

Like I said, this list is non-exhaustive, so ideally please answer if you've been able to get 16.04 working with this build. I'm happy to try other generic options, but I'm skeptical I haven't already tried them...

4 Answers 4


Edited in a couple spots.

Gigabyte RGB Fusion (keyboard backlight control) warning: It's a huge pain to change your keyboard backlight settings for this laptop in Ubuntu, so set it however you want it to be in Windows before you overwrite that installation, if you plan to do so.


Using the same laptop (Gigabyte Aero 15x v8-BK4), the following steps worked for me. I'm including many details (some probably superfluous), so I will bold what I think the key steps are.

Make sure Secure Boot is disabled in the BIOS by navigating to the Security tab and pressing "Delete all Secure Boot variables". (Enter the BIOS by pressing F2 on the POST screen after powering on: POST screen) If you see "Enroll all Factory Default keys" on this page, skip this step.

Install a fresh copy of Ubuntu 16.04.5 with Linux kernel version 4.15.0-34. (I used a bootable USB stick I made with Rufus on a Windows 7 machine.)

During installation, choose the "Something else" option for partitioning and divide the drive into (in order) a 1024 MB EFI partition, an ext-4 partition sized to use all space not used by the other partitions, and a 8192 MB swap partition (or a different size if you prefer: I have 16GB RAM. Do I need 32GB swap?). Mark all these partitions as "primary". Choose to place the bootloader on the physical drive you're installing Ubuntu on.

After the installation completed, the laptop hung on shutdown for me and displayed this error message: NMI watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [nvidia-smi:566]

This issue seems to be caused by the default nouveau driver.

At this point, shutdown the laptop by holding the power button. After shutdown, reboot and edit the boot options in grub by pressing e with the the Ubuntu boot option highlighted. Add nouveau.modeset=0 i915.alpha_support=1 directly before $vt_handoff on the boot options line. (Credit to Jeong-Ki Yoo below for the i915.alpha_support tip.)

You will need to do this on all boots until the Nvidia driver is successfully installed unless you want to add this change to your default grub options (How do I add a kernel boot parameter?). Press F10 to boot.

Reboot and install these packages: linux-firmware, intel-microcode, and intel-gpu-tools.

Add the Nvidia drivers apt repo: sudo add-apt-repository ppa:graphics-drivers, then sudo apt-get update.

Install Nvidia driver version 390 through the Additional Drivers application (also accessible through the Additional Drivers tab of Software & Updates). To do this, select "Using Nvidia binary driver- version 390.xx from nvidia-390 (open source)", and then press the Apply Changes button. Version 390.87 is confirmed to work, but all 390 major version number releases should work. Expect this step to take a long time.

When the driver is done installing, reboot again.

After start, run nvidia-smi and/or nvidia-settings to confirm everything worked. nvidia-smi should output something like: nvidia-smi output

nvidia-settings should launch the Nvidia settings application: nvidia-settings

You can also run the mesa-utils GPU stress test application to make sure the laptop's GPU is absolutely, unquestionably being used: sudo apt-get install mesa-utils and then __GL_SYNC_TO_VBLANK=0 glxgears. (The flag here prevents glxgears from limiting the frame rate to the display refresh rate.) On my laptop, running this achieved FPS around 25000 on AC power and around 20000 on battery. Reported utilization in the Nvidia settings "GPU 0" tab hovered around 100%.

Important notes

This solution doesn't seem to allow you to use Nvidia Optimus easily (switching between the integrated and discrete GPUs). When I tried switching to Intel (Power Saving Mode) in the Nvidia X Server Settings application, I was unable to log back in after reboot*. Not 100% sure why that was, but I think it had to do with the lightdm service misbehaving (Selecting nvidia graphics card with Prime results in black screen, How to install sane graphics drivers for Nvidia Optimus hardware on *Ubuntu 16.04?), and so it might be a recoverable state, although I didn't bother trying to figure out how and just restarted the process as described above.

The brightness keyboard controls also don't work for me, but I can change display brightness using the "Brightness & Lock" settings page.

*After boot, the computer displayed a flashing black screen with an unresponsive cursor in the center of the display. Switching to a tty session didn't work properly either -- the tty login prompt would flash for a moment and then the display would revert to the flashing cursor. I tried rebooting, loading a different kernel version in recovery mode (don't recall which precisely, but probably 4.13.0-39), and trying to toggle back to discrete GPU mode by dropping into the root command prompt and calling sudo prime-select nvidia. After this, booting with the 4.15.0-15 kernel loaded yielded the normal lightdm login screen, but the laptop's keyboard and touchpad were totally unresponsive, as were USB peripherals I tried plugging in.


Here's my solution, which doesn't involve upgrading the kernel.

I tried to dual boot with Windows 10 & Ubuntu 16.04.04

As cyrus.rc described above, there'll be a lot of errors when you first try to install Ubuntu 16.04.04.

In addition to cyrus.rc's method to boot properly by adding nouveau.modeset=0 in your GRUB command line, additionally add the following parameter to enable alpha driver support.


To do this at boot time for the current boot only, go to Advanced Options for Ubuntu in the GRUB menu and press e to edit GRUB options. Move the cursor to the line beginning linux and to the section where the boot parameters are, probably after ro or just before $vt_handoff, and add nouveau.modeset=0 i915.alpha=support=1.

After this you'll be able to see your beautiful high-resolution screen (refer to OldFred's comment on Ubuntu Forums)

After booting successfully, make this permanent by editing the configuration file for GRUB:


sudo vi /etc/default/grub

or use any other editor to open the file

Find the line beginning


and add i915.alpha_support=1 to the group of words in quotes. It'll look like

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0 i915.alpha_support=1"


sudo update-grub

and reboot.

After that you'll have no problem in installing Ubuntu 16.04.04 for your Aero 15X.


I followed cyrus.rc's method as well, with a brand new machine (Gigabyte Aero 15x v8-BK4), with some modifications:

  • I didn't have to disable secure boot because I saw "Enroll all Factory Default keys" in the BIOS.
  • When booting from the thumb drive for the initial install, I encountered this issue where booting froze at the animating dots and the Ubuntu logo. I followed the linked solution (set acp=off in the boot options) and got past the booting logo.
  • I followed the default "alongside" option instead of "something else" for the installation and simply dragged to partition rather than manually specify efi, ext-4, and swap sizes.
  • My computer didn't hang at shutdown/restart at the end of the installation. I just had to press F12 again to get to the boot option menu, chose Ubuntu, which then took me to the GRUB menu, at which point I followed the listed instructions to modify the boot options.
  • At some point I pressed F2 during boot and switched the default boot order so I got the GRUB menu by default.

Otherwise I followed Cyrus's method, and everything is working great for me.


I was able to install Ubuntu 18.04 alongside Win10 on the same machine (aero 15x v8) by just setting nouveau.modeset=0 in the grub command line (press e on the install ubuntu option in grub and add nouveau.modeset=0 after quiet splash, then press F10)

There is no need to disable secure boot and in fact no need to even enter the bios screen. When ubuntu is installing, wifi, keyboard and touchpad luckily work, so make sure you select the additional 3rd party drivers option. This will ask you to create a one-time password that you will be asked in an enroll mok screen the next time you reboot, in order to register driver-keys (since secure-boot is enabled).

After ubuntu installs, go to the softwares and update application and then additional drivers and select the nvidia proprietary driver option. It is important that you install the driver from here and not the terminal, since once again you would have to select a one-time password and register your driver keys in the enroll mok screen.

Anyway, the same instructions should work on ubuntu 16.04 (see https://www.youtube.com/watch?v=VrkhWZ8-zvM)

Regd. keyboard backlight colors, there is an interesting quirk: Whenever I change the individual keyboard backlight colors in windows using the gigabyte software, the same colors apply to ubuntu, the next time I boot in!

Hope this helps!

That being said, I have not yet tried setting up bumblebee, so the system always uses the nvidia gpu which only gives me 2hrs of battery life. I anyone else has had success with bumblebee on this machine please do comment. Also using Fn keys for screen brightness don't work, although the Fn keys for volume and keyboard backlight work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .