Running on the Low Latency Kernel
Around 3 years ago, triggered by getting a Lenovo X1C6 to replace my Macbook Air, I started tinkering with performance tweaks a bit more than before and one of the things I noticed is that if I use a low latency kernel, at least for my specific type of usage, the overall experience is a bit snappier. Since then, I have used the low latency kernel with Ubuntu on pretty much most of my daily drivers and the experience has been consistently better at least for what I do.
If you are following me here already, you will probably have noticed that I recently switched to a System 76 Lemur Pro as my daily driver and since running an OS made by the hardware vendor has obvious merits, I also went with Pop! OS when I made the switch. So-far, my experience has been great with very minimal gripes which I will save for another post.
One of the main perks of buying a Linux laptop is that it comes optimized and there’s very little to tweak beyond your own personal visual preferences and such. So I have been just running on the stock kernel and had completely forgotten about the low latency option.
A few days ago, as I started reading up a bit on low latency kernels for audio production (what most people need the low latency kernel for) during my nightly wind down, I got a bit curious about the performance difference if I were to run the low latency kernel with Pop on my Lemur Pro. Then, today, I got a message from a fellow Lemur Pro owner asking about it so it kicked me over the edge and I decided to give it a go.
Pop! OS uses systemd-boot instead of grub so it took me a little while to figure out how to make the switch but after a few rounds of DuckDuckGo, I was able to lock in a pretty easy way to swap out the kernel.
Disclaimer: I’m not responsible for any damages or injury, including but not limited to special or consequential damages, that result from your use of the below instructions.
$ sudo apt update && sudo apt install \
linux-headers-5.8.0-31-lowlatency$ sudo sudo kernelstub -k /boot/vmlinuz-5.8.0-31-lowlatency -i /boot/initrd.img-5.8.0-31-lowlatency$ sudo reboot
And… voila! The system booted up with the low latency kernel. However, when it first booted up, after I logged in, input (mouse and keyboard) was frozen up for a little bit. After a couple of minutes, it was back to normal and then things not only went back to normal but the system as a whole felt a bit snappier. Though I am immediately noticing that I am loosing a nominal amount of battery life (less than 5% of battery in a 4 hour time frame) which is to be expected.
So for the next few days, I will be running on this kernel a bit more and will report back if there’s anything noteworthy. My only concerns now are one, I am not familiar with systemd-boot so I am unsure if the above method has any repercussions and two, I am not sure how safe it is to run the low latency kernel with the rest of System76’s customized pieces against this hardware. I guess off to more reading and perhaps maybe even ask System76 support.