Table of Contents

Razer Blade Stealth Compatibility

As a Razer Blade Stealth owner, since Stealths have a few known issues with their Linux compatibility here is a good place to start for work-arounds and temporary fixes :

Roland Guelle GitHub

In this page I listed all the fixes and workarounds I had to implement to get a working version of Linux Mint 19.1 on my RBS. It was not very difficult and not a frustrating experience at all.

I have not encountered all the bugs listed in Roland Guelle's GitHub so I have not yet applied all the fixes he proposes. Some of them were of assistance though.

My Stealth Model is a RZ09-0239

First Installation

Following Roland Guelle's instructions, the first things I did before attempting to install Linux in dual boot were :

First run

Key rule in systems : if it works, don't break it

Bug Fixes

Closing lid doesn't suspend

Apparently this issue was encountered on some laptops running different versions of Ubuntu from 16.04 upwards.

This fix uses pm-utils which is usually installed on fresh installs of mainstream distributions. We backup the configuration file we will tweak just in case.

sudo apt-get install pm-utils
sudo cp /etc/systemd/logind.conf /etc/systemd/logind.conf.bak
sudo gedit /etc/systemd/logind.conf

Uncomment the following lines and change the values accordingly :

HandleSuspendKey=suspend
HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend
LidSwitchIgnoreInhibited=yes

Edit the Grub conf file and add this value :

sudo gedit /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="button.lid_init_state=open"

More info on button.lid_init_state

Screen Flickering

The screen flickering issue causes the screen to flicker to black for an instant. You can check this by running :

dmesg | grep 'ERROR'

You have the issue if you see one or more lines like theese

[drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun

A work-around to this issue is adding the following parameter to the kernel :

intel_idle.max_cstate=4

To make the change apply on every boot add it in the file

/etc/default/grub

at the following line :

GRUB_CMDLINE_LINUX_DEFAULT="intel_idle.max_cstate=4"

Run :

sudo update-grub

and reboot to apply.

You can check which parameters were passed to kernel at boot by running :

cat /proc/cmdline

Screen Flickering on external monitor

Screen seems to randomly go black on external monitor.

GitHub thread on the subject

Setting the sound output to “HDMI / DisplayPort - Built in Audio” seems to fix the issue.

Another workaround if the previous option is not available could be to plug an audio output to the 3.5 jack → This needs to be validated by experience (23/06/19)

RBS set up for smooth mplayer experience

Tweaks

Multitouch gestures

This requires to be using libinput instead of synaptics. You can check this by running these commands using the proper device ID.

xinput list
xinput list-props <DEVICE-ID>

Install the following packets :

sudo apt install xdotool wmctrl libinput tools
git clone http://github.com/bulletmark/libinput-gestures
cd libinput-gestures
sudo ./libinput-gestures-setup install

Add your user to 'input' group and log out/log in to validate the change :

sudo gpasswd -a $USER input

To start the process, or restart it :

libinput-gestures-setup start|stop|restart|autostart|autostop

Note : the autostart/autostop will enable the app to start/stop automatically on login

The configuration file is located at /etc/libinput-gestures.conf and a user-specific one can be created at ~/.config/libinput-gestures.conf

More ressources on libinput-gestures github

OpenRazer Daemon & Polychromatic Controller

Install the OpenRazer Daemon :

sudo add-apt-repository ppa:openrazer/stable
sudo apt update
sudo apt install openrazer-meta

Install the Polychromatic Controller :

sudo add-apt-repository ppa:polychromatic/stable
sudo apt update
sudo apt install polychromatic

Add user to plugdev group :

sudo gpasswd -a $USER plugdev

Note : Hardware security signing features need to be disabled in BIOS for the daemon to work properly.

OpenRazer Official Site Polychromatic Controller GitHub

Horizontal Scrolling

Horizontal scrolling is deactivated on the touchpad by default. You can check this by running

xinput list

A list will appear looking like this

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Razer Razer Blade Stealth               	id=12	[slave  pointer  (2)]
⎜   ↳ Razer Razer Blade Stealth               	id=13	[slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                        	id=14	[slave  pointer  (2)]
⎜   ↳ 1A586757:00 06CB:8323 Touchpad          	id=15	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Power Button                            	id=8	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=9	[slave  keyboard (3)]
    ↳ USB Camera: USB Camera                  	id=10	[slave  keyboard (3)]
    ↳ Razer Razer Blade Stealth               	id=11	[slave  keyboard (3)]
    ↳ Razer Razer Blade Stealth               	id=16	[slave  keyboard (3)]

My touchpad id is 15. You can list the device properties by running

xinput list-props 15

Change the following line from 0 to 1

libinput Horizontal Scroll Enabled (284):	0

By running :

xinput set-prop 15 284 1

Change your device ID and libinput property if required (respectively 15 and 284 here).

To render this change permanent at every boot, add this command at startup :

xinput set-prop "1A586757:00 06CB:8323 Touchpad" "libinput Horizontal Scroll Enabled" 1

Device IDs and libinput property numbers may vary so it's best to use the full identifiers in this case.

There might be a way to edit the config file located at /usr/share/X11/xorg.conf.d/40-libinput.conf and adding something but I haven't been able to make it work that way yet.

Razer Core X eGPU

Introduction

When it came to selecting an eGPU to use under Linux the Razer Core X seemed to be a great value for the money in fall 2021.

I chose the Core X over the Core X Chroma because the price difference was huge (220€ vs 365€) with the only benefit of an added 4 USB 3.0 ports, a 1Gbps Ethernet port and of course some LED lighting. Although having those ports directly on the thunderbolt bus would be great and works well in Windows and MacOS, people have reported issues in Linux (as of 2020) due to a few bugs in the integration of the USB controller used in the Core X Chroma.

Although the Thunderbolt implementation reserves a 10Gb/s bandwith specifically for other devices than PCIe (i.e. network, USB, etc.) and the problem above might one day be solved by new patches in the Linux Kernel, there are plenty of USB 3.0 adapters/hubs that also include Gigabit Ethernet for a lot less than 150€, and the Razer Blade Stealth has 2 USB 3.0 ports available.

Installing and Initializing

$sudo apt install bolt thunderbolt-tools
$boltctl 

This is the same as 'boltctl list' and should list the Razer Core X

$boltctl authorize xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx 

Replace the last argument by the UUID of your device. Do this step only if the status is 'connected' and not 'authorized' when using 'boltctl' at previous step

$lspci

The eGPU should appear in a line starting with 'VGA compatible controller […]

Install appropriate drivers for the eGPU you are tunneling through Thunderbolt.

Configuring X11

You need to write an xorg.conf file to force X11 to use the eGPU. Create/Edit /etc/X11/xorg.conf and add the followin lines :

Section "Module"
    Load "modesetting"
EndSection
 
Section "Device"
    Identifier "Device0"
    Driver     "nvidia"
    BusID      "PCI:7:0:0" //Switch this to your BusID as revealed by using 'lspci' command
    Option     "AllowEmptyInitialConfiguration"
    Option     "AllowExternalGpus" "True"
EndSection

One of the drawbacks of eGPU usage in Linux is the lack of hotplug functionnality. The above xorg.conf file must be removed or commented out after unplugging the eGPU so as to have X11 not rely on it anymore.

GSwitch Project

Which brings us to this simple tool developped to simplify the loading/unloading process : GSwitch Git Hub

Simply follow the instructions to install and setup (very easy and straightforward) and it will swap from external to internal gpu using the following commands :

$sudo gswitch egpu
$sudo gswitch internal

Note that the thunderbolt device has to be in authorized status for this to work, and this has to be done manually at every connection (unless you automate it).

Useful Ressources

eGPU.io Forum

Another eGPU.io Forum

Claudio Walser eGPU Setup Git Hub

Blog Post of Core X Chroma integration in Linux

Antoher (more complete) Blog Post of Core X integration

Linux Kernel page over thunderbolt

GSwitch Git Hub

A 2017 dated advanced eGPU guide in Linux. Useful for in-depth tech info