Dell XPS 15 9560 Ubuntu 1804 Setup
Updated: 2018-12-20
Published: 2018-08-25
Intro
I recently upgraded my Dell XPS (9560) to Ubuntu 1804 LTS from 1604 and I ran into a few issues along the way. This post may help others so I am documenting it here.
Pre-Flight
Prior to installing Ubuntu 1604 I upgraded the BIOS from Windows 10. Also in the BIOS settings I disabled secure boot and changed the SATA option from RAID to AHCI. If you are following along but doing a fresh install of Ubuntu 1804 over the top of Windows you may need to also do this.
I backup my important folders to my NAS using Deja Dup. I also decided to backup my hard drive to an external 2TB USB drive prior to upgrading. I am glad I did this as I could NOT restore my Deja Dup backup in Ubuntu 1804.
Issues
One of the reasons I chose a Dell laptop was that Dell sell an Ubuntu edition XPS so I hoped there would be good support for hardware within the linux ecosystem. Everything did work out of the box but I still did face some issues that I had to work around.
Hardware Issues
Bluetooth Dropouts
My laptop came with a Killer wireless card which is absolute rubbish. My bluetooth adapter would occasionally dropout and be undetectable by the operating system. This was also an issue in Windows 10 so I know it was not related to Ubuntu specifically. The web is littered the complaints from people about these P.O.S cards. The only way to get it back was to reboot but sometimes this was not enough and I had to go into the BIOS and disable/re-enable the bluetooth to bring it back to life.
After upgrading to 1804 the bluetooth was dropping every other day and sometimes daily so I replaced the card with a https://ark.intel.com/products/94150/Intel-Dual-Band-Wireless-AC-8265 wireless card. It cost about $30 delivered and took 20 minutes of effort, I have not had any issues related to bluetooth dropouts since. My fingers are crossed that this issue is now put to bed.
Installation
I opted for a fresh install of 1804 rather than upgrade directly from 1604. To install I needed to boot into the live environment and install from there. Installing directly did not work. Installing from the live environment seemed to go ahead without issues. I installed the minimal version of 1804 which I was thankful for as it saved me from having to uninstall all the apps I don't use like the Libre office suite etc..
Software Issues
Login Problem
Once the installation was completed there was a problem with logging in. After entering my username and password the screen would go black and the system was unusable. The solution was to install the Nvidia drivers which I declined to do as part of the install due to my /blog/frack-you-nvidia with the Nvidia drivers.
To install the Nvidia drivers switch to the terminal with the ctrl + alt + f2 keyboard combination from the login screen.
sudo apt install nvidia-driver-390Next update the grub config adding the acpi=force to the GRUB_CMDLINE_LINUX="" line.
# /etc/default/grub
GRUB_CMDLINE_LINUX="acpi=force"Update the change to the grub config.
sudo update-grubNow reboot the system for the changes to take effect.
sudo reboot nowAfter installing the Nvidia drivers I could now login and use the system.
High Fan and Terrible Battery Life
The first thing I noticed was the fans where running at full tilt all the time. This was very annoying. The battery life is also very dismal when using the default settings so some adjustments are required to suit laptop use rather than desktop use. To be fair this was also an issue with 1604.
Install the powertop, tlp and tlp-rdw utilities.
sudo apt install powertop tlp tlp-rdwEnable powertop recommendations.
sudo powertop --auto-tuneThese adjustments don't survive a reboot so create a service to start on boot.
cat << EOF | sudo tee /etc/systemd/system/powertop.service
[Unit]
Description=PowerTOP auto tune
[Service]
Type=idle
Environment="TERM=dumb"
ExecStart=/usr/sbin/powertop --auto-tune
[Install]
WantedBy=multi-user.target
EOFStart and enable the powertop service.
sudo systemctl daemon-reload
sudo systemctl start powertop.service
sudo systemctl enable powertop.serviceFinally change the Nvidia video card settings to use the Intel integrated graphics only in power saving mode in the Nvidia control panel. I run Windows 10 on an external USB 3 SSD drive for gaming so I have no use for the NVidia video card in Linux, YMMV.
Failure To Resume From Suspend
Putting the laptop into suspend would cause the laptop to lock up and it was not possible to bring it out of a suspended state. Sometimes the fans would also turn on to full speed during this state indicating that it was not actually suspending at all. Some further adjustments to the Nvidia settings where required to fix this issue.
Disable the fallback service.
sudo systemctl disable nvidia-fallback.serviceEdit the /etc/default/grub config adding the line GRUB_CMDLINE_LINUX="nouveau.blacklist=1"
Update GRUB and reboot.
sudo update-grub
# Reboot after drivers are installed
sudo reboot nowLook and Feel
The default Ubuntu theme is pretty bland IMHO and I use gnome-tweak-tools to adjust some of the settings. First I installed the Any Bloody Slim theme. Next I installed the PopOS theme that is provided by System76.
I use Gnome Tweaks to set the Application theme to Ant Bloody Slim and the Cursors and Icons themes to PopOS. Combine this with the Gnome dark theme and a nice background and IMO this results in a very pleasing to look at and use desktop environment.
Applications
The following are a list of the core applications that I use.
Terminal
Tilix - Tiling terminal emulator.
Powerline - Beautiful and informative shell prompt.
I use the Hurtado theme for Tilix which can be found here.
Cloud Storage
Dropbox
Password Manager
Enpass - Enpass can be joined to Dropbox and passwords synced across multiple devices.
Office Suite
Only Office - Documents, Spreadsheets, Presentations
draw.io Desktop - Network diagrams
Foxit Reader - PDF reader/editor
Image Editing
Gimp - PNG/JPEG + others editor
Inkscape - SVG editor
Sound and Video
VLC media player - Video Player
Also install additional packages to play restricted content.
sudo apt install ubuntu-restricted-extras ffmpegVirtualization
KVM - OS virtualization
Qemu - Hardware emulation
Libvirt - Common API for many virtualization systems.
Vagrant - VM orchestration
vagrant-libvirt - Vagrant Libvirt connector
Text Editors and IDEs
VSCode - Graphical text editor
VIM - Shell text editor
PyCharm - Python IDE
RubyMine - Ruby IDE
Web Browsers
Firefox - Main Browser
Chromium - Chat apps such as Slack, Ryver, etc
I also use Enpass, Privacy Badger and Add Block Plus Firefox plugins.
Backup
Deja Dup
Bittorrent
Deluge
Utilities
htop, curl, git, gawk, nmap, wireshark, whois, mtr, traceroute, tcptraceroute
Outro
Would I recommend a Dell XPS ? Definitely not. Would I buy one again ? Maybe in the future, but I would also feel compelled to purchase the extended Warranty if I wanted to get 3 years out of it. In reality my next laptop will likely be the Lenovo X1 carbon.
Links
https://linoxide.com/linux-how-to/install-use-powertop-ubuntu-16-04/
https://askubuntu.com/questions/112705/how-do-i-make-powertop-changes-permanent
https://www.reddit.com/r/Dell/comments/5y3rii/xps_9560_battery_life_optimization_and_fan/
https://askubuntu.com/questions/1032417/ubuntu-18-04-lts-bluetooth-0cf33004-discovery-not-working
https://ark.intel.com/products/94150/Intel-Dual-Band-Wireless-AC-8265
https://www.dell.com/community/Inspiron/Suspend-resume-problems-on-Ubuntu-18-04/td-p/6072410
https://ubuntuforums.org/showthread.php?t=2317843
https://www.reddit.com/r/Dell/comments/450rln/ubuntu_1604_daily_on_dell_xps_15_9550/
https://github.com/rcasero/doc/wiki/Ubuntu-linux-on-Dell-XPS-15-(9560)
https://m.windowscentral.com/upgrade-wifi-dell-xps-15
https://ubuntuforums.org/showthread.php?t=2390291
https://gsilvapt.github.io/2018-06-03/Installing-Ubuntu-1804-With-NVidia-High-End-Graphics-Card