How to dual boot Windows 10 and Ubuntu 18.04 on the 15 inch Dell XPS 9570 with Nvidia 1050 ti GPU

Patrick Waters
8 min readAug 25, 2018

--

Dell XPS 9570 with Ubuntu!

After taking a many year hiatus from running linux distro’s I finally decided to abandon Mac OS for Ubuntu. My drive for making the switch to Ubuntu was that I got hit by the newer Mac Book keyboards issues. After I had it serviced a third time because by shift key wasn’t working, I felt it was time to find something better. I also use Docker on daily bases for work, and latency issues with Docker volumes had become a major annoyance. I had been hearing really good things about how far Ubuntu and Debian have come in recent years and decided to make the switch. You will find below the adventure I took getting things running smoothly on the Dell XPS 9570. Getting the GPU drivers working was the biggest head ache. Beyond that, everything pretty much worked out of the box.

My XPS 9570 Specs:

  • Intel 8th Generation i7–8750H
  • 32GB of DDR4–2666MHz Ram
  • 1TB M.2 2280 PCIe Solid State Drive
  • 15.6" 4k Ultra HD (3840 x 2160) Infinity edge display
  • Nvidia 1050ti gpu

Prerequisites

  • You have an Ubuntu Live CD on a USB stick or an external CD already setup. There are plenty of tutorials on the web on how to do this.

Windows/Dell Updates

If you haven’t already done so, make sure to boot into windows first and run the dell program to update the drivers and software. The most important update would be the bios update. I did not experience any issues with the bios being out of date, but I did come across some post on the web where people did. So be diligent and make sure you install any bios update that’s available.

Also make sure to register your laptop with Windows during the first boot. You will need that to be able to login to Window BitLocker to get your recovery key to unlock the windows partition.

Getting Ubuntu installation to be able to see you hard drive (Changing from RAID to ACHI)

  1. Boot in to windows
  2. In the cortana search box enter ‘Change advanced Startup Options’
  3. Click ‘Restart Now’- your computer will switch a blue screen with some options.
  4. Click Troubleshoot -> Startup Settings -> Restart — This will restart your computer. When you see the dell logo appear start pressing F12 repeatedly until you get into the Dell Bios Settings.
  5. Once you see the bios menu, go to System Configuration -> SATA Operation and change it from ‘Raid On’ to ‘AHCI’
  6. Click Exit and Save. Your computer will reboot again.
  7. On reboot you may be asked to enter you bitlocker key. Go to https://account.microsoft.com/devices/recoverykey to get your key. Side note, Microsoft why must you use an insanely large key?!? End rant.
  8. After you enter your very long key, choose option number 4, ‘Safe Mode`
  9. In the cortana search box enter “Device Manager”
  10. Check that the “IDE ATA/ATAPI controller” is “Intel(R) 100 Series/C230 Chipset Family SATA AHCI Controller”
  11. Reboot and you will be brought back to normal windows.

Resizing your windows partition

  1. Once you are back into windows search for ‘Create and format hard disk partitions’ in Cortana
  2. Find ‘C:\’ in the list of partitions, right click and select ‘Shrink Volume’
  3. Enter the amount of space you want to free up. I have a 1 tb drive and shrunk my volume to leave 110GB of space for Windows. Do what works best for you. Once you’ve enter the amount you want to shrink, click ‘Shrink’

Bios Changes required to boot an Ubuntu Live CD

  1. Reboot your computer out of windows
  2. When you see the Dell logo, continuously press F12 until you get into the bios options.
  3. Go to ‘Secure Boot’ -> ‘Secure Boot Enable’ and un-check the box for ‘Secure Boot Enable’.
  4. Go to ‘General’ -> ‘Advanced Boot Options’ — Check ‘Enable Ateempt Legacy Boot’ and ‘Enable Legacy Options ROMs’
  5. Before saving and exiting, insert/connect your media that has the ubuntu live CD on it.
  6. Save and exit.
  7. Start pushing F12 as soon as you see the Dell logo.
  8. This should bring you to boot menu. Look for you media under ‘UEFI Boot’. In my case I used a Samsung flash drive and the options was ‘Samsung Flash Driver 1100, Partition 1’. Select that option and the live CD should boot.

I’m not going to document all the install steps. I think it’s pretty straight forward. You should have ample free space on your disk providing you resized your partition above. I choose to use 300GB of my free space and left some extra for playing around with other linux distros. Note do NOT choose to install 3rd part libraries like graphics drivers.

I’ve come across a few posts about folks having issues booting the live cd pertaining to issue with video drivers. Fortunately I did not run into that. If you do, check out this post https://github.com/rcasero/doc/wiki/Ubuntu-linux-on-Dell-XPS-15-(9560).

Post installation steps

After booting for the first time I ran into stability issues with the default graphics drivers. It would work for a short period of time, but eventually my screen would go bonkers, like lots of flickering, flashing colors, etc. Pretty sure it was a poltergeist.

To fix this issue and to also make sure all the needed drivers are installed I made use of some fabulous work done by JackJack96 on github https://github.com/JackHack96/dell-xps-9570-ubuntu-respin. The primary purpose of those scripts are to generate an install image with the packages already installed, but he does provide a script for setting things up on a existing installation. Personally I don’t like the idea of using the custom image for security reasons, but you can clearly read the post install script to see that it’s not doing anything malicious. After you boot for the first time, open terminal and run the following:

sudo apt install curl
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/JackHack96/dell-xps-9570-ubuntu-respin/master/xps-tweaks.sh)"
sudo prime-select intel

For those of you who aren’t aware, the XPS ships with two graphics cards. The Intel integrated graphics that’s built into the processor and the Nvidia 1050ti (if you selected to purchase this option). The commands above force the use of the Intel integrated graphics by default. Using the Intel graphics full time I saw any where from 6 to 8 hrs of battery life. Using the Nvidia card full time was more like 3 hrs. If you want to switch to running the Nvidia card all you have to do is run:

sudo prime-select nvidia

Note I believe you need to restart in order for the changes to take effect.

After running the above I continued to have issue with my screen flickering and going all poltergeist on me. What ended up fixing that issue was updating to the latest Linux kernel. Ubuntu 18.04 ships with Linux kernel version 4.15.0, I choose to update mine to 4.18.3, which was the latest build at that time. To do so, do the following

git clone git@github.com:mtompkins/linux-kernel-utilities.git
cd linux-kernel-utilities
sudo ./update_ubuntu_kernel.sh

After running the above command you will be prompted to select a kernel version. Choose 4.18.3. You may see newer build choices when running that command, I’ll leave it up to your expertise if you want to install a different version. But note I have been running 4.18.3 with no issue for a few weeks now.

Lastly, I had an issue where my computer became as hot as a frying pan when trying to suspend when the Intel graphics was in use. To fix this you need to disable the default Linux graphics driver on boot.

sudo gedit /etc/default/grub

Below is my entire grub options file. The option you’ll want to copy and paste is ‘GRUB_CMDLINE_LINUX_DEFAULT’. Specifically nouveau.modeset=0 mem_sleep_default=deep nouveau.runpm=0 needs to be appended to the default grub configuration. I’ve made some additional tweaks my config, like re enabling the grub boot menu at boot, changed the default resolution of the grub menu so the text isn’t tiny. I’ll leave it up to you if you want to make those changes as well. They are not required.

# If you change this file, run 'update-grub' afterwards to update# /boot/grub/grub.cfg.# For full documentation of the options in this file, see:#   info -f grub -n 'Simple configuration'GRUB_DEFAULT=0# GRUB_TIMEOUT_STYLE=hiddenGRUB_TIMEOUT=10GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0 mem_sleep_default=deep nouveau.runpm=0"GRUB_CMDLINE_LINUX=""# Uncomment to enable BadRAM filtering, modify to suit your needs# This works with Linux (no patch required) and with any kernel that obtains# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"# Uncomment to disable graphical terminal (grub-pc only)#GRUB_TERMINAL=console# The resolution used on graphical terminal# note that you can use only modes which your graphic card supports via VBE# you can see them in real GRUB with the command `vbeinfo'GRUB_GFXMODE=640x480# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux#GRUB_DISABLE_LINUX_UUID=true# Uncomment to disable generation of recovery mode menu entries#GRUB_DISABLE_RECOVERY="true"# Uncomment to get a beep at grub start#GRUB_INIT_TUNE="480 440 1"

After you save the file run:

sudo update-grub
sudo reboot

Fix Touchpad

sudo apt-get install xserver-xorg-input-libinput
sudo apt-get remove --purge xserver-xorg-input-synaptics
sudo reboot

Improve Battery Life

sudo apt install update
sudo apt install tlp tlp-rdw powertop
sudo tlp start
sudo powertop --auto-tune
sudo reboot

Multi touch gestures

One thing that I really did love about using a Mac Book pro was the touch pad gestures. Fortunately open source rocks and you can get virtually the same functionality in Linux. To do so, make sure you have build essential installed, checkout https://askubuntu.com/questions/398489/how-to-install-build-essential on how to install it. Then issue the following commands:

sudo apt git install xdotool wmctrl libinput-tools
sudo gpasswd -a $USER input
gpasswd -a [your-user-name] input
cd ~/Downloads
git clone git@github.com:bulletmark/libinput-gestures.git
cd libinput-gestures
sudo ./libinput-gestures-setup install
libinput-gestures-setup autostart
libinput-gestures-setup start

The default gestures are in /etc/libinput-gestures.conf. If you want to create your own custom gestures then copy that file to ~/.config/libinput-gestures.conf and edit it.

The End

That’s it! If you followed everything above correctly you should have everything running and stable! If you have any issues please drop a note in the comments and I will try and help debug.

I’ve been running with this setup for a few weeks now. I have been extremely happy with everything. The next endeavor I will probably take on is installing Nvidia Optimus which is responsible for auto switching the GPU based on demand. Although I do like having control over which one is in use. The only time I really need the Nvidia card is if I want to boot up Steam and play some CSGO (Yes, CSGO runs on linux!).

--

--