I firmly believe that using open source software is an important prerequisite for reproducible and accessible research. We cannot expect others (think e.g. students or researchers in developing countries) to buy super-expensive software to reproduce research. We should also make sure that the code we use, including the applications we run the code on, are free and transparent.
Equally, I believe that we as academics have a special responsibility to teach our students to become free and independent digital citizens. That entails keeping a healthy distance to the closed eco-systems of commercial operating systems such as Windows or MacOS (not to speak of Android or iOS) which collect ever more data about everything we do on our computers and online. GNU/Linux operating systems are an open-source alternative where we can actually decide freely how much information about ourselves we share with others. Linux is also a great OS to run scientific software since it is lightweight in terms of resources. Also, most Linux distributions have the most important open source scientific software ready to install in their repositories. So, while setup may be a little more involved than with a Windows or Mac computer, you benefit from it later on, when installing and maintaining things gets a lot easier (If you’re an economist: ever tried to configure a Mac for using, e.g. Dynare and Octave? Well, you see. In Linux Mint that’s two mouse clicks in the software repos….)
I have now used Linux as my main driver since 2009. Since 2012, however, I used a Mac, with Linux running in a virtual machine. This came from my frustration at the time about the many driver and periphery management issues I had encountered with the Linux versions that were around back then. But Linux development hasn’t stopped and today the situation is hugely improved. At the same time, MacOS development has virtually stalled and on the Windows side, forced updates have wreaked havoc on the data of many users. Therefore, it was time again to give a plain Linux install a new chance when my old Macbook Pro had to be replaced recently.
Here are some experiences and things I learned when configuring and installing Linux Mint 19.1 on my new Dell Precision 5530 (64 GB, 2TB SDD, 4K display, NVida P1000) with TB 16 Dock and an external 4K Dell Display. Maybe they are useful for others interested in making the switch.
Before you start, be aware that you can make your life easier by buying the model I have with Linux Ubuntu 18.04 pre-installed. In fact, my machine didcome with Ubuntu pre-configured and it worked very nicely. However, I have a preference for what I consider the rounder (and actually more Windows-like) user interface of Linux Mint. I am just more productive on it. But that’s a matter of taste. Since Linux Mint is based on Ubuntu, most of the experiences below should also be useful for anybody wanting to install Ubuntu on a DELL Precision Laptop.
1.Prepare a bootable USB stick with Linux Mint 19.1
2. Next step is to convince your computer to boot up from the memory stick. Given the secure boot settings on all new machines, that has become a bit complicated in the last couple of years. Here is what to do on the DELL Precision 5530:
— Before we start, note that I did a clean install, wiping my entire hard disk, so I didn’t keep another Ubuntu or Windows installation as dual boot. This would probably complicate things.
— When booting up the computer, press F2 as soon as the DELL logo appears. This gets you into the BIOS. In the BIOS, you have to change the setting to enable legacy boot devices, change to legacy boot in “boot sequence” and then allow to boot from USB, moving this up in the boot order.
–Save these settings, plug in your USB stick and reboot the computer
— As soon as the DELL logo appears, press F12. This should get you into a screen where various boot options are given. If your USB stick is not recognized, follow the link to enable legacy boot, which takes you back to the step above.
— Boot up from your USB stick. If at all possible, in EFI mode.
— This was the hardest part. Once your USB stick is recognized, you will boot into an Linux Mint and can follow the guide through install process. It is important, the installation happens as EFI (legacy boot options do not work permanently in the DELL Precision, so you always fall back into EFI. So if you happen to install Linux Mint in Legacy mode, you will not be able to boot into that unless you repeat the above steps all the time by switching to Legacy boot in the BIOS since the Legay Boot option and sequence does not seem to be saved permanently. This jappened to me until I figured out that once the USB stock is recognized in EFI mode, your installer will automatically guide you through an EFI install process.
— I installed Linux Mint w/o encryption of the Hard Disk. I don’t need that, I encrypt truly confidential data with cryfs on a folder-by-folder basis. I therefore have no idea how full encryption would affect system performance or if it would create issues of its own.
What I would clearly caution against is to choose local user folder encryption at install. That can create all kinds of problems, in particular, you will not be able to use Dropbox for Linux easily anymore. Since I am a heavy user of Dropbox for my collaboriative projects, that was no go.
— Once the installer has completed, you can restart the computer (I had to shut down from the live session pressing the power button, it would not shut down on its own in finite time)
— Machine restarts. You will usually not see a GRUB screen but at one stage, you see the Linux Mint logo appearing. You already are looking forward to starting to use Linux Mint on your DELL. But not so — the boot process will hang before you get to the login screen.
Here is how to deal with this: Restart the computer, pressing the power button. Then press SHIFT (for EFI installs). Eventually, you will see a GRUB menu (which is, by default, hidden after a clean wipe install, since there is only one OS to boot anyway). It may take a couple of attempts to get to the GRUB Menu, since the DELL Precision 5530 is so damn qick (you may also try pressing Esc, but for EFI installs it should truly be SHIFT).
Once you get to the GRUB Menu, press “E”. This will give you the boot loader script for the currently selected boot option (you choose the first one, Linux Mint 19.1, which is set as sdefault anyway. There may be others (including a recovery option))
Once you see the bootloader script, replace the words “quiet splash” with “nomodeset” in the line starting with “linux”.
(See the guide in the Linux Mint forum here: https://linuxmint-installation-guide.readthedocs.io/en/latest/boot_options.html#nomodeset-boot-option)
Be careful not to mistype or delete anything here (the editor is very sluggish and the font will be tiny with a 4k screen). If you think you have mistakenly deleted or changed something else than the above “quiet splash”, just exit and start over with this step.
Once you have successfully typed in “nomodeset”, you can press CTRL+X or F10 and the machine will start to boot and get you to the login screen. Once you are in your Linux Mint session (probably it will be on software rendering mode, making screen display etc quite slow) you should install the nvidia drivers as described here: https://linuxmint-installation-guide.readthedocs.io/en/latest/drivers.html
Once you have successfully installed the driver using NVidia Prime, you can restart the computer (it should now restart from using the appropriate menu items from within the Linux session)
DONE. Once you are restarted and logged in again, you are all set. You can now start to customize and get your Dell ready for work. Two important things I noticed:
- Resume suspend in NVidia mode does not work well, at least not if the NVidia Prime configuration menu (with all the settings for the graphics card is active). So here is what I did: I chose Intel mode (required password and login/ logout). Then suspend / resume works fine. I can even switch back to NVidia mode, activating it by logging out and in again (in which case, I do, however, not get back all the setting options in the prime menu). Then suspend /resume also works. (I have not tested if that really activates the Nvidia GPU, though). Careful however: if you leave NVidia mode on and restart the computer, you will again get the full Prime menu with all the settings for the Nvidia GPU — but also all the problems concerning resume/suspend.
At first, Ithough I would just live with this bug, by keeping the machine mostly in Intel mode where everything works. I have 64 GB of memory, so standard graphics on web pages, video streaming etc. really works very fast, even in Intel mode. However, the NVidia resume-suspend issue evaporated once I tackled another inconvenience:
- Even though resume / suspend worked out of the box in Intel mode, the default mode after the Linux Mint install on my machine was “sleep2idle”. You actually should permanently change the mode to “deep”, which uses considerably less battery (sleep2idle keeps all the USB ports and other interfaces waiting for inputs while “deep” only keeps the RAM refreshed and switches off the CPU and everything else to save energy). See the discussion of system sleep states in the Linux kernel documentation here:
The sleep mode has to be set by passing the parameter mem_sleep_default=deep to the Linux kernel on startup.
This has to happen by editing the GRUB configuration file:
“sudo xed /etc/default/grub”
Then add the parameter “mem_sleep_default=deep” at the end of the line starting with GRUB_CMDLINE_LINUX_DEFAULT, so that it looks like this
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash mem_sleep_default=deep”
Save the file. Then run
See here on more detail about how to edit the the grub boootloader configuration:
On the next reoboot, your machine should start with “deep sleep” enabled. (You can check by typing
“cat /sys/power/ mem_sleep”
in a terminal. This should give you something like
i.e. the current option appears in square brackets.
Remark 1: Setting the sleep mode to [deep] also solved the suspend-resume hick-ups when in NVidia graphics mode. Resume/Suspend now works perfectly fine in both graphics modes.
Remark 2: to get the TB16 dock working on the Dell Precision 5530, you need to disable Thunderbolt Security to “None” in the BIOS and you should also disable the C-Dock option in the BIOS (otherwise you may get periodic disconnects of mice or keyboards or other peripherals attached to the dock).
Remark 3: You also get very good battery life on this powerful machine if you install the tlp tools:
“sudo apt install tlp tlp-rdw”
Then, after each fresh user login type at terminal
“sudo tlp start”
This will launch the tlp power management which on constant web use while typing and editing e-mails and having around 10 demanding tabs open in Firefox and runing some other office app such as Open Calc or Lyx and with the occasional hi-res music stream from Qobuz gives me 5-6 hrs of battery life, which is better than what I ever got out of my old (2015) MacbookPro15.