dasharo-issues icon indicating copy to clipboard operation
dasharo-issues copied to clipboard

Microphone mute Fn key doesn't work in Windows

Open wessel-novacustom opened this issue 1 year ago • 22 comments

Component

Dasharo firmware

Device

NovaCustom V54 14th Gen, NovaCustom V56 14th Gen

Dasharo version

v0.9.0

Dasharo Tools Suite version

No response

Test case ID

No response

Brief summary

The microphone mute Fn key doesn't work, regardless of the OS

How reproducible

100% reproducible.

How to reproduce

  1. Open a sound recording application like Audacity.
  2. Recording the sound while keep talking.
  3. Try to interrupt the recording with Fn + 4 (microphone mute)

Expected behavior

The microphone gets muted.

Actual behavior

The microphone doesn't mute.

Screenshots

No response

Additional context

If possible, this Fn shortcut may be enabled for:

  • NV41 Series (12th Gen only)
  • V54x Series (Meteor Lake, all variants)
  • V56x Series (Meteor Lake, all variants)

It is not needed for other laptop series.

Solutions you've tried

No response

wessel-novacustom avatar Aug 17 '24 12:08 wessel-novacustom

Added firmware side fix in https://github.com/Dasharo/ec/pull/62/commits/c93707e5bf44d967c10f76c6804a4be3abf2fe81

mkopec avatar Aug 20 '24 09:08 mkopec

Need to add a quirk to systemd hwdb, something like this: https://github.com/systemd/systemd/blob/d1b04f47e32bd1012ae2e3e6ac9159702463bf15/hwdb.d/60-keyboard.hwdb#L787

but using the actual micmute scancode that is generated on V5x0Tx. A temporary fix can be added to post-install steps.

mkopec avatar Aug 22 '24 14:08 mkopec

Yes, that needs to be done

wessel-novacustom avatar Aug 22 '24 14:08 wessel-novacustom

I've additionally enabled the Fn key for NV41 ADL in https://github.com/Dasharo/ec/pull/63/commits/12d626f3ea1fc16c2ad89d2ec0e560121111d5a4 and added the quirks for NV41 ADL and V5x to systemd in https://github.com/systemd/systemd/pull/34183/commits/40ef5cc669f1d6d9a1854909c4dcd8e68f20f1ea . The combination works as expected now:

micmute

filipleple avatar Sep 11 '24 16:09 filipleple

I've additionally enabled the Fn key for NV41 ADL in Dasharo/ec@12d626f and added the quirks for NV41 ADL and V5x to systemd in systemd/systemd@40ef5cc . The combination works as expected now [ ... ]

Amazing! Hopefully, the same can easily be done on the V54 Series (-TU and NVIDIA variants), as well as the V56 Series (-TU and NVIDIA variants), while it's being skipped for the other variants.

I will close the issue once it has been integrated in a release.

wessel-novacustom avatar Sep 11 '24 16:09 wessel-novacustom

On the firmware side this is integrated in rc5 for nvidia models. The fix is also implemented for -TU models, but it's not included in any release for those models yet.

mkopec avatar Sep 11 '24 17:09 mkopec

On V540TND v0.9.1-rc5 adding the change works https://github.com/Dasharo/dasharo-issues/issues/1006#issuecomment-2344096304

You only need to add the line:

KEYBOARD_KEY_81=f20

to /etc/udev/hwdb.d/60-keyboard.hwdb under evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnV5xTNX_TND_TNE:*, run udevadm trigger and reboot. Then the mic mute key works perfectly.

philipanda avatar Sep 12 '24 06:09 philipanda

Just to clarify, manually adding the line shouldn't be necessary after the next systemd release, which should happen in a week or two. Then, just keeping the OS updated should do it.

filipleple avatar Sep 12 '24 06:09 filipleple

Great progress!

Is it also possible to enable this for Windows? It is not working on a V560TND running rc5.

wessel-novacustom avatar Sep 12 '24 09:09 wessel-novacustom

On V540TND v0.9.1-rc7, I could not get the button to work with this fix:

On V540TND v0.9.1-rc5 adding the change works #1006 (comment)

You only need to add the line:

KEYBOARD_KEY_81=f20

to /etc/udev/hwdb.d/60-keyboard.hwdb under evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnV5xTNX_TND_TNE:*, run udevadm trigger and reboot. Then the mic mute key works perfectly.

With or without it, shortcut does not toggle the state.

SebastianCzapla avatar Oct 21 '24 14:10 SebastianCzapla

I think the udev rule might not be correct, but the EC is sending the correct scancode, so it's probably an OS issue

mkopec avatar Oct 28 '24 11:10 mkopec

After adding the rule, you have to run:

sudo systemd-hwdb update
sudo udevadm trigger

after doing this, the key is now correctly mapped to KEY_F20. Now re-login to Gnome and the key should work.

mkopec avatar Oct 28 '24 13:10 mkopec

To get it working on Windows, we could fork https://github.com/coolstar/croskeyboard4 and rework it to support our keycodes instead

mkopec avatar Oct 31 '24 16:10 mkopec

To get it working on Windows, we could fork https://github.com/coolstar/croskeyboard4 and rework it to support our keycodes instead

  • Let's do so and add a Post installation step in the docs, just like for Linux.

I assume that this doesn't need any changes on the firmware side, we badly need the initial release.

wessel-novacustom avatar Oct 31 '24 17:10 wessel-novacustom

no, on firmware side there are no changes required. It's purely a Windows driver issue

mkopec avatar Oct 31 '24 17:10 mkopec

Ok so let's work on that after the firmware release.

wessel-novacustom avatar Oct 31 '24 17:10 wessel-novacustom

note: It may be possible to use the ACPI Generic Button Device for this

mkopec avatar Mar 20 '25 15:03 mkopec

Platform: novacustom V560TU OS: Windows 11

Running binary form one of the more recent workflows windows recognizes Fn+4 as ,,some function key" (for example on 0.9.0 release you could still type 4 in text field even with Fn+4) it is not muting the mic though. I guess this behavior is not firmware related then?

wiktormowinski avatar Mar 28 '25 15:03 wiktormowinski

This behavior is because Windows does not recognize the scancode. It might be possible to do some hackery with ACPI Generic Button device to get the key to generate a valid HID event, but that's a bit of a larger project

mkopec avatar Mar 28 '25 15:03 mkopec

I've looked at a couple of driverless options for Windows:

  • Intel HID Event Filter: Does not support the micmute HID usage
  • ACPI Generic Button device: Windows driver only supports GPIO buttons, Linux driver does not support the micmute HID usage, ACPI spec says it should work but in reality it doesn't

We're only left with one option, which is our own Windows driver, specifically a keyboard filter driver. I suppose a good starting point would be Coolstar's croskeyboard driver. I haven't looked into distributing Windows drivers through Windows Update yet, but I believe it's a whole large process that requires payment

mkopec avatar Apr 09 '25 11:04 mkopec

I've looked at a couple of driverless options for Windows:

* Intel HID Event Filter: Does not support the micmute HID usage

* ACPI Generic Button device: Windows driver only supports GPIO buttons, Linux driver does not support the micmute HID usage, ACPI spec says it should work but in reality it doesn't

We're only left with one option, which is our own Windows driver, specifically a keyboard filter driver. I suppose a good starting point would be Coolstar's croskeyboard driver. I haven't looked into distributing Windows drivers through Windows Update yet, but I believe it's a whole large process that requires payment

We have decided to postpone this for now and work on this later on.

wessel-novacustom avatar Apr 10 '25 14:04 wessel-novacustom

This issue is still present on novacustom v540tu on v1.0.0-rc2.

JakubRed avatar May 05 '25 11:05 JakubRed

This issue is still present on novacustom v560tnd on v1.0.0-rc3

matmacieje avatar May 12 '25 10:05 matmacieje

This will be listed as a known issue in v1.0.0.

BeataZdunczyk avatar Jul 28 '25 10:07 BeataZdunczyk