Installing Ubuntu 18.04 on Lenovo ThinkPad P1

Rong Ou
2 min readJan 12, 2019

--

I just got a Lenovo ThinkPad P1 Mobile Workstation from work. It has an NVIDIA Quadro P1000, a Pascal GPU that’s needed to run cuDF from RAPIDS, which is my main motivation. It took some effort to get Ubuntu 18.04 installed and configured properly on it, so recording this information here for my future self, or anyone else who is doing something similar.

  • First, create a bootable USB stick. You can follow this tutorial.
  • Go into BIOS by hitting the Enter key on startup and then F1. Make sure you have a recent version of the BIOS (on mine it’s 1.17). If it’s too old, you may want to upgrade the BIOS first.
  • Under Security>Secure Boot, disable Secure Boot. This is needed because NVIDIA drivers are not signed.
  • If you have a Thunderbolt docking station with multiple monitors, I find that it behaves much better when using the discrete GPU. Go into Config>Display>Graphics Device, change from Hybrid Graphics to Discrete Graphics.
  • Hit F10 to save the changes and restart.
  • On startup, hit Enter again, and then F12 to temporarily select your USB stick as the boot device.
  • When you see the GRUB boot menu, select Install Ubuntu and hit the E key. This bit of information comes from this post. The default options won’t work here; you’ll crash on the video drivers.
  • Change the “set…” line to set gfxpayload=text
    (or it will try running in a video mode that doesn’t work)
  • Change the “linux…” line to linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity nomodeset
    (removing quiet so you can see what happens if it hangs, and splash so it’s not hidden by a splash screen). nomodeset prevents the nouveau video driver from trying to take over.
  • Press fn+F10 to boot.
  • Let the installation run its course.
  • After the first reboot, you might get stuck. What worked for me was to type Ctrl+Alt+F1 to drop into a text terminal and run sudo ubuntu-drivers autoinstall to install the NVIDIA driver.

Ran into a couple of issues after installation.

  • To get the Thunderbolt docking station to play nice, edit /etc/systemd/logind.conf and set HandleLidSwitch=ignore.
  • After installing docker-ce, I had to add to /etc/NetworkManager/NetworkManager.conf:

[keyfile]
unmanaged-devices=interface-name:docker0

and in /etc/network/interfaces:

iface docker0 inet manual

Now everything seems to be working properly.

--

--