This document is to serve as a set of notes for myself and can be used as a guide for others looking to set up Ubuntu on their XPS 15. For me this was a dual-boot setup with Windows 10. On Linux I don't have a need for the discrete graphics card, so the main focus is to maximize battery life for development.
I had initially tried to dual boot with Fedora 25, but ran into a lot of issues trying to disable the discrete graphics card, resulting in poor battery life. Instead of starting over with Fedora again, I decided to try with Ubuntu, since there seemed to be a few more resources available.
My XPS Configuration is: i7, 16GB RAM, 512GB SSD, 4K Screen.
- Reboot and press F2 on Dell logo screen until "Preparing to enter setup" appears to get into BIOS
- Under "System Configuration > SATA Operation" switch from RAID to AHCI
- Optionally disable Touchscreen under "System Configuration > Touchscreen" to improve battery life
- Many sources said to disable Secure Boot, but when I initially installed Fedora it wasn't required
- After reading more about this, to install 3rd party drivers this was required, so I did disable Secure Boot in the end
- Windows will have to be reinstalled after switching from RAID to AHCI
- Fine to remove all Dell partitions, install as normal
- Killer 1535: http://www.killernetworking.com/driver-downloads/item/killer-drivers-inf
- Device Manager, update Killer, browse local files
- Intel HD 630: https://downloadcenter.intel.com/download/26772/Graphics-Intel-Graphics-Driver-for-Windows-15-45-
- Disable fast boot in Advanced Power Management
- Disk Management, shrink volume for Linux install (I'm using 100GB)
- Create backup here
- ISO from: https://wiki.ubuntu.com/UbuntuGNOME/GetUbuntuGNOME
- Created bootable USB via Rufus: https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows
- Insert USB and reboot
- Press F12 until "One time boot menu" appears to choose USB as boot device
- On GRUB menu, choose Install Ubuntu GNOME
- These are the settings I used for "something else":
- leave device for boot loader installation as default
- swap space set to 10GB
- / set to 25 GB
- /home uses the rest (leave size blank)
- These are the settings I used for "something else":
- Interesting note that Fedora 25 scaled nicely for installation process, while Ubuntu GNOME was not scaled
- Didn't connect to internet during installation and didn't choose to install 3rd party software at this point
- Potential fix for login screen scaling: https://askubuntu.com/a/912789
- Did not work for me, still unresolved
- Desktop did scale on initial login, though some issues with cursor becoming small when hovering over menu bar
- Still unresolved, not a big issue
- TTY is very small text
- Tried to resolve by editing
/etc/default/grub
and setGRUB_GFXPAYLOAD_LINUX=1600x1200
- On restart it appears to be working, but after login screen loads, TTY still set to 3840x2160 (still unresolved)
- Tried to resolve by editing
- GRUB boot up menu scaling can be fixed in a couple ways:
- Via grub-customizer and setting a lower resolution: https://launchpad.net/~danielrichter2007/+archive/ubuntu/grub-customizer
- Or just edit
/etc/default/grub
and setGRUB_GFXMODE=
to desired resolution - In GRUB, navigate to console (usually by pressing 'c') and run
videoinfo
to get your machines supported resolutions for GRUB - XPS 15 4K supports: 3840x2160, 1920x1440, 1600x1200, 1024x768, 800x600, 640x480
- Or just edit
- Via setting a custom font with a larger font size via
grub-mkfont
: https://unix.stackexchange.com/a/31752/139951- This solution did not work when I tried under Fedora 25, but did under Ubuntu GNOME 17.04
- Minor, but noticeable lag in boot selection (i.e. up/down arrow) with this method
- Via grub-customizer and setting a lower resolution: https://launchpad.net/~danielrichter2007/+archive/ubuntu/grub-customizer
TLDR: sudo apt install tlp tlp-rdw
- Install powertop and powerstat to get monitor power usage:
- powerstat grabs samples of power usage and prints an average
- powertop reports what is using power
Power consumption testing done with the following conditions:
- Bluetooth disabled
- Location disabled
- Connected to WiFi
- Brightness set to 40% (8 steps up from 0 using keyboard button)
- Only application running is a single terminal running powerstat (i.e. idling state)
powerstat -d 2
run for about 5-10 samples (50 seconds)
-
Base line with no updates or anything installed
- Average consumption of 18.26 Watts
- Audio codec hwC0D0: Realtek at 100% usage as reported by powertop
-
Install tlp and tlp-rdw for basic power management
sudo tlp-stat -s
to check statussudo tlp start
to start tlp without reboot- After tlp started average consumption reduced to 9.96 Watts
- Appears to have fixed Audio codec issue
-
Updating system
sudo apt update && sudo apt upgrade
and a reboot- Upgrade from kernel 4.10.0-19 to 4.10.0-21
- Average consumption 9.87 Watts, so pretty much the same
After what I was reading online I wrongly assumed that the Nvidia GPU would be running all the time, so I thought I could achieve more power savings by disabling it. I have since come to the conclusion that the nouveau drivers act properly and are not using the Nvidia GPU, so this isn't necessary.
The following is what I tried before realizing that chasing a sub 9 Watt idle power consumption (at 40% brightness) was pointless. After reading more, I concluded this was likely only possible for XPS models with a FHD display. Anyways, here are my probably not-very-useful notes as to what I tried to get the Nvidia GPU working via optimusrun/prime-select.
- Install acpi and acpi-call-dkms to disable Nvidia GPU
-
sudo apt install acpi acpi-call-dkms
-
sudo modprobe acpi_call
-
sudo bash /usr/share/doc/acpi-call-dkms/examples/turn_off_gpu.sh | grep works
- For XPS 15 9560 should return: "_SB.PCI0.PEG0.PEGP._OFF"
- NOTE: do not run this if using nvidia drivers, I think this crashed my system when I had previously run "sudo ubuntu-drivers autoinstall", which set to using the nvidia drivers
-
echo '_SB.PCI0.PEG0.PEGP._OFF' | sudo tee /proc/acpi/call
to actually turn off the dGPU- After executing and re-running powerstat, did not observer any change in power consumption
-
Edit
/etc/default/grub
and addacpi_rev_override=5
toGRUB_CMDLINE_LINUX_DEFAULT
and reboot- No changes to power consumption, still around 12 Watts
-
- Trying an
sudo apt update && sudo apt upgrade
- This improved power consumption to an average of 9.73 Watts, unclear what update specifically caused improvement
- Possibly the upgrade from kernel 4.10.0-19 to 4.10.0-20 ?
- This improved power consumption to an average of 9.73 Watts, unclear what update specifically caused improvement
- Attempting switch to Intel proprietary drivers under "additional drivers" GUI tool
- No noticeable changes, reverted back
- Trying to install Intel Graphics For Linux Kabylake Drivers from: https://01.org/linuxgraphics/downloads/firmware
- Slightly worse power consumption now, average of 10.07 Watts, probably just margin of error