Razer Blade [Gen 1]

I have a Razer Blade, 1st generation, which I've set up dual-booting with Windows 7. It all works pretty well except for two things.

1. The keyboard sometimes 'swallows' keys. When I type slowly, every key produces the letter intended. But when I speed up, keypresses seem to get eaten and random letters go missing. This does not happen in Windows. It is reproducible in a vt session, so it's nothing to do with X.2. The touchpad jitters. I tried to fix it, but found out that the touchpad registers with evdev as a pointer instead of a touchpad.

Re: Razer Blade [Gen 1]

Nope, never did resolve it. I'm pretty sure the issue requires a keyboard/mouse specific driver in the kernel itself. It doesn't seem to be anything I can fix in userspace.I don't think there are enough Linux users with Razer Blades (what with the gaming aspect) for them to give it too much attention, especially because it's not a piece of hardware the typical Linux dev can obtain easily.

The way I'm currently using Arch is by using its partition as the virtual image for VirtualBox, as per https://wiki.archlinux.org/index.php/Vi … ical_Drive. Be aware that the page is somewhat out of date and requires some fiddling to get working, especially in the area of creating a VM image that points to the hard disk. I'm not sure what I did to set it up (being at least half a year ago), but I can share my settings if desired.

Re: Razer Blade [Gen 1]

That is unfortunate . Thanks for the Virtual Box idea, i will keep it in mind.

I will still try to see if its possible to do something about this. Maybe I (or we, razer linux users) can make a module for the kernel fixing that issue. Ill try to get more info on this issue and directions from the experts.

Re: Razer Blade [Gen 1]

As far as the keyboard issues go, I find it strange that it doesn't happen in Windows. Even stranger is that, occasionally, the keyboard and mouse will flake out and crash. This eventually happens in Windows as well at times -- but at least it doesn't miss keystrokes (and recovery time is thankfully low). I always seem to find these errors when it happens:

These indicate that the USB hardware found some fault going on in communicating directly with the hardware device. Unfortunately, there doesn't seem to be any way to upgrade firmware or anything.

By the way, what you're seeing with regards to the pointer: in my experience, when the system first boots, both keyboard and mouse remain in compatibility modes, presenting as standard USB HID devices (interestingly, the mouse implements pinch-to-zoom in hardware in this mode). This changes when the interface corresponding to the trackpad is told to use alternate setting 1 -- but not only does the trackpad start operating under those conditions, the keyboard will start sending HID reports on its other input interface, too. The neat thing about some of those is that the keyboard is able to report more characters than it would under the Boot USB Keyboard standard, which probably accounts for some of the anti-ghosting. However, in my tests, I haven't yet been able to catch the keyboard misbehaving. I almost want to say there's a good chance stuff is being ignored by the kernel, but... can't prove it.

Also, my synaptics driver (on that site) is still being developed and tested. Use at your own risk. Although the biggest problem you'll probably run into is an insane amount of jitter. Sometimes the multitouch won't work properly, either (or it might take a second). The damn thing samples way too quickly.

Re: Razer Blade [Gen 1]

As far as the keyboard issues go, I find it strange that it doesn't happen in Windows. Even stranger is that, occasionally, the keyboard and mouse will flake out and crash. This eventually happens in Windows as well at times -- but at least it doesn't miss keystrokes (and recovery time is thankfully low). I always seem to find these errors when it happens:

These indicate that the USB hardware found some fault going on in communicating directly with the hardware device. Unfortunately, there doesn't seem to be any way to upgrade firmware or anything.

By the way, what you're seeing with regards to the pointer: in my experience, when the system first boots, both keyboard and mouse remain in compatibility modes, presenting as standard USB HID devices (interestingly, the mouse implements pinch-to-zoom in hardware in this mode). This changes when the interface corresponding to the trackpad is told to use alternate setting 1 -- but not only does the trackpad start operating under those conditions, the keyboard will start sending HID reports on its other input interface, too. The neat thing about some of those is that the keyboard is able to report more characters than it would under the Boot USB Keyboard standard, which probably accounts for some of the anti-ghosting. However, in my tests, I haven't yet been able to catch the keyboard misbehaving. I almost want to say there's a good chance stuff is being ignored by the kernel, but... can't prove it.

Also, my synaptics driver (on that site) is still being developed and tested. Use at your own risk. Although the biggest problem you'll probably run into is an insane amount of jitter. Sometimes the multitouch won't work properly, either (or it might take a second). The damn thing samples way too quickly.

Interesting what you have achieved so far. I wish razer could look into this, if they did the could point us in the right direction.I will test your program.

Do you think the missing keystrokes bug could be solved?. Even if the SBUI is till far of being useful in linux, fixing that keyboard problem would be great....

Re: Razer Blade [Gen 1]

Yeah right now primarily the keyboard being unreliable is the major factor for me not using Arch day-to-day. The mouse jitter is annoying but at least I can still work with that.I'd be willing to help test as well.

