This thread is made to provide useful information regarding Linux on the Razer Blade 17". The Linux distribution used here is Arch Linux 64-bit.
Important update: There are three things that do not work out of the box in linux: (1) the keyboard, (2) some fn-keys and (3) the SBUI.
For the case of keyboard and fn-keys, solutions have been proposed and you can read the posts of this thread for more details. Starting from kernel 3.17. the keyboard should work automatically correct because the patch will be merged to the kernel. What remains of the post is what i tested around 2013 but i guess is kind of hard to keep all this information updated, so we just focus on the things that do not work. About the SBUI,
its not broken, its just that we need a driver and make apps to test on it.
-- old post from 2013 --
Summary: The laptop is capable to work under Linux but you have to fix the keyboard. The SBUI works as a trackpad since there is no software made for linux to make the led buttons and led screen work as in windows 8. Making a driver for the SBUI is indeed possible, but will require expert knowledge on USBHID devices. Lets hope Razer considers making a driver now that gaming on Linux is becoming more popular.
The rest of the thread describes several aspects that have been tested, with their respective solutions we have found. Feel free to contribute with additional info and report your problems. In the end, the goal is to make Linux a serious possibility for the Razer Blade.
1) Check basic hardware functionality. FN keys, etc.
a) Wired and Wi-fi both work out of the box with NetworkManager.
b) At the moment the brightness FN keys are the only ones that do not seem to work. It is weird considering that those are very basic... even the backlit keyboard light control works. Maybe adding some kernel modules can fix that. Screen brightness can be adjusted in gnome control panel anyways.
2) Keyboard
The keyboard on the Razer Blade Pro 17" can randomly skip some of your key-strokes when typing and also can insanely repeat the last character pressed.
It does occur very frequently and i recommend to not use the system under this conditions because the experience is very frustating.
A possible cause for this problem can be the fact that the Razer Blade Pro 17" has an anti-ghosting gaming keyboard that requires very fast polling of the device. Normally keyboards are not of this type, thus the polling rate in Linux is set to a value that is too low for the razer blade. Another reason can be the fact that the SBUI and the keyboard belong to the same USBHID device, but use different interfaces. It seems that the problem is especifically related to the Razer Blade 17" and not to the Razer Blade 14".
Update September 23 2013; The Keyboard problem can be fixed. The solution was found by FxChip from archlinux forums.
Link: https://bbs.archlinux.org/viewtopic.php?id=161634&p=1
All you need is to add a line to the usbhid module source file drivers/hid/usbhid/hid-core.c hardcoding interval = 1; right after the conditional about the polling rate of the mice. This is around line 1134 of that file, note that the location can vary a little in future versions of the kernel.
After modifying the file, you have two options: (1) recompile the entire kernel or (2) recompile the module and use it on your existing kernel. Both should work.Code:1123 /* Some vendors give fullspeed interval on highspeed devides */ 1124 if (hid->quirks & HID_QUIRK_FULLSPEED_INTERVAL && 1125 dev->speed == USB_SPEED_HIGH) { 1126 interval = fls(endpoint->bInterval*8); 1127 printk(KERN_INFO "%s: Fixing fullspeed to highspeed interval: %d -> %d\n", 1128 hid->name, endpoint->bInterval, interval); 1129 } 1130 1131 /* Change the polling interval of mice. */ 1132 if (hid->collection->usage == HID_GD_MOUSE && hid_mousepoll_interval > 0) 1133 interval = hid_mousepoll_interval; 1134 1135 /* Fix for Razer Blade 17" Keyboard */ 1136 interval = 1; 1137 1138 ret = -ENOMEM; 1139 if (usb_endpoint_dir_in(endpoint)) { 1140 if (usbhid->urbin) 1141 continue; 1142 if (!(usbhid->urbin = usb_alloc_urb(0, GFP_KERNEL))) 1143 goto fail; 1144 pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
Update September 28 2013; Important: If the fix does not work, then you have a conflict between xhci_hcd and usbhid. If this is your case, then you need to
exclude xhci_hcd from the kernel, otherwise it takes control over the keyboard functionality, making the usbhid module to have no effect, neither the fix. It seems that this is necesary in the Razer Blade 17" R3 but not in R2.
Just for reference, this is where the usbhid module is located in the kernel configuration:Code:-> Device Drivers -> USB support (USB_SUPPORT [=y]) -> <> xHCI HCD (USB 3.0) support (disable this module)
3) Install gnome3, test functionality.Code:-> Device Drivers -> HID support -> USB HID support ----> (this is the module of the fix, )
Gnome 3 works ok. Dual displays through HDMI also works.
![]()
4) Install Intel / Nvidia driver for linux. Check if optimus-type profile is functional.
a) I am using kernel 3.9.11 and the NVIDIA driver 325.15-4 as well as the Intel driver (intel-dri) work.
b) Optimus technology works perfect.
warning: do not use kernel between 3.10.0 and 3.10.9., nvidia driver will not work neither optimus technology.
c) Update September 4 2013; Kernel 3.10.10 works out of the box with bumblebee and the nvidia driver. Kernel 3.12 should include built-in switchable graphics modules.
5) Install Steam for Linux & test games, performance, etc.
At the moment no problems in steam. Fonts and navigation as functional as in windows.
a) Linux Steam games
Dota 2.
![]()
Half Life 2:
![]()
6) Check the SBUI, see if it can be used as extended monitor or not.
No progress here. By default it works as a trackpad.
7) Try the Razer SDK for the SBUI and LED buttons. If this works, then i will be very impressed; huge potential for HPC and scientific computing.
No progress
8) Test CUDA and OpenCL.
CUDA compiles and runs the SDK examples.
---------------------------
Ill keep this updated as i make progress.
-
Some updates.
-
Great info keep it coming. Very curious on your Switchblade progress also.
-
Hey, I recently bought the newest Razer Blade (not the pro) and I'd thought I would share my experiences.
I am running 64 bit Fedora 19 by itself, I removed Windows 8 completely.
I was initially surprised by how well most of the system just worked out of the box. I can only think of 3 things that didn't work, two of which I am still working on fixing.
1. The touchpad supported tapping just fine, but scrolling was non existent and all solution on Google are no help. So far I believe it's because there is a synaptics driver that isn't being loaded on system start (probably because it doesn't know that it needs to load, or what device is the touchpad).
2. The function brightness keys do not work. I thought that this was fairly ironic because the brightness keys for the keyboard, print, music keys, and sound all work perfectly but only the brightness keys do not (usually its the other way around). I am still trying to figure out a fix for this.
3. Device drivers have mixed results. I have the most recent up to date versions of the mesa (32 and 64 bit) and nouveau (64 bit only) drivers but games (only tested from Steam) don't seem to work properly. Initially they didn't work at all because I was missing a texture decompression library, which I installed from here: libtxc_dxtn-1.0.0-2.fc17.i686.rpm Download Mirrors
After I installed that the textures loaded and I could play all my games, but they were still pretty buggy and also have low performance. I have a feeling that my GeForce video card is just idling, but I cannot tell for sure. I tried to install NVIDIA's driver but after going through their process I ended up with an error and no error message. -
Some updates regarding the keyboard
@dgilmore: For the Nvidia card, have you used bumblebee to manage the intel and nvidia GPUs? should work or at least the error should be well described -
Awesome work. Do you have dual boot?
-
-
Hopefully all our Linux concerns will go away when this happens!
SteamOS
And perhaps it will help move Linux into the mainstream! -
-
Hi, i am actualy on the way to see if i can make the sbui work. I tryed Ubuntu gnome 13.10 and got some surprise
the keyboard is not working corrrectly but , the sbui is detected as razor, Usa under lsusb the sbui actualy and still works at a trackpad but acts a bit weird ... no multi-touch supported or too sensitive ? actualy turning a finger on the trackpad actualy induce right click.
the buttons actualy send something to one of the usb device... problem is on windows there is 2 razor device to razor core driver might be a key since sbui is in that driver.
i tryed conctact razor as for porting their sbui manager to linux actualy they said that they have no ETA to support alternative os -_-"
if we send a process to the sbui it might handle it once we get to know what the core module needs to do.
all apps of the sbui are actualy .exe apps that can lunch without an sbui (well they actualy crash but tryes to run)
this is a good projeck to do and i am confident that there is a way to make this work -
I've put together a small driver package for Razer Blade Pro 2014:
razer-0.01.tar.gz
Driver modules are built out of kernel tree so you don't need to patch kernel.
Features:
keyboard
- all simultaneously pressed keys reported to input subsystem
- all FN keys supported (including brightness control)
- razerblade buttons reported as F13-F22
- USB endpoint interval set to 1 (125us)
touchpad
- double finger scroll support -
Here is a small patch that I am using that supports USB 2.0 and USB 3.0. As discussed, the reported bInterval seems to be incorrectly reported as 8.
Tested with Ubuntu kernel 3.13.0-32-generic
Regards
James MichelsAttached Files:
-
-
The following patch has been accepted. I believe this will be available sometime around kernel version 3.17.
After this patch is applied, the keyboard's bInterval will be corrected so that it no longer misses keys or gets stuck keys.
FWIW, the correct bInterval is 4 instead of 8.
Regards
James P Michels III
This is a note to let you know that I've just added the patch titled
usb-core bInterval quirk
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From cd83ce9e6195aa3ea15ab4db92892802c20df5d0 Mon Sep 17 00:00:00 2001
From: James P Michels III <[email protected]>
Date: Sun, 27 Jul 2014 13:28:04 -0400
Subject: usb-core bInterval quirk
This patch adds a usb quirk to support devices with interupt endpoints
and bInterval values expressed as microframes. The quirk causes the
parse endpoint function to modify the reported bInterval to a standards
conforming value.
There is currently code in the endpoint parser that checks for
bIntervals that are outside of the valid range (1-16 for USB 2+ high
speed and super speed interupt endpoints). In this case, the code assumes
the bInterval is being reported in 1ms frames. As well, the correction
is only applied if the original bInterval value is out of the 1-16 range.
With this quirk applied to the device, the bInterval will be
accurately adjusted from microframes to an exponent.
Signed-off-by: James P Michels III <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/core/config.c | 11 +++++++++++
drivers/usb/core/quirks.c | 4 ++++
include/linux/usb/quirks.h | 11 +++++++++++
3 files changed, 26 insertions(+)
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 1ab4df1de2da..b2a540b43f97 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -199,6 +199,17 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
if (n == 0)
n = 9; /* 32 ms = 2^(9-1) uframes */
j = 16;
+
+ /*
+ * Adjust bInterval for quirked devices.
+ * This quirk fixes bIntervals reported in
+ * linear microframes.
+ */
+ if (to_usb_device(ddev)->quirks &
+ USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL) {
+ n = clamp(fls(d->bInterval), i, j);
+ i = j = n;
+ }
break;
default: /* USB_SPEED_FULL or _LOW */
/* For low-speed, 10 ms is the official minimum.
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 2c9ba4077075..bae636e2a1a3 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -145,6 +145,10 @@ static const struct usb_device_id usb_quirk_list[] = {
/* SKYMEDI USB_DRIVE */
{ USB_DEVICE(0x1516, 0x8628), .driver_info = USB_QUIRK_RESET_RESUME },
+ /* Razer - Razer Blade Keyboard */
+ { USB_DEVICE(0x1532, 0x0116), .driver_info =
+ USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },
+
/* BUILDWIN Photo Frame */
{ USB_DEVICE(0x1908, 0x1315), .driver_info =
USB_QUIRK_HONOR_BNUMINTERFACES },
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h
index 52f944dfe2fd..55a17b188daa 100644
--- a/include/linux/usb/quirks.h
+++ b/include/linux/usb/quirks.h
@@ -30,4 +30,15 @@
descriptor */
#define USB_QUIRK_DELAY_INIT 0x00000040
+/*
+ * For high speed and super speed interupt endpoints, the USB 2.0 and
+ * USB 3.0 spec require the interval in microframes
+ * (1 microframe = 125 microseconds) to be calculated as
+ * interval = 2 ^ (bInterval-1).
+ *
+ * Devices with this quirk report their bInterval as the result of this
+ * calculation instead of the exponent variable used in the calculation.
+ */
+#define USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL 0x00000080
+
#endif /* __LINUX_USB_QUIRKS_H */</[email protected]></[email protected]></[email protected]> -
This is fantastic. -
Update. The patch is in 3.17.
-
Hi guys, this is great work, thanks.
Is there any chance anything in these patches can be used to get the screen/keyboard brightness keys to register in the Razer Blade 14" 2014?
Right now on 3.14 and 3.16 the screen brightness keys don't work at all, but brightness can be adjusted by writing to /sys/class/backlight/acpi_video0/brightness. Keyboard brightness works but doesn't register as a scan code.
Furthermore (and I'm not sure if this is a hardware issue or an issue somewhere higher up in the stack) occasionally pressing the keyboard brightness keys up to brightness level 3+ will cause the keyboard to report non-stop keystrokes for the number 3 (as if the 3 key is held down) until a different key is pressed. This behavior continues until eboot. I can't reliably reproduce this but it's happened several times, so I'm unsure if this is a hardware failure, a firmware bug, or a driver bug.
I know this thread is about the Pro but I figured I'd ask in case the keyboard systems were similar at all. -
Maybe it is possible that the 3.17 kernel (which is coming soon, already in rc) can make the brightness fn keys work, i am really not sure but lets hope. -
Arch linux has officially moved to kernel 3.17
keyboard and screen brightness buttons work out of the box
At last I can delete the custom made kernel I had. -
I have the 2013 14" model and does anyone know why the touchpad acts like a mouse when run under Linux? I mean I can't do a proper two-finger scrolling
-
the two-finger scrolling works sometimes, othertimes it is misinterpreted as zoom in or zoom out. I think we still need a good driver for the touchpad. I cant believe razer does not make a driver for linux. -
Considering a lot of people would use this for software and web development this is kindof a big deal IMO.
Razer blade pro under Linux
Discussion in 'Razer' started by neoideo, Aug 20, 2013.