Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

[BUG] Installing Driver on Blade 2016 1060 breaks touchpad button functionality #43

Open
MattHarr1s opened this issue Jul 31, 2020 · 13 comments
Labels
bug Something isn't working

Comments

@MattHarr1s
Copy link

Describe the bug
A clear way of describing how the driver is misbehaving
The buttons on the touchpad are no longer recognized by the OS.
To Reproduce
Steps to reproduce the behavior:

Follow steps to build driver and install it in the kernel. Restart computer and the touchpad buttons do not work.

Expected behavior
What should the driver do?

not break the touchpad buttons

Optional but useful, packet capture from synapse

If the driver is not doing as it should, it would be useful to provide a packet capture of you doing the same event in razer synapse. IE: increasing the fan RPM to 5000,

@MattHarr1s MattHarr1s changed the title [BUG] Installing Driver on Balde 2016 1060 breaks touchpad button functionality [BUG] Installing Driver on Blade 2016 1060 breaks touchpad button functionality Jul 31, 2020
@rnd-ash
Copy link
Owner

rnd-ash commented Jul 31, 2020

This is insane. I've never heard of this happening?....And even have guards in my driver to prevent this....

can you post the output of

dmesg | grep "laptop\|razer"

and

lsusb

@MattHarr1s
Copy link
Author

❯ dmesg | grep "laptop|razer"
[ 1.906557] razercontrol: loading out-of-tree module taints kernel.
[ 1.906591] razercontrol: module verification failed: signature and/or required key missing - tainting kernel
[ 1.986961] usbhid 1-8:1.0: Found supported laptop: Blade QHD
[ 2.046908] Razer laptop System control driver 0003:1532:020F.0002: input,hidraw0: USB HID v1.11 Keyboard [Razer Razer Blade] on usb-0000:00:14.0-8/input0
[ 2.222929] usbhid 1-8:1.1: Found supported laptop: Blade QHD
[ 2.283417] Razer laptop System control driver 0003:1532:020F.0003: input,hidraw1: USB HID v1.11 Keyboard [Razer Razer Blade] on usb-0000:00:14.0-8/input1

❯ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1532:020f Razer USA, Ltd Razer Blade
Bus 001 Device 003: ID 0bda:579f Realtek Semiconductor Corp. USB Camera
Bus 001 Device 002: ID 8087:0a2b Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Thanks for answering this issue and for making the driver.

@rnd-ash
Copy link
Owner

rnd-ash commented Aug 1, 2020

Interesting. Firstly looks like my driver is misidentifying your laptop as a QHD Blade....

Secondly, i cannot see why it would cause your trackpad buttons to not work...can you do me a favour:

Can you modify lines 144 on driver/src/razer_common.c from this:

dev_info(&intf->dev, "Loading module\n");
    if (intf->cur_altsetting->desc.bInterfaceProtocol != USB_INTERFACE_PROTOCOL_KEYBOARD) {
        // Found the mouse - unload!
        return -ENODEV;
    }

to this:

dev_info(&intf->dev, "Loading module\n");
    if (intf->cur_altsetting->desc.bInterfaceProtocol != USB_INTERFACE_PROTOCOL_KEYBOARD) {
        // Found the mouse - unload!
        hid_err(hdev, "Skipping mouse bind\n");
        return -ENODEV;
    }

Then, from the driver directory run

make && sudo ./test_module.sh

Then, check if "Skipping mouse bind" is present within dmesg logs

@MattHarr1s
Copy link
Author

I received some errors and warnings when running make && sudo./test_module.sh.

Compiling kernel modules
make -C /lib/modules/5.4.0-7634-generic/build M=/home/matt/razer-laptop-control/driver/src modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-7634-generic'
CC [M] /home/matt/razer-laptop-control/driver/src/razer_common.o
CC [M] /home/matt/razer-laptop-control/driver/src/fancontrol.o
/home/matt/razer-laptop-control/driver/src/fancontrol.c: In function ‘set_fan_rpm’:
/home/matt/razer-laptop-control/driver/src/fancontrol.c:54:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
54 | u8 request_fan_speed;
| ^~
/home/matt/razer-laptop-control/driver/src/fancontrol.c: In function ‘set_power_mode’:
/home/matt/razer-laptop-control/driver/src/fancontrol.c:160:1: warning: control reaches end of non-void function [-Wreturn-type]
160 | }
| ^
CC [M] /home/matt/razer-laptop-control/driver/src/core.o
In file included from /home/matt/razer-laptop-control/driver/src/core.h:11,
from /home/matt/razer-laptop-control/driver/src/core.c:2:
/home/matt/razer-laptop-control/driver/src/fancontrol.h:36:42: warning: ‘struct razer_laptop’ declared inside parameter list will not be visible outside of this definition or declaration
36 | void set_fan_rpm(unsigned long x, struct razer_laptop *laptop);
| ^~~~~~~~~~~~
/home/matt/razer-laptop-control/driver/src/fancontrol.h:38:44: warning: ‘struct razer_laptop’ declared inside parameter list will not be visible outside of this definition or declaration
38 | int set_power_mode(unsigned long x, struct razer_laptop *laptop);
| ^~~~~~~~~~~~
CC [M] /home/matt/razer-laptop-control/driver/src/chroma.o
LD [M] /home/matt/razer-laptop-control/driver/src/razercontrol.o
Building modules, stage 2.
MODPOST 1 modules
CC [M] /home/matt/razer-laptop-control/driver/src/razercontrol.mod.o
LD [M] /home/matt/razer-laptop-control/driver/src/razercontrol.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-7634-generic'
[sudo] password for matt:
rmmod: ERROR: Module razerkbd is not currently loaded