Yeah -- "Something went wrong" means it wasn't able to find your input device, which most likely means they've just changed the ProductID. The three echo problems there indicate that they've placed it elsewhere on the USB bus, too. Could you post the output of this command?:

lsusb -vv -d 1532:

(note: there IS a colon at the end and it DOES need to be included)

That way I'll be able to fix the harness and the test program to work on your machine, too. Although I will caution you: I wrote the test for the Razer Blade R2, so it may not interpret the data you receive from input correctly at first. That's okay -- just send me the output of the tests and describe what you did on the keyboard and mouse and I'll see about accounting for it in future iterations. (It won't yet tell you what keys are pressed on the keyboard, at least not beyond Razer!Logo and Fn on the R2).

Re: Razer Blade [Gen 1]

And in the interest of full transparency: I'm testing something right now to deal with the keyboard issue. It seems that the usbhid driver itself may actually be polling far less often than it actually needs to, which makes sense in the context of the keyboard being purported to be a gaming keyboard. My current fix is to hard-code the interval to 1 frame in hid-core.c (under drivers/hid/usbhid/hid-core.c, right after it sets the polling interval for the mousepoll setting, if present) -- if that works, I will figure out a long-term solution, probably involving modifying some descriptor somewhere in-flight to allow usbhid to poll more often. Let me test it for a few more days, but even typing this forum post is looking really promising for me.

EDIT: I'm also going to try something similar for my driver -- hopefully it will fix a few of the weird issues with it.

Re: Razer Blade [Gen 1]

Re: Razer Blade [Gen 1]

FxChiP wrote:

And in the interest of full transparency: I'm testing something right now to deal with the keyboard issue. It seems that the usbhid driver itself may actually be polling far less often than it actually needs to, which makes sense in the context of the keyboard being purported to be a gaming keyboard. My current fix is to hard-code the interval to 1 frame in hid-core.c (under drivers/hid/usbhid/hid-core.c, right after it sets the polling interval for the mousepoll setting, if present) -- if that works, I will figure out a long-term solution, probably involving modifying some descriptor somewhere in-flight to allow usbhid to poll more often. Let me test it for a few more days, but even typing this forum post is looking really promising for me.

EDIT: I'm also going to try something similar for my driver -- hopefully it will fix a few of the weird issues with it.

That is great news man, i will try applying your solution now, for testing.when you set the interval to 1 you need to recompile that C file hid-core.c?

Re: Razer Blade [Gen 1]

if that works, I will figure out a long-term solution, probably involving modifying some descriptor somewhere in-flight to allow usbhid to poll more often. Let me test it for a few more days, but even typing this forum post is looking really promising for me. smile

I suggest you create a keyboardpoll module parameter (clone mousepoll) if this works.

when you set the interval to 1 you need to recompile that C file hid-core.c?

You need to recompile the usbhid kernel module and put it in /lib/modules/<KERNEL VERSION>/updates/ (and run depmod)

Re: Razer Blade [Gen 1]

Also, the test program failing on your system is *really* weird. Your vendor ID and product ID are the exact same as mine -- in fact, the only real difference is the position of the device on the bus. Maybe your user isn't allowed to get a direct read on any of your USB devices. The easiest way to confirm that would be to run as root -- which I wouldn't fault you for not doing.

Try doing ls -alh /dev/bus/usb/001 and either adding yourself to whatever group has access to write those devices (and re-logging in) or temporarily chgrp'ing the one corresponding to your device number to your usergroup.

Re: Razer Blade [Gen 1]

FxChiP wrote:

Yes, that is the correct location.

I was compiling the kernel (building a custom one with the fix), but suddenly i realized, after looking at the patch list, that "/drivers/hid/usbhid/hid-core.c" got patched and i lost my change.How is the syntax (the diff syntax) for adding my modificcation into patch-3.10.9 so that i gets applied correctly?

edit: nevermind now the change is applied. Will post back reporting about the keyboard.

Re: Razer Blade [Gen 1]

FxChiP wrote:

Also, the test program failing on your system is *really* weird. Your vendor ID and product ID are the exact same as mine -- in fact, the only real difference is the position of the device on the bus. Maybe your user isn't allowed to get a direct read on any of your USB devices. The easiest way to confirm that would be to run as root -- which I wouldn't fault you for not doing.

Try doing ls -alh /dev/bus/usb/001 and either adding yourself to whatever group has access to write those devices (and re-logging in) or temporarily chgrp'ing the one corresponding to your device number to your usergroup.

Isn't this a manifestation of the keyboard problem?Many warnings until it crashed. The SBUI crashed too (im sure a reboot will revive it, but im compiling the new kernel now).What is weird is that there were input codes registered even when i didnt type anything. I still haven't tried the patched kernel (hic-core.c patch), this was ran with default one. As soon as i end up compiling i will test it.