Dell Inspiron 7559 Ubuntu Linux Guide

Last updated 10 July 2018

This guide will show you how to install and configure an Ubuntu Linux 16.04/18.04 LTS distribution (Ubuntu, Lubuntu, Xubuntu, Kubuntu, Ubuntu Gnome, Ubuntu MATE) on the Dell Inspiron 7559 laptop.

Do not try to upgrade from Ubuntu 16.04 LTS to 18.04 LTS now. This might crash your OS (Crashed mine! Had to do a fresh install of Ubuntu 18.04 LTS.). Upgrade from 16.04 LTS to 18.04 LTS will be enabled late july.

DISCLAIMER This document just details the processes that I discovered through hours of trial and error to get a stable Ubuntu distribution working on my laptop. I'm not liable for any damage or adverse effects that this has on your system. Always back up your important data before doing any major work to your computer.

Table of Contents

  1. Reading this Guide

  2. Pre-requisites

  3. Installation

  4. Initial Setup

  5. Installing the Nvidia Driver

  6. Update Linux kernel to 4.8.5.

  7. Installing Bumblebee

  8. Installing Power-Management Utilities

  9. Running Games and Applications with the Right GPU

  10. (Optional) Installing the Intel Driver and Firmware

  11. Known Issues

Reading this Guide

While it might seem straightforward, I just want to make sure this document's structure is absolutely clear.

Text within blue boxes indicates instructions intended only for Ubuntu Linux 18.04 LTS. The sections that were not tested with Ubuntu Linux 18.04 LTS will be explicitly stated.

Text within green boxes usually contains clarifying information and could be helpful if you're curious as to why something is the way it is.

Text within a red box like this should never be ignored as it usually contains warning information.

Text in a black box like this usually represents something typed into a terminal or a text file!

sudo apt update

Text like this usually represents something you need to select, click, or a program name to use. Something that you interact with or may see in a text file or interface.

Pre-requisites

  • Some experience installing an Ubuntu distribution

  • Installation media for said Ubuntu distribution

  • A Dell Inspiron 7559 laptop (duh)

Installation

  1. Make sure Secure Boot is disabled from the BIOS.

  2. If you intend to dual boot with Windows, make sure Window's Fast Boot is disabled.

    I updated my BIOS to v1.1.8, but I don't think it is required for all of this to work as I had a successful setup following these procedures prior to doing so.

  3. Boot from your installation media.

  4. Highlight the Install Ubuntu entry and press e on your keyboard.

  5. Modify the line that contains quiet splash at the end and change it to:

  6. nomodeset i915_bpo.nomodeset=1 quiet splash

  7. Press F10 to boot.

  8. Proceed with the installation as normal.

  9. Reboot.

Initial Setup

  1. Follow Installation steps 4-6 to boot into the operating system.

  2. Connect to a network.

  3. If you didn't do this during the install, update your system.

  4. sudo apt update

  5. sudo apt upgrade

Installing the Nvidia Driver

  1. Add the proprietary graphics drivers repository.

  2. sudo add-apt-repository ppa:graphics-drivers/ppa

  3. sudo apt update

  4. Install your chosen Nvidia driver.

  5. sudo apt install nvidia-367

  6. Open the GRUB configuration file: /etc/default/grub.

  7. sudo vi /etc/default/grub

  8. Change the line that reads GRUB_CMDLINE_LINUX="" to

  9. GRUB_CMDLINE_LINUX=

  10. "

  11. acpi_backlight=native acpi_osi=

  12. "

  13. Save your changes and close the file.

  14. Apply the changes to GRUB. Doing this means that we no longer have to manually add kernel boot parameters to boot like we did earlier in the guide.

  15. sudo update-grub

  16. Switch to the Intel GPU to save power.

  17. sudo prime-select intel

  18. Reboot.

Update to Linux kernel 4.8.5 for better GTX 900 & Optimus support

Did not test this section with 18.04 LTS installation.

  1. Make a directory to download the kernel files to, make sure it's empty then cd into it.

  2. Download the Ubuntu mainline Linux kernel 4.8.5. You need the header files for amd64, all, and the image files for amd64.

  3. wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8.5/linux-headers-4.8.5-040805-generic_4.8.5-040805.201610280434_amd64.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8.5/linux-headers-4.8.5-040805_4.8.5-040805.201610280434_all.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8.5/linux-image-4.8.5-040805-generic_4.8.5-040805.201610280434_amd64.deb

  4. Install the new kernel.

  5. sudo dpkg -i *.deb

  6. Reboot.

Installing Bumblebee

Did not test this section with 18.04 LTS installation.

Bumblebee is a program that allows "on-the-fly" GPU switching similar to what Nvidia Optimus does on Windows. Unfortunately, Nvidia doesn't exactly support this on Linux. Without Bumblebee, we can only switch GPUs and then log out/back in to change it. This results in us using the power-hungry Nvidia GPU for all applications rather than just the game or program we need it for. And like I said, if we want to change, we have to initiate the change and then log out and back in. Annoying!

Bumblebee provides the convenience of switching the GPU for us just for the given application and then powers down the beefy GPU when we're not using it. Oh, and we don't have to log out then back in. Awesome, right?

  1. Add the Bumblebee Testing repository.

  2. sudo add-apt-repository ppa:bumblebee/testing

  3. sudo apt update

  4. Install bumblebee.

  5. sudo apt install bumblebee

  6. Open Bumblebee's configuration file ( /etc/bumblebee/bumblebee.conf) in your preferred text editor.

  7. sudo vim /etc/bumblebee/bumblebee.conf

  8. Edit the line in the [bumblebeed] section that looks like Driver= and change it to:

  9. Driver=nvidia

  10. Change every occurence of the word nvidia-current in this file to the Nvidia driver you selected. In my case, it's nvidia-367.

    If you're using vi or vim, you can just type :%s/nvidia-current/nvidia-367/g and hit enter to change all occurences of nvidia-current with nvidia-367.

  11. Edit the line in the [driver-nvidia] section to say:

  12. PMMethod=bbswitch

  13. Save your changes and close the file.

  14. Open /etc/modprobe.d/bumblebee.conf in your favorite text editor.

  15. Append blacklist entries to match the Nvidia driver you installed to the bottom of this file.

  16. blacklist nvidia-367

  17. blacklist nvidia-367-updates

  18. blacklist nvidia-experimental-367

  19. Reboot

  20. Verify you can use Bumblebee.

  21. optirun glxinfo | egrep -i

  22. '

  23. nvidia|gtx

  24. '

  25. connor@connor-Inspiron-7559:~$ optirun glxinfo | egrep -i

  26. '

  27. nvidia|gtx

  28. '

  29. server glx vendor string: NVIDIA Corporation

  30. OpenGL vendor string: NVIDIA Corporation

  31. OpenGL renderer string: GeForce GTX 960M/PCIe/SSE2

  32. OpenGL core profile version string: 4.5.0 NVIDIA 367.57

  33. OpenGL core profile shading language version string: 4.50 NVIDIA

  34. OpenGL version string: 4.5.0 NVIDIA 367.57

  35. OpenGL shading language version string: 4.50 NVIDIA

  36. Verify that the discrete card is now off since we aren't actively running a program with optirun.

  37. cat /proc/acpi/bbswitch

  38. 0000:02:00.0 OFF

  39. OPTIONAL Download and install the VirtualGL tools to benchmark your system and make sure optirun uses the correct video card. I like using glxspheres64

Installing Power-Management Utilities

Battery life isn't too bad when your brightness is a bit lower. I usually install TLP to squeeze some more time out of my Linux battery life. After you install it and verify that it's running, it's pretty hands-off from there and it'll take care of itself from then on.

You won't have the same amount of time on battery as a Macbook does, but depending on the screen brightness, I can usually make it a full day on campus with my laptop doing web browsing, word processing, or programming.

  1. Install tlp and tlp-row.

  2. sudo apt install tlp tlp-rdw

  3. Make sure TLP is running in battery mode.

  4. sudo tlp bat

Running games and applications with the proper GPU

Did not test this section with 18.04 LTS installation.

Running Steam games

  1. Right click on the game in your Steam library and click Properties.

  2. Click Set Launch Options.

  3. Enter primusrun %command%.

    If you already have launch options in this box, make sure that you put primusrun at the very beginning and put %command% at the very end and everything should work fine.

  4. Play your game normally by launching it through the Steam client!

Running applications from the command line

Prefix the command with optirun. We did this earlier when we ran glxinfo.

Example:

optirun firefox

Running Wine games

Similar to running command line programs, you can just do:

optirun wine gamenamehere

(Optional) Installing the Intel Graphics Driver and Firmware

Did not test this section with 18.04 LTS installation.

This step is optional just because I followed it to quiet down some "warnings" given saying that some i915 firmware is missing or whatever. It only fixes one or two of the warnings but the other one remains even after installing it. I haven't investigated this too much to see if there's an actual benefit, but as far as I know, you won't harm anything by skipping this.

  1. Install the .deb we just downloaded.

  2. sudo dpkg -i

  3. .deb

  4. Run the Intel Graphics Installer for Linux program (you may need to open your dash/search for the application, it has a GUI).

  5. Reboot.

  6. Extract the contents of the archives.

  7. tar -xf name_of_downloaded_file_here

  8. Go into the extracted folders one at a time and install the firmwares.

  9. sudo bash ./install.sh --install

  10. Reboot

Known Issues

The Brightness Function keys don't work

As already mentioned above, acpi_backlight=vendor setting in GRUB works well with 18.04 LTS installation and hence the brightness function keys do work.

(Possible fix!) Changing the GRUB configuration from acpi_backlight=native to acpi_backlight=vendor may fix this issue. A kind visitor to the guide mentioned that *buntu 16.10, the latest kernel, and those GRUB settings restored brightness function key functionality.

I suspect this has something to do with some weird quirk of the ACPI controls after installing the Nvidia driver. The workaround is described in the Nvidia driver setup section where we modify Grub's boot parameters. This does not regain use of the function keys, but it does allow for controlling the brightness via settings, brightness applet, or some other brightness controller application.

Bumblebee service status says it failed to load module "mouse"

Not entirely sure what this means, but it hasn't really interfered with anything.

Last updated