Monday, October 8, 2018

Installing Ubuntu on Dell XPS 15 9560

The XPS 15 9560 is a great laptop and Linux works quite well on it, but it needs some tweaks out of the box, mostly to deal with the discrete NVIDIA GPU.  Here are the steps I took to get Ubuntu 18.04 (well, Kubuntu actually) working.

The desired end state is a dual-boot setup with Windows 10 and Linux, with some sort of discrete graphics switching available from the Linux OS.  I use Linux as the primary OS and rarely need the dedicated GPU as battery life is usually a higher priority.

  1. In the BIOS settings, disable secure boot,.
  2. Boot from the Ubuntu installation flash drive.  Make sure you choose the UEFI boot option, not Legacy!
  3. Hit 'e' when you get to the grub prompt.  This brings up an editor for the grub command line, but it will be very laggy.  To get around this when we actually boot, add 'nomodeset' after 'quiet splash'.
  4. Hit F10 to boot with the modified command line.
  5. Run the Ubuntu installer.  I made a 16 GB swap space at the end of the disk with a 180 GB ext4 partition before that for the mount point '/'.  Make sure the actual internal SSD is the device selected for bootloader installation.  It's way easier to make grub boot to Windows than to make the Windows bootloader see a Linux OS.
  6. When you reboot into the actual installed OS, follow the same steps to add 'nomodeset' to the boot command line.  Otherwise the system will be unusable.
  7. The open-source nouveau driver for the GTX 1050 does not work well, at least for me, so we won't be using it. Open "Driver Manager" within Ubuntu.  It will scan your system and determine that closed-source drivers are available for the 1050.  Select the NVIDIA driver.  As of when I'm writing this, the current release is 390 which is quite good.  It will take a bit to download and install.
  8. To select which GPU to use (integrated or discrete), open the Nvidia X Server Settings.  Under 'Prime Profiles', you can select between NVIDIA and Intel GPUs.  You'll need to reboot (or at least logout and log back in) every time you do this.  If you want to verify which GPU is in use, you can run glxgears.  It should return around 60 fps on integrated and many thousands on the discrete card.
  9. For some reason, Ubuntu still loads the nouveau driver as a fallback.  This prevents the laptop from suspending properly and is generally a huge pain.  To disable it, add 'nouveau.modeset=0' to the default command line in /etc/default/grub.  The line should look like this:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.runpm=0 nouveau.modeset=0"
    Once that line has been added, reload the grub config.
    sudo update-grub
  10.  Some other things that might be helpful to do:
    • Change the desktop scaling to 1.5x, which makes the 4K display more usable
    • Change the touchpad settings to allow tap to click
    • Also consider the post-install script at
Edit: Thanks to Maddy Tung for a correction to the link in this post.

No comments:

Post a Comment