From: Terry Junge <linuxhid@cosmicgizmosystems.com>
To: The-Luga <lugathe2@gmail.com>, Alan Stern <stern@rowland.harvard.edu>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Michal Pecio <michal.pecio@gmail.com>,
Terry Junge <linuxsound@cosmicgizmosystems.com>,
linux-sound@vger.kernel.org, linux-usb@vger.kernel.org,
linux-input@vger.kernel.org, Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>
Subject: Re: [BUG] Edifier QR30 (2d99:a101, Jieli Technology) reboots itself when RGB brightness button is used under Linux
Date: Mon, 10 Nov 2025 21:11:25 -0800 [thread overview]
Message-ID: <c6d506f7-f13b-4d57-a522-a2ccd09e7a1f@cosmicgizmosystems.com> (raw)
In-Reply-To: <CALvgqED5NCNjrtv_YSfg9rzerK-xWAE5TaJjZtMBMcY=8MSk3g@mail.gmail.com>
On 11/10/2025 3:48 PM, The-Luga wrote:
>>> Are you sure?
>>>
>>> HID_QUIRK_ALWAYS_POLL = 0x400
>>> would stop suspending the device.
>>
>> Actually, it forces the kernel to poll the device's IN endpoints even
>> when no program is holding the device file open (see where
>> usbhid_start() calls hid_start_in() if the ALWAYS_POLL quirk is set).
>> This is exactly what the speaker seems to need.
>>
>> As a side effect, it prevents the device from being suspended. But that
>> doesn't seem to be the important thing here.
Polling for input reports is handled by the hardware at the interval
requested by the device during enumeration. There is no intervention by
the kernel to poll for an input report. The only way the kernel can stop
polling a device for input reports is to suspend it.
So ALWAYS_POLL means never suspend.
>
> From: https://github.com/torvalds/linux/blob/master/include/linux/hid.h
>
> #define HID_QUIRK_ALWAYS_POLL BIT(10) -> 2^10=1024=#400
> #define HID_QUIRK_NO_IGNORE BIT(30) -> 2^30=1073741824=#40000000
>
> Sorry about that. I'm still learning and the documentation was not
> very clear on this.
>
> Trying the 0x40000000: `usbhid.quirks=0x2d99:0xa101:0x40000000` the
> usbmon stays silent when changing volume/button and reboots when
> changing brightness.
>
> With HID_QUIRK_ALWAYS_POLL: `usbhid.quirks=0x2d99:0xa101:0x400`
> (reboot does not happen).
>
> Is there a different quirk to try?
No, HID_QUIRK_ALWAYS_POLL is the one you want.
Do you want to write the patch and submit it?
>
> Off-topic:
> I was trying to decode this protocol... and did it with volume control.
>
> I can control my speaker directly with:
>
> Full volume:
> `echo \
> "2eaaec670001100e000000000000000000000000000000000000000000000000" \
> | xxd -r -p | dd bs=64 count=1 conv=sync | sudo tee /dev/hidraw1`
>
> muted:
> `echo \
> "2eaaec67000100fe0000000000000000000000000000000000000000000000000" \
> | xxd -r -p | dd bs=64 count=1 conv=sync | sudo tee /dev/hidraw1`
>
> I renamed the steps to be similar to the audio stack where 0 is very
> low but not muted.
>
> ad it stays consistent on this full range. (tested)
>
> volume muted
> 2eaaec670001 00fe 00000000000000000000000000000000000000000000000000
> volume 0
> 2eaaec670001 01ff 00000000000000000000000000000000000000000000000000
> volume 1
> 2eaaec670001 0200 00000000000000000000000000000000000000000000000000
> volume 2
> 2eaaec670001 0301 00000000000000000000000000000000000000000000000000
> volume 3
> 2eaaec670001 0402 00000000000000000000000000000000000000000000000000
> volume 4
> 2eaaec670001 0503 00000000000000000000000000000000000000000000000000
> volume 5
> 2eaaec670001 0604 00000000000000000000000000000000000000000000000000
> volume 6
> ...
> volume 14
> 2eaaec670001 0f0d 00000000000000000000000000000000000000000000000000
> Volume 15 (max)
> 2eaaec670001 100e 00000000000000000000000000000000000000000000000000
>
>
>
> And I also decoded the speaker volume it outputs by rotating the knob:
>
> volume muted
> 2fbbec660002 1000 1f00 00000000000000000000000000000000000000000000
> volume 0
> 2fbbec660002 1001 2000 00000000000000000000000000000000000000000000
> volume 1
> 2fbbec660002 1002 2100 00000000000000000000000000000000000000000000
> volume 2
> 2fbbec660002 1003 2200 00000000000000000000000000000000000000000000
> volume 3
> 2fbbec660002 1004 2300 00000000000000000000000000000000000000000000
> ...
> volume 14
> 2fbbec660002 100f 2e00 00000000000000000000000000000000000000000000
> Volume 15 (max)
> 2fbbec660002 1010 2f00 00000000000000000000000000000000000000000000
>
> When sending the volume change command to hidraw. The device outputs
> the volume it was set to go like the knob on that value:
>
> ffff8d49f36b3680 206654552 S Io:3:002:4 -115:1 64 = 2eaaec67 0001100e
> 00000000 00000000 00000000 00000000 00000000 00000000
> ffff8d49f36b3680 206654840 C Io:3:002:4 0:1 64 >
> ffff8d494c8ee0c0 206655831 C Ii:3:002:4 0:1 64 = 2fbbec66 00021010
> 2f000000 00000000 00000000 00000000 00000000 00000000
> ffff8d494c8ee0c0 206655832 S Ii:3:002:4 -115:1 64 <
> ffff8d494c8ee0c0 206656830 C Ii:3:002:4 0:1 64 = 2fbbec67 00010110
> 00000000 00000000 00000000 00000000 00000000 00000000
> ffff8d494c8ee0c0 206656831 S Ii:3:002:4 -115:1 64 <
>
> If, I mean it's a very big IF. I wanted to have this device with
> hardware volume control working with alsa/pipewire/wireplumber/etc.
> What would be needed?
ALSA and the rest are triggered to bump the volume up or down with the
Consumer Control Volume Up and Volume Down events. Those HID usages are
declared in the other HID interface but never fired as your testing shows.
You would need a kernel driver and detect the volume change using the
vendor unique reports and then inject KEY_VOLUMEUP or KEY_VOLUMEDOWN
events as needed. It may or may not work...
>
> Maybe this vendor uses the same method of communication for other devices?
>
> Maybe related: https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/thread/CYSG6A62JJID5N2V5YUDW43CELEZDF36/
>
> The decibel range is bogus:
>
> lugathe wireplumber[1231]: spa.alsa: The decibel volume range for
> element 'PCM' (-2837 dB - -94 dB) has negative maximum. Disabling the
> decibel range.
>
> The RGB/Equalizer/profiles/etc. I don't think it's really important in
> the kernel context except with the reboot apparently solved with
> always poll quirk.
>
> Before this I really *knew nothing* and I am having a really good time
> and happy with this challenge. Thank you all for the wonderful work
> and knowledge you are sharing.
next prev parent reply other threads:[~2025-11-11 5:11 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CALvgqEAq8ZWgG4Dyg_oL7_+nUDy+LUoTXi+-6aceO-AKtBS3Mg@mail.gmail.com>
2025-11-08 4:41 ` [BUG] Edifier QR30 (2d99:a101, Jieli Technology) reboots itself when RGB brightness button is used under Linux Terry Junge
2025-11-08 18:18 ` The-Luga
2025-11-08 20:48 ` Alan Stern
2025-11-09 0:15 ` The-Luga
2025-11-09 3:22 ` Alan Stern
2025-11-09 5:18 ` The-Luga
2025-11-09 8:24 ` Michal Pecio
2025-11-09 14:25 ` The-Luga
2025-11-09 15:32 ` Alan Stern
2025-11-09 16:44 ` The-Luga
2025-11-09 20:30 ` Alan Stern
2025-11-09 22:17 ` The-Luga
2025-11-09 22:49 ` Terry Junge
2025-11-10 0:56 ` The-Luga
2025-11-10 4:00 ` Terry Junge
2025-11-10 2:20 ` Alan Stern
2025-11-10 4:56 ` Dmitry Torokhov
2025-11-10 5:40 ` The-Luga
2025-11-10 6:54 ` The-Luga
2025-11-10 19:57 ` Terry Junge
2025-11-10 20:10 ` Alan Stern
2025-11-10 23:48 ` The-Luga
2025-11-11 1:59 ` The-Luga
2025-11-11 3:42 ` Alan Stern
2025-11-11 5:11 ` Terry Junge [this message]
2025-11-11 7:42 ` [PATCH] The Edifier QR30 USB speaker, identified as: Jieli Technology EDIFIER Hal0 2.0 SE 2d99:a101, reports a HID interface that needs HID_QUIRK_ALWAYS_POLL to ensure it does not crash when changing the RGB brightness with the physical knob Rodrigo Lugathe da Conceição Alves
2025-11-11 8:08 ` The-Luga
2025-11-11 19:33 ` Michal Pecio
2025-11-12 1:53 ` [PATCH v2] Apply the quirk HID_QUIRK_ALWAYS_POLL to the Edifier QR30 (2d99:a101) Rodrigo Lugathe da Conceição Alves
2025-11-12 5:20 ` Terry Junge
2025-11-12 17:25 ` Alan Stern
2025-11-13 15:45 ` The-Luga
2025-11-13 17:45 ` Terry Junge
2025-11-11 9:16 ` [BUG] Edifier QR30 (2d99:a101, Jieli Technology) reboots itself when RGB brightness button is used under Linux Oliver Neukum
2025-11-11 15:08 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c6d506f7-f13b-4d57-a522-a2ccd09e7a1f@cosmicgizmosystems.com \
--to=linuxhid@cosmicgizmosystems.com \
--cc=bentiss@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linuxsound@cosmicgizmosystems.com \
--cc=lugathe2@gmail.com \
--cc=michal.pecio@gmail.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).