-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Matebook E] HUAWEI Matebook E #19
Comments
This might be out of the driver's scope. Could you provide the ACPI dumps using For more info refer to https://01.org/linux-acpi/utilities |
i hope everything is in the attached file |
Your Matebook E doesn't use the same mechanism as other models. I'd like to investigate on this more if you're still interested.
Could you provide the rest of the firmware data? You could do the following.
We're deleting MSDM because it includes your Windows license key and I don't think you wanna share that 😄 Now, save
Then copy
Now, try out all the special keys from F1 to F10. Nothing would happen but I'm interested in the logs that the driver would record on After you do these three steps use Please let me know if you have any questions or if you're having any troubles. These data would help debug the issue and hopefully, we can fix it and get it to work. |
Can you also provide |
hope I've got everything correct :) lsusb -v
lspci -nnv
|
Hi @jannis3005, Thank you for taking the time and yes, you got everything correct thank you! The Matebook E is interesting, looking at the provided firmware files, it appears to follow the same mechanism that the Matebook X has. It uses the same "legacy" interface. Check out #9 for more info. If you'd like to help with that, I'd really appreciate it. Now, your dmesg log shows
Now, try all of the Fn row, special keys, and observe changes in Here's the decompiled BMOF data section from your DSDT firmware table. It looks like the one from the Matebook X here. Apparently, the tables from |
When I do
|
Could you try adding
Please try the following:
Make sure non of the above commands fail or give you an error message. Now reboot, press all Fn keys while observing |
This is weird. I followed all of your instructions, there were no errors. After rebooting, when I run lsmod it shows huawei_wmi as a loaded module. But it still doesn't show anything on |
I just tried the following: I removed the kernel module and rebooted. then i run
so it seems to be loading correctly |
@jannis3005 I sort of see the problem now. Nothing wrong with the driver, the issue is that the keyboard is connected through USB as you can see in this comment Now, I want you to try The issue is that we're missing the USB driver that reports events to Huawei-WMI. You're getting nothing because events from this USB device doesn't go anywhere and that's why you're not getting anything in
And that's without the driver being loaded notice 641 is 0x281 which is the brightness down key defined here. Once this "theory" is confirmed, I'll put some code up to fix this. We might not need any extra drivers, it could be as easy as a hwdb table added to systemd-udev. Also, I'm curious, what do you have under Thank you for your support and contribution to this project. |
Hey, I found the correct device, take a look here
also, here's
|
That's great news! Please try the attached file using the method described in the readme. Feel free to adjust it as you like. Refer to Although it should hopefully work, I see from your output that F1-11 keys are being clicked. Are you sure Fn toggle is off? That's why you're getting Also I'd like to see what the other inputs have
One of them could lead us to a functional mic mute LED. |
It seems to be a bit more complicated. The device listet as device 4 seems to be responsible for the monitor key, as well as print and paste. device 6 seems to be responsible for brightness up and down. Though, Device 6 seems to report brightness down for both brightness down and up and the fn key. as for device 5, it shows events for key_mute key_volumeup and down and a whole bunch of other stuff, however, when i press the buttons nothing outputs well, and device 7 does excatly what the name suggests. it fires a whole bunch of events when touching the touchpad |
Here's the Ouput of event6 pressing all keys, with the ouput caused by brightness_down and brightness_up
|
Maybe some more details that i found out: event4 seems to receive events for every key on the keyboard, EXCEPT: However, it does receive events when pressing f1-f12, as well as screenmirrormodetoggle or hoewver that is called, and also for print and paste. The screenmirrormodetoggle event is received as LEFT_META. The Volume-Keys on the side of the detachable tablet, located next to the fingerprint, do work. The events show up in event3, the AT Translated Set 2 Keyboard I think the events of the media keys not working are supposed to show up in event6, where brightness down also shows up. but as you can see from the output above, the two brightness keys are indistignuishable. I dont know if it helps, but i checked the scancodes using showkey --scancodes. brightness down und brightness up and fn key have the same scancode, all the not working keys also dont have a scancode |
I'm interested in this. Please upload This comment will help you debug the issue even further so take a look. A Seems like there is a driver for |
Sorry for the late response, here are the outputs:
|
For usbhid-dump the key order pressed is: fn-key > brighness-down > brightness-up > Keyboard brightness > ... > WIFI > Setup > print > paste |
Just to be clear, when you say fn-key, do you mean fn key was toggled on? LED is on? Because that would produce F1-F12 keys to my knowledge. |
No for sure it wasn't on |
@aymanbagabas are you still interested in trying to solve this? |
I don't really have the tools (Matebook E) and knowledge (I know nothing about HID). I'm sure a HID driver for this would have a lot in common with Huawei-WMI driver. Closing for now since it's not related to Huawei-WMI. |
You know what, this seems interesting. Now that I've seen this tool, this should be very trivial (ofc after doing some more reading about USB HID). If you'd be willing to help in building this I'd be happy to work on it. 001:002:003:DESCRIPTOR
001:002:002:DESCRIPTOR
001:002:001:DESCRIPTOR
001:002:000:DESCRIPTOR
These were taken from #19 (comment) USB HID dump. We have 4 descriptors for 4 devices (shown in the evtest). Now we need to know which one is which and which one needs working on. |
Can you run |
Here you go :)
|
Cool, now we gotta figure out how to translate these data to the input sub-system. Needs some research :) I still don't know if this necessarily needs a kernel driver or if it can be done in user-space. hid-holtek-kbd this, for example, changes the device descriptor because it's faulty and thus needs a kernel driver. In our case, I'm not sure. Needs more investigation. LMK if you find anything (literally anything can be examples forums wikis) and I'll do the same whenever I have time. |
Sure. Ill search whenever i've got some spare time :)
|
Alright, I might've found something. This tutorial explains how these descriptors work. First, we have 4 Now the one responsible for the special keys is provided by From that device descriptor, we can see that it has a vendor defined usage TLDR, we might need to write a driver similar to hid-holtek-kbd but with a fixed descriptor that has all missing key usages defined. |
Okay, that sounds pretty solid and looking at hid-holtek-kbd, also looks doable, even considering that I know almost nothing about kernel drivers |
https://github.com/torvalds/linux/blob/master/drivers/hid/usbhid/hid-core.c#L67
This might be easier :)
…On Fri, Jan 24, 2020, 12:19 AM Jannis Göing ***@***.***> wrote:
Okay, that sounds pretty solid and looking at hid-holtek-kbd, also looks
doable, even considering that I know almost nothing about kernel drivers
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#19?email_source=notifications&email_token=AAYKJ3DDXSJHV7SO66DREYLQ7J26VA5CNFSM4IQGJ2M2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJZYDXA#issuecomment-577995228>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYKJ3BMTNURXXVXBABBJ6DQ7J26VANCNFSM4IQGJ2MQ>
.
|
So this means we just give the USB HID Core Driver some Params?
|
Yes, you are right. You'd pass the fixed descriptors as parameters. My
concern is how LEDs would work in this case.
…On Fri, Jan 24, 2020, 3:51 AM Jannis Göing ***@***.***> wrote:
So this means we just give the USB HID Core Driver some Params?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#19?email_source=notifications&email_token=AAYKJ3CM6N2ZFD2WMXRQIA3Q7KTXJA5CNFSM4IQGJ2M2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ2D6CY#issuecomment-578043659>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYKJ3EFREYPQNMT7DPJJYDQ7KTXJANCNFSM4IQGJ2MQ>
.
|
I'd suggest we look into getting the Buttons working at all first because
that's the most important part and would make the most difference. The
FN-LED works already. It Would just be the Microphone-LED we'd have to
worry about afterwards.
I could try and find out though, just have to find out how to find out
first ;) :D
|
Fixed descriptor
Try
or
not sure how this works. |
Put it in
Restart and test. Provide a dmesg log and evtest of |
i tried in cmdline usbhid.quirks=... with the first one, the entire keyboard stopped working, with the second one it was like before |
For the first one: dmesg
evtest event6
|
For the second one: dmsg
evtest event6
|
I'll try and add that file to initframs |
The first one breaks the entire keyboard and touchpad except for the FN-Toggle and Backlight & Backlight Toggle. Ill have to boot from live-usb and remove the quirks to be able to continue. |
No need just override the modprobe during boot with GRUB https://wiki.archlinux.org/index.php/Kernel_module#Using_kernel_command_line set it back to |
Try this
Again please provide dmesg and evtest of |
dmesg
I cannot provide
|
I just wanna see if it changes anything for |
Okay, here you go:
|
Hey @aymanbagabas,
I've tried getting it to work on the Matebook E, but I couldn't get it to work. Since I don't have any Experience in developing in C nor in developing device drivers, it would be cool if you could help me out.
Here's the output of the commands from your email.
lsmod
dmesg
evtest
When using in Terminal Emulator, Brightness Keys both just lower the brightness and the Monitor Config Key (F8) works, but testing stays empty. When runnig from TTY, the brighness keys result in
^@
and the monitor config key inp
, no result for the other keys, both with device 17 and 18.The text was updated successfully, but these errors were encountered: