-
-
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
Micmute led on Matebook D #7
Comments
Hey, thanks for reporting this issue.
Not right now. It would be very helpful if you provide me the DSDT/SSDT tables for your model and the year for your model. |
I can certainly do so, would you point me out to how I can provide the DSDT/SSDT tables? Thanks! |
Please take a look at acpidump. I only need DSDT.dat and SSDT*.dat |
Hopefully this works? |
Yeah this works. Thanks! |
Using a tool like acpi_call could you provide the return values and observe any changes to your system using the following?
|
I'll be honest, I've spent the last hour trying to figure out how to install this, I've tried different stuff and "call" never appears on /proc/acpi Any suggestions? Edit: Managed to install it somehow, found a forum thread of someone on Solus having the same issues I had, I did not notice anything changing when entering the above commands.
Edit 2: I've tried something else, and now after entering the first command, the led is turned off, echo "\SMLS 0x00010000" | sudo tee /proc/acpi/call turns it back on. |
@wasakakero could I get the output of this
I'm trying to get the product name defined in dmi. I'm working on a driver update that brings on a fix for this issue along with other issues. |
@aymanbagabas sure thing, here it is:
|
@wasakakero can you please try the updated module from master? |
@aymanbagabas I tried to install as per the readme and I got the following error during "make"
|
Seems like you're using Fedora, right? Make sure you have |
@aymanbagabas I now encounter this issue:
I don't know if it was installed or not, but after a reboot, I noticed that the micmute key no longer works even after updating the hwdb tables, but please bear in mind this last part might be unrelated as I re-installed Fedora a few days ago and I never updated the tables up until the restart I mentioned. |
Looks like it was built just fine. Don't forget to unload the driver before you
Remember, this is still in testing so you probably don't want to install it in your system. Also try |
@aymanbagabas I did as instructed, but it seems to have no effect, micmute still doesn't work after rebooting (I'm puzzled as to why) and insmod throws me:
|
Sorry my bad, that should've been
Could you please also provide your |
@aymanbagabas the hwdb thing not working was my fault, I was stupid and figured it out myself. As for the module, it seems that worked, i didn't get any feedback from the console with the last 2 commands if that means it was succesful. I tried before and after rebooting and the led never turned on (or off). please find attached the dmesg, the last lines I guess are me pressing micmute soon after entering into the DE, which is weird because the key does work. |
Thank you for taking the time in this. As for the last line, I had the same with my MBXP. With my model, any time I press brightness keys, micmute, wifi, or huawei mgmt key I get scan code If you want, create a pr with this fix either here in this repo or directly to Could you please test the newly added features? battery protection and fn-lock? Please report to #8 if you're interested. Thank you! |
@aymanbagabas just to be clear the LED didn't work. As for #8 I can certainly try them out, but I have no idea how I would go on setting up the battery protection settings since there is no PC Manager, I'm not aware of a key combination for this. And I have to ask, since I rebooted after inserting the module, is it still in there or I have to do the commands all over and test without rebooting? Edit: I'll also attach the output of make, just in case. |
Hmm.. could you please try this and provide Also try these using
|
There is no key combination for this. In Windows and using Huawei PC Manager, you can set battery charging thresholds/limits so it protects your battery from wearing down quickly. You can also change the behavior of the Fn key as if it was the opposite. So the default behavior while fn toggled off (led off) pressing F1-F12 would trigger a hotkey. If this fn-lock thing is on, it would trigger the F1-F12 key instead of a hotkey so it would be the opposite as if you're holding Fn. |
I did as instructed and here are the results: Micmute LED turned on:
Micmute LED turned off:
Didnt notice any change:
Didn't notice any change:
|
Are the instructions referred in #9 valid for the battery protection in this device as well? I can confirm that the FN Key work as intended in both v1 and v2 as far as I know, led on means F1-F12 keys act as F1-F12 keys, led off means they act as the hotkeys for birghtness, volume, wifi and so on. |
Thank you for keeping up with this. I just noticed in SSDT1 of your model that every call to WMAA checks a local variable if it's set to 2, it passes the command, otherwise, it doesn't and returns 1 meaning incorrect input or something. I haven't seen this in other models and I don't see the point of having this in the AML code. That's why you get '0x01' in your output. Please try running that command twice and see if it turns the led on. |
This mode inverts this behavior so led on and F1-F12 give hotkeys. |
@aymanbagabas I tried running the command twice, didn't see the led turning on.
|
Notice the ‘1’ in the command 4th digit from left. 0x00000b04 is off and 0x00010b04 is on. Print the output as well |
@aymanbagabas You were right!, so entering 2 times "echo "_SB.WMI1.WMAA 0 0 0x00010b04" | sudo tee /proc/acpi/call" turned on the LED, entering the turn off command 2 times also works turning off the LED. Here are the outputs: Turning ON:
Turning OFF
|
I don't see any micmute event triggered in the log? Also try |
@aymanbagabas those "setkey" events I'm sure you can see is me pressing the micmute button, bear in mind as explained before that the micmute key works without issue, but the LED is not. xdotool worked to mute/unmute the mic just as if I were pressing the key, but didn't turn on the led. |
Do you get those "setkey" events from micmute key only or others as well? What is the output of these commands? Do you have a
Could you also use |
The way this works is, the LED is hooked to alsa where it triggers the micmute function from the driver. However, there aren't any calls to that function and no errors given. Which means either no micmute event given, but you did, or something with the led subsystem. Or something off with the driver |
@aymanbagabas so I checked, the setkey events happens with: Brithness (on and off) All of these keys work fine except for maybe PC Manager because I don't have anything assigned to it anyways, I believe. Evtest showed keypresses in the same keys where setkey events happened, except for keyboard backlight. Also Volume up, down, mute and the key that does screen changes (F8 in my device) do not appear here either if that helps. All keys work as intended except for obviously, the LED.
|
Thank you for your collaboration!
That's because, on newer models, these keys are being treated as regular keyboard keys. Old models like Matebook X (2017) does not where it needs the driver for these to work.
Is
This means nothing wrong with the driver |
@aymanbagabas PulseAudio is indeed running, I'm on KDE. |
Try using the GUI settings to toggle mic mute. At this point, I can't think of anything that would cause this behavior. I'm using Gnome and changing the micmute from settings changes the LED accordingly. As I said, the driver hooks with ALSA and that's where ALSA takes control and changes the LED to match the sound system. Are you running the latest updates? What distro you using? |
@aymanbagabas I tired both the GUI and Alsamixer but the LED didn't work. Perhaps this has to do with comment #7 (comment) ? Edit: I'm updated up until April 22th which is the last time I did an update, I'm on Fedora. |
KDE shouldn't be any different, and indeed isn't in my case, so I bet it's laptop model specific. |
No, if it was, toggling the led using It's the sound subsystem, not that anything's wrong with it, but we need to hook up the Matebook D sound system to the linux sound driver. See this. Probably @nekr0z laptop has the same sound module as mine. That's why it works. @wasakakero @nekr0z could you please give the output of |
@aymanbagabas here is mine: http://alsa-project.org/db/?f=0f1f4274a6b8d9a594c7b4a388cc87712713aba9 As a side note, I have experienced a lot of crackling noise in my Mic when I speak since I first installed Fedora, not world ending but noticeable, just wondering if any of you experience the same with the MBX and where would it be best to report to. |
Thank you!
First, I would search the internet if anyone had the same/similar issue and see. See this and this. If no luck and you couldn't find any resources on the internet, I would start by submitting a bug to the ALSA project. I haven't experienced such a problem with my Matebook. The recorded sound coming from the microphone sounds clear and normal. |
http://alsa-project.org/db/?f=be4acc627c836fd0205f5f9ee72eac354a27be0a |
@nekr0z I'm curious to know how you got the led to work. Did it work right after you upgraded to 5.0? Because these three lines in patch_realtek.c are the ones responsible for hooking the led to ALSA. The Matebook 13 has this id To make this generic to all Huawei laptops, we have to patch that file with something like this
Where |
It started working right after I updated to 5.0 and installed your driver version 2.0. I honestly didn't test with 5.0 and driver v1. But if I |
@wasakakero I know you're using fedora, so what kernel version you using? I'm gonna compile a patched version of |
You mean the one from |
No, it worked with released version 2.0, too. And it works with master, yes. |
@aymanbagabas My kernel version should be |
snd-hda-codec-realtek.zip |
@aymanbagabas Thank you for the comprehensive instructions. I've done as instructed and the LED is still not working. As a side note on your comment I see you mentioned "ALC255" but as far as I can see mine uses "ALC256" |
Could you provide
You're right, Edit: I might've given you the wrong file please try this one. I'm sorry |
@aymanbagabas I tried with the new file, didn't work. Please find attached the outputs. |
SELinux prevents probing the module. Maybe because it was compiled in different machines?! Could you please try the following and then output dmesg:
Then try micmute 🤞 |
So I did that, didn't work. BUT I disabled SELinux in /etc/selinux/config added the mod using depmod -a just to e extra sure, rebooted, loaded the WMI Driver. Micmute and micmute LED worked. |
Awesome! You nailed it! Thank you for your work I guess now that we 'kinda' resolved this issue, we will leave it open until it gets patched in upstream. |
Submitted a patch to upstream here |
Hi,
all keys worked perfectly fine when installing Fedora on my Matebook D, I only had to update the hwdb tables directly for the micmute button to work.
However, it is impossible to turn off the Micmute led, it has been this way since installation probably as a remnant of when I had windows.
Is there any fix for this in the works? is there any way I can help by sending logs or something?
The text was updated successfully, but these errors were encountered: