Dell XPS 15 9560

Macbook Pro performance for half the cost.

History
This device was apparently released in late 2016. I bought it before Christmas 2017. At the time, the cost was about USD$1900 in Australia, versus USD$3500+ for an equivalently specified Macbook Pro with useless features like "touch bar".

When my second overpriced Macbook Pro in a row developed annoying hardware problems that required spending stupid money to resolve, I determined that I should switch away from OSX and return to the Linux desktop fold, as well as to reward Dell as the XPS series is widely considered to be quite Linux friendly.

Accessories
Some models have touch screens. Some models are 2-in-1 (break apart). I tested on a conventional (non break apart) model with touch screen, however the touch screen has not been tested.

Goals
A philosophical question would be: "Why buy new hardware if we aren't going to use the latest and greatest in software features?" Therefore, we are going to push the boundaries of the possible by setting up a ZFS root partition, because from past experience this will save time later.

Booting Linux for the first time

 * First, create a bootable USB with a ZFS enabled. The easiest way to do this is as follows.
 * Install UNetbootin (from its homepage)
 * Plug in any USB mass storage device (aka. "usb key") with a decent size (16GB+) that you don't mind wiping (all data current stored on the device will be lost!)
 * Start UNetbootin
 * Select the latest Ubuntu Live DVD image Unetbootin-ubuntu-livedvd-download.png (I used Ubuntu 18.04)
 * Let UNetbootin download and install it on to the USB mass storage device
 * Now you have a bootable Linux mass storage device with ZFS support
 * Enter BIOS. Turn on the Dell XPS 15 9560 laptop and press F2 repeatedly.
 * Disable secure boot
 * Enable legacy boot
 * Switch the NVMe internal flash unit to AHCI mode
 * Plug in your bootable Linux mass storage device with ZFS support
 * Save changes and exit
 * The system should now boot to the Ubuntu live DVD boot menu.
 * Press the arrows to select the 'Try ubuntu' option
 * Press tab in order to edit the options
 * Before the final add two more options, options.nouveau.modeset=0 nomodeset . This prevents crashing when starting the GUI.
 * Press enter to boot.
 * Open a terminal.
 * Become root via

Remove Windows 10
First of all we want to wipe all the pre-installed Windows 10 junk and recovery partitions.


 * The internal SSD drive will appear as, and it contains needless Windows 10 recovery partitions.
 * Using a partition management tool such as or  delete all of the current partitions. For example, using  we would run  then delete all partitions, write the new partition table and exit. The disk should only show "free space" when we are done.
 * ZFS will use the whole drive, so no partitions are required. Note that there is still space for a Master Boot Record (MBR), so we can install a boot loader on the disk without causing damage to the ZFS data.

Connect to the internet
Now we want to connect to the internet.
 * Click the down arrow in the top right, and choose 'Select Network' beneath 'Wi-Fi Not Connected'.
 * Enter your local wireless network information.
 * Verify that the wireless network connected by clicking the down arrow in the top right again. If connected, it should now show the network name.

Install ZFS
Now we want to tell the Ubuntu Live DVD to get ZFS support.

We now tell it to fetch updated package information from the internet.

This will take some time to download updates.

Finally, we install the ZFS support.

Create ZFS root dataset
This is where the root filesystem will live.

Create additional ZFS datasets
Optional.

Make the root filesystem bootable
To do this, we set the ZFS pool's property as follows.

We then verify the setting.

Populate the root filesystem, create kernel + initrd (initial ramdisk)
First install links.

Now follow the standard installation procedure in the Gentoo AMD64 Handbook, until you reach the section titled Configuring the bootloader, then return to this guide.

Note that when setting up the kernel:
 * Not all kernel versions are supported by ZFS on Linux
 * Because ZFS on Linux is therefore going to limit which kernel version you can install, the best way to select a kernel version is to install the very latest ZFS on Linux (and which is a Solaris porting layer) and work backwards from there, ie.


 * Some version of the kernel sources should now be present in and you can use that to configure your system. * After you have built the kernel, run  to place it in . This will ensure naming conventions are followed which will later allow  to detect the kernel.
 * Once configuration is complete, feel free to use to generate an initial ramdisk  as follows:


 * The ramdisk will be installed to in such a way that  can detect it.

Install grub2 bootloader
In order to boot from a ZFS filesystem we need to install a version of the boatloader with  enabled.

Let's just install the absolute latest version.

Once the grub program is installed on the system, we double-check that can see our ZFS volume.

Now we want to configure it to support ZFS.

Now we generate a configuration file.

Double-check that the generated configuration file includes an instruction to load the ZFS module.

Now double-check the ZFS module is in place.

Finally, we can tell it to install at the beginning of the NVMe disk.

Preparing to reboot
First install networking stuff you may have forgotten.

Don't forget to set a password!

Exit the environment.

Unmount the various filesystems.

Double check the ZFS property is correctly set for the root partition.

Now reboot, being careful to remove the live USB once the machine resets to enable booting from the internal NVMe flash.

Firmware
BIOS version on receipt was  with.

We need the package to operate the wireless chipset and to provide firmware to upload to the Intel graphics controller to enable things like proper power management.

Touchpad
Synaptics touch pad.

Slow 2D graphics
According to this page slow 2D performance attributed to a BIOS setting can be identified via:

If any line contains the word apparently you need to reboot, enter BIOS, and change an MTRR setting from 'continuous' to 'discrete'. However, on my machine while this is certainly the case, I cannot find such an option in the BIOS.

Interrupted setup
If your setup is interrupted for whatever reason, you can re-mount the ZFS root dataset as follows.

You then want to ensure the other mounts have not been made in the host.

Then re-enter the environment.

Then re-mount the other datasets.

When you are done, before you reboot, be sure to set the mountpoint back to root.

Crash on X11 startup
This can occur you have the `nouveau` driver enabled. You can work around it by adding the following kernel command line options: options.nouveau.modeset=0 nomodeset.

External resources

 * https://wiki.archlinux.org/index.php/Dell_XPS_15_9560
 * https://www.funtoo.org/index.php?title=ZFS_Install_Guide
 * https://github.com/strelec/dell-xps-15-kernel-config
 * https://browser.geekbench.com/geekbench3/8250863
 * https://forums.gentoo.org/viewtopic-p-8114160.html