Tweaks to make ubuntu work on Razer Blade
So, installing Ubuntu 17.04 or 17.10 on a Razer Blade(2016, i7, 1080p matte display and GTX1060) isn’t exactly a breeze. Here are things that I had to tweak to get a functional Linux machine
Graphics Drivers:
For some reason, when I booted up Ubuntu, the machine went into a frozen state after the login screen. I could hear sounds but nothing showed up on the display. Googling made me realise that the problem was that the Intel graphics drivers were not functioning properly. I couldn’t find any newer drivers, so I decided to set Nvidia as the default graphics option. This was simple enough:
Hit Alt-f2
on the login screen to go into terminal mode:
sudo apt-get install prime-select
sudo prime-select query
<This will most probably say intel. If not, then this may not work for you>sudo prime-select nvidia
sudo reboot
On reboot, nvidia drivers kick in and Ubuntu worked fine. The only drawback now is that my battery life is lower ( I get around 3 hours from 100% to 10%) due to the discrete GPU running all the time.
Touchpad
Update since first post: I found a way to get the trackpad to behave on Ubuntu. The solution was actually really simple. I removed the xserver-xorg-input-synaptics package by running sudo apt-get remove xserver-xorg-input-synaptics
` and rebooted the system. On reboot, palm detection worked perfectly and ghost clicks stopped. Nirvana!
Apart from these hiccups, Ubuntu on the Blade is awesome. I don’t have to deal with crazy windows eccentricities ( I guess I’m used to linux eccentricities by now), and performance like boot times and app-open times are a little faster than Win10 in my opinion.
Suspend issues
Nov 2017: I finally got tired of working with Windows, and cleaned up my system to be an Ubuntu-only machine. This worked well for all usecases except one: the laptop would go into a suspend loop whenever the lid was closed. After some searches, I found that this was a known issue with the Linux kernel and needed some tweaks in the grub cmd line to fix. In doing so, I found a very nice place where all issues with Razer Blade are documented. Following the steps there, I added a command line parameter to the kernel which instructs the laptop lid open event to be sent explicitly. One reboot, and voila, suspend works now!
Edit the /etc/default/grub
file and add this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash button.lid_init_state=open"
Now, re-compile the grub file with this: grub-mkconfig -o /boot/grub/grub.cfg
. (Hat-tip to Alfredo Egaf and Gavin Mitchel Dundee for pointing out the error in my previous version)
Themes and applications
Feb 2018: The cool thing about Ubuntu is the OS-wide dark theme. It just makes everything so much easier on the eye. The not-so-cool thing? Google doesn’t play nicely with the rest of the world.
Since I’m on Ubuntu, I use Firefox as my browser, and with the release of quantum, I don’t feel any regrets at all about the switch. Any, except for this one odd little thing:
No text box works in Google Drive (Docs, sheets, slides, everything). Obviously, Chrome ignores the system-wide dark theme, so everything works fine on Chrome. But, all is not lost for us rebel Firefox-ers. With yet another tweak in the command line, everyone is happy again.
sudo vim /usr/lib/firefox/firefox.sh
. Add this one line at the top — export GTK_THEME=Adwaita:light
, restart Firefox and we are back to a fully functional Google drive on Firefox.
The caveat? This step needs to be repeated every time Firefox gets updated. I haven’t found the tweak to keep this setting across updates yet. Anyway, back to a fox-y future!