Ubuntu 18.04 on Dell Precision 5520

The “new” work laptop was pre-built with Windows 10 instead of LDE. So it’s time to have some fun with a fresh install of Ubuntu (18.04) on a nvidia laptop. As usual, going to start with a dual-boot setup first to kick the tires.

Sorry (to myself) if this is a bit rushed; didn’t write it all down (on mobile) during the install…

TL;DR

  • Resized the Windows partition inside Windows.
  • No grub/conf changes were needed to boot the ISO (in UEFI mode).
  • Ubuntu installed using normal “alongside Windows” option.
  • When “MOK Management” screen comes up, make sure to “enroll”.
  • Follow post-install instructions for better power management.

Reduce Windows partition size

Used the notes from the internet about fully resizing the Windows partition:

  1. Disable hibernation using powercfg /h off
  2. Disable pagefile
  3. Disable system protection

(Remember to reverse the steps after resizing.)

Install Ubuntu

Create a USB stick version of the Ubuntu Desktop 18.04 ISO, using the Ubuntu built-in creator tool.

Using F12 during system boot, trigger the “one-time boot” menu. Select the UEFI USB option. Installed as normal, with all the options: 3rd party software, updates during install, etc.

On the parititioning screen, selected the “alongside Windows” option. Installer properly configured a partition in the free space.

Note the Secure Boot instructions; wasn’t clear to me at first…

Restart and First Configuration

The first boot, the “MOK Management” screen will show up. Make sure to enroll your key.

Make sure both Ubuntu and Windows both boot properly from the GRUB screen.

Remember to fix Windows to use store the system time as UTC instead of local time:

Reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_QWORD /d 1

Configure Ubuntu

Follow the post-install script to make sure power management runs well. (Went from ~2h to ~6h battery life.)

sudo add-apt-repository ppa:linrunner/tlp
sudo add-apt-repository ppa:graphics-drivers/ppa

sudo apt update

sudo apt install thermald tlp tlp-rdw powertop

sudo ubuntu-drivers autoinstall

sudo prime-select intel

Create /etc/modprobe.d/i915.conf with the following contents, then run sudo update-initramfs -u:

options i915 enable_fbc=1 enable_guc_loading=1 enable_guc_submission=1 disable_power_well=0 fastboot=1

Modify /etc/default/tlp and set RESTORE_DEVICE_STATE_ON_STARTUP=1.

Update grub options in /etc/default/grub, then run sudo update-grub:

GRUB_CMDLINE_LINUX_DEFAULT=quiet acpi_rev_override=1 acpi_osi=Linux nouveau.modeset=0 pcie_aspm=force drm.vblankoffdelay=1 scsi_mod.use_blk_mq=1 nouveau.runpm=0 mem_sleep_default=deep

Install libinput-gestures to get additional touchpad gestures support. Decided not to install the GUI, as the config file defaults (/etc/libinput-gestures.conf) was sufficient.

sudo apt install libinput-tools xdotool wmctrl
git clone https://github.com/bulletmark/libinput-gestures.git
cd libinput-gestures
sudo make install

Fix up fonts on GRUB and the console so it’s not so tiny (HiDPI screen).

sudo grub-mkfont --output=/boot/grub/fonts/DejaVuSansMono24.pf2 \
  --size=24 /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf

Then modify /etc/default/grub and change GRUB_FONT:

GRUB_FONT=/boot/grub/fonts/DejaVuSansMono24.pf2

For the console,

sudo dpkg-reconfigure console-setup

and select a font that is NOT ‘Fixed’, e.g. Terminus. When asked about font size, select ‘16x32’.

Ubuntu Packages and Stuff

Finally, configure dotfiles and install packages…

  • git
  • gnome-tweaks
  • htop
  • jsonlint
  • libxml2-utils
  • lighttpd
  • moreutils
  • net-tools
  • network-manager-openconnect-gnome
  • p7zip-full
  • slack-desktop
  • sshfs
  • steam-launcher
  • typora
  • vim-nox
  • xsltproc
  • wireshark

And gnome extensions…

  • Alternatetab
  • Drop down terminal
  • Lock keys

And gnome tweaks…

  • Fonts > Window Title > Cantarell Bold 10
  • Fonts > Interface > Cantarell Regular 9
  • Fonts > Document > Sans Regular 10
  • Fonts > Monospace > Monospace Regular 9
  • Top Bar > Activities Overview Hot Corner > Off
  • Top Bar > Date > On