====== 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 : [[https://github.com/rolandguelle/razer-blade-stealth-linux|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 : *Run all Windows 10 updates. *Check for INTEL-SA-00086 Intel Management Engine Critical Firmware Vulnerability (my Stealth passed the test successfully and was not vulnerable) *Clean up and free space using Windows utility (Start > cleanmgr (Run as Administrator)) *Clean using [[https://www.bleachbit.org/|Bleach Bit]] *I did not use Windows to resize the disk as Roland did. Instead, I ran a live session of GParted to resize the Windows partition to smaller than Windows 10 would allow (465GB > 120GB) *I ran a live session of Linux Mint 19 (linux kernel 4.15.0-20) and used the installer. Contrary to previous versions of Ubuntu installers it did not end with segfaults as Roland's did and the installation was correct. *Be mindful that the disk tag is not a classic /dev/sdx# but something more fancy like /dev/nvme0n1p# *The dual boot did not break Windows boot and Grub was installed correctly. ===== First run ===== *Setup timeshift to make system snapshots daily, weekly, monthly and at boot *Update intel microcode as advised by Roland (and reboot) *Update the system **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" [[https://patchwork.kernel.org/patch/9512307/|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. [[https://github.com/rolandguelle/razer-blade-stealth-linux/issues/18|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 === *Remove media OSD in Cinammon > System Settings > Notifications *Switch Background to full black *//Careful, switching workspaces causes little stutters on the external monitor// *Some unidentified manipulations can cause the terminal running mplayer to have a CTRL-lock even with the CTRL unpressed. This locks you out of mplayer -> Investigate ===== 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 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 [[https://github.com/bulletmark/libinput-gestures|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. [[https://openrazer.github.io|OpenRazer Official Site]] [[https://github.com/polychromatic/polychromatic|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.