Dismiss Notice
Some Razer services have been impacted due to the unique circumstances COVID-19 has created. We apologize for any inconvenience and appreciate your understanding during this critical time.

Linux Kernel 4.20 fix for RB15 touchpad

Discussion in 'The Linux Corner' started by stormmore, Mar 3, 2019.

Thread Status:
Not open for further replies.
  1. stormmore

    stormmore New Member

    I have been meaning to post this for awhile now, and finally going the space to put this together for those people who have a Razer Blade 15 with the a touchpad that doesn't work when running Linux and in particular Ubuntu. The tl;dr is that there is a software fix for this in the 4.20 kernel that just works, so if your Linux distribution has the ability to install that kernel version, use it.

    For the rest of this post I am going to talk about how to do exactly that for Ubuntu.


    Before getting into it the meat of this post a little background on me. Every few years, I have attempted to install different distributions on different systems that I have owned and use Linux as my soul OS. For me, it comes down to two things; easy of install & maintain especially given pretty cutting edge hardware and, as odd as this might seem, can I play Everquest (which is what got me into Razer gear with the Naga Epic) on it.

    It has been awhile since I last attempted to do this, so when I was asked to see if I could get a software solution to the touch pad problem, I jumped at the opportunity. At this point, there was a kernel bug already filed with kernel.org team with a patch which was waiting to be added into the kernel.

    I used that patch and custom build out my Ubuntu install to verify that everything was working as intended. I was then working on getting the patch in to easily distributable packages, in particular Ubuntu *.deb. However, in the time it took to start down that path a few things changed including most importantly, the patch landed in the 4.20 kernel and with it, as will be explained, to use Ubuntu specific tools to do!

    So here's how to do it with Ubuntu! Please make sure you read this whole post before diving in.

    Initial Ubuntu 18.04 Bionic Beaver LTS Install

    I am not going to cover this in too much detail, Canonical has a simple tutorial for that . But I do want to cover some things I have experienced while trying to get an initial install done.

    The most obvious, if using the Ubuntu Desktop installer, use an external mouse to do the install. I have always found the GUI installer that is used hard to navigate without pointer control.

    The next one, you may need to add nomodeset to the kernel boot line when starting the "Live CD". To do that, when you first boot the Live CD media you will see a text based menu including an option to try Ubuntu before you install and to install Ubuntu.

    Highlight the option you want and press e, this will take you to a screen where you can modify the boot. Look for the line that begins with linux, and add nomodeset to the end of the line. Press F10 to continue booting at that point.

    This will default the resolution to as low as 800x600 which is pretty unusable for anything but the installer. Even the GUI installer can be a little bit tricky to use at that resolution. One final note on the graphical installer, a number of times after the first reboot I would end up at a black screen on the laptop.

    However, I found out that in fact it was able to display on an external HDMI screen and the issue was resolved after installing the NVIDIA drivers.

    Alternatively, you can use the Basic Server, this blog post has a really good explanation. However, I would stop just before installing your desktop of choice (half way through step 4) and install kernel version 4.20 or higher. Also, instead of using nvidia-390, use nvidia-driver-415.

    Installing Mainline Kernel Version 4.20

    The Ubuntu kernel team actually make this super issue with their ukuu (Ubuntu Kernel Update Utility) and this blog post explains how to download and install the utility. This utility makes it trivial for you to run versions of the kernel that are released by the main kernel developers, otherwise it would be a matter of downloading the code and compiling it yourself.

    While the instructions talk about 14.04 and 16.04, they are still applicable for 18.04+. Also, what the post doesn't cover is the command line version. The two commands you need to know are ukuu --check, to see if there is a new kernel and ukuu --install-latest, at time of writing this will install the latest 4.20 kernel.

    Be warned, this kernel is not supported by Canonical or by the Ubuntu kernel development team. This is mainly due to the fact that the source is from the main kernel developers and has not gone through the complete process that Canonical does to vet kernel versions for support. That includes any optimizations that they feel is necessary to make.

    Do NOT use this solution if you need to use secure boot for anything as the packages that are installed via ukuu are not signed and thus will not work. I am only installing Linux on this machine and in the short term am not too concerned about secure boot.

    Installing NVIDIA Drivers

    Just real quick here are the commands I usually to install the NVIDIA drivers:

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

    sudo ubuntu-drivers autoinstall

    At time of writing the recommended driver was nvidia-driver-415. If you want to see what drivers are available, you can run ubuntu-drivers devices, which should the devices that it can install drivers for. There is also a GUI way as part of the Software & Updates, under Additional Drivers.


    For the first time I really feel that I will not have to go back to Windows for any of my needs for the foreseeable future. A lot has changed since I last tried this, a lot of tools created that reduce the pain points I have previously had.

    I will say that it isn't quite were it needs to be or for Linux users it means that they have to delay upgrades until at least the mainline kernel supports the cutting edge tech that is quite often found in laptops. It is still a bone of contention for me that it takes so much longer for distributions, especially the bigger name ones, to get the latest hardware fully functional.

    I do get the logic they have, and the processes they have chosen to follow but at the same time, there really should be a better way for support a large user base like those who get the higher end laptops that are capability of being the true desktop replacements.

    If you have any question about my experience running Ubuntu on a Razer Blade 15, feel free to ask on this thread as I will be monitoring it.
    PalmPanda likes this.
  2. stormmore

    stormmore New Member

    How's It Running?

    At this point, you should have a fully functioning system. So what's it been like to use it for my primary machine both for work and for pleasure? Let's get the boring side out of the way, for work it has been awesome to use.

    Due to the nature of my work specifically I end up using Linux based virtual machines all the time when using Windows which quickly eats up resources (especially memory) of even some of the most well spec'ed laptops out there. Eliminating the need for virtual machines allows me to actually run more with less.

    As for pleasure, well it is all good news there too. In the time since I last attempted this it looks like the team behind Wine have been busy and they have brought a major update. While it wasn't exactly easy, there was enough information to get Everquest running successfully with some minor caveats.

    Have I Ran Into An Issues?

    Well I ran into an issue where the system stopped detecting a display attached to the NVIDIA card. It happens after an update and I suspect it has to do with the interactions between the kernel and the NVIDIA driver.

    I have also hit a problem with my media buttons which causes the system to basically log me out if I use them. Again this is another one that happens after I do an update but totally weird and I haven't had time to track down yet.

    What Else Have I Tested So Far?

    Well since confirming that 18.04 worked reasonably, I have reinstalled the system but this time using 18.10 Cosmic Cuttlefish. As 19.04 Disco Dingo is around the counter now, I took a freshly installed 18.10 Comic, pre-4.20 kernel install and upgraded it to 19.04 Disco.

    When will Ubuntu support kernel version 4.20?

    That I am not 100% of, what I do know is the answer depends a lot on if you only care about the touch pad fix that is in that version. If the answer is yes, then it is possible that Ubuntu to get an updated kernel version that fixes the version of the kernel they do support.

    If you are partial to the LTS versions of Ubuntu, beware that there is 2nd supported kernel that may have the fix for the touch pad now that 18.04 has had it's first point release. This is the hardware enablement kernel (HWE) and which if you are running 18.04.2, would have 4.18 plus what ever Ubuntu has modified.

    For the record, 19.04 Disco is slated to have kernel version 4.19.

    It is worth noting, that I did regular attempt to use these other updated kernels and at time of writing always had to install the mainline 4.20 kernel using ukuu or a custom built kernel to get the touch pad to work.

    Secure Boot, Is It Possible?

    To make it possible to run the 4.20 kernel version and to use secure boot, you would have to download the unsigned package version. This post explains the process. It definitely it isn't for the faint of heart.

    What next?

    Well, there are a couple of things I want to test and potential fix the signed kernel problem. Version 5.0 of the kernel is already in early test versions and I want to see how well that works and what issues that might have.

    Since I am looking at creating a signed kernel, I want to look at optimizing the kernel's core modules to the specifics required for the Blade as well. The goal to make it easier to install a kernel you know that will work with and is optimized for your Blade.

    I also want to go further into optimizing the configuration to maximize either battery or performance and potential creating packages to easily distribute these files.
    PalmPanda and Panaman like this.
Thread Status:
Not open for further replies.
Sign In with Razer ID >

Don't have a Razer ID yet?
Get Razer ID >