@rnd-ash
Copy link
Owner

rnd-ash commented Aug 1, 2020

just warnings....driver should have compiled

@rnd-ash rnd-ash added the bug Something isn't working label Aug 1, 2020
@MattHarr1s
Copy link
Author

MattHarr1s commented Aug 1, 2020

I get this error when running sudo ./test_module.sh
rmmod: ERROR: Module razerkbd is not currently loaded

Also I don't know if this is related but the backlights on caps, L shift and L ctrl are all off, while the rest of the keys are correctly set to the color I choose in the cli tool.

@MattHarr1s
Copy link
Author

dmesg | grep "laptop|razer"

[ 1.906264] razercontrol: loading out-of-tree module taints kernel.
[ 1.906264] razercontrol: loading out-of-tree module taints kernel.
[ 1.906288] razercontrol: module verification failed: signature and/or required key missing - tainting kernel
[ 1.978751] usbhid 1-8:1.0: Found supported laptop: Blade QHD
[ 2.039253] Razer laptop System control driver 0003:1532:020F.0002: input,hidraw1: USB HID v1.11 Keyboard [Razer Razer Blade] on usb-0000:00:14.0-8/input0
[ 2.166726] usbhid 1-8:1.1: Found supported laptop: Blade QHD
[ 2.227235] Razer laptop System control driver 0003:1532:020F.0003: input,hidraw2: USB HID v1.11 Keyboard [Razer Razer Blade] on usb-0000:00:14.0-8/input1
[ 109.508610] usbhid 1-8:1.0: Found supported laptop: Blade QHD
[ 109.568069] Razer laptop System control driver 0003:1532:020F.0002: input,hidraw1: USB HID v1.11 Keyboard [Razer Razer Blade] on usb-0000:00:14.0-8/input0
[ 109.766074] usbhid 1-8:1.1: Found supported laptop: Blade QHD
[ 109.825442] Razer laptop System control driver 0003:1532:020F.0003: input,hidraw2: USB HID v1.11 Keyboard [Razer Razer Blade] on usb-0000:00:14.0-8/input1
[ 109.873004] Razer laptop System control driver 0003:1532:020F.0004: Skipping mouse bind
[ 350.478172] usbhid 1-8:1.0: Found supported laptop: Blade QHD
[ 350.543287] Razer laptop System control driver 0003:1532:020F.0002: input,hidraw1: USB HID v1.11 Keyboard [Razer Razer Blade] on usb-0000:00:14.0-8/input0
[ 350.746130] usbhid 1-8:1.1: Found supported laptop: Blade QHD
[ 350.806403] Razer laptop System control driver 0003:1532:020F.0003: input,hidraw2: USB HID v1.11 Keyboard [Razer Razer Blade] on usb-0000:00:14.0-8/input1
[ 350.874160] Razer laptop System control driver 0003:1532:020F.0004: Skipping mouse bind

@rnd-ash
Copy link
Owner

rnd-ash commented Aug 1, 2020

Ok this is strange then.

So I can clearly see the driver isn't binding to your touchpad....so no clue as to why your touchpad isn't working...

As to why your ctrl keys are off, that shouldn't be possible! I suspect the older blades work differently....

Do you have access to windows on the laptop? - either in a VM or physically

@MattHarr1s
Copy link
Author

Yes I still have windows on the laptop. I've also installed wireshark but I have no idea what I'm looking for.

@rnd-ash
Copy link
Owner

rnd-ash commented Aug 3, 2020

hmm OK. I shall draft up a markdown doc on how to packet capture

@MattHarr1s
Copy link
Author

Thanks.

@ChrisChinh
Copy link

Hi, I'm also having an identical problem. I'm on the Blade 2017 1060. Was there ever a solution for this? Thanks, and thank you for all of the work you've done to make these laptops actually useful on Linux.

@stormDE
Copy link

stormDE commented Feb 18, 2022

same problem here with razer blade 2016 on ubuntu

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants