usb rotary encoder

Post Reply
k.s.deviate
Posts: 9
Joined: Mon Nov 24, 2025 7:32 pm

usb rotary encoder

Post by k.s.deviate »

Pardon my ignorance, but if I have a usb rotary encoder that natively adjusts the volume when outside of Hudiy (on desktop) would I still need to use a script to get Hudiy to recognize the inputs?
hudiy
Site Admin
Posts: 302
Joined: Mon Jul 14, 2025 7:42 pm

Re: usb rotary encoder

Post by hudiy »

Could you please send the model of the rotary encoder you're referring to? In general, if the encoder is handled by PipeWire, then there is no need to implement encoder handling directly in Hudiy.

Most likely the encoder (if handled by PipeWire) controls the volume of the default audio sink, which becomes hudiy_equalizer_sink once Hudiy is started. By default, Hudiy also controls the volume of the default audio sink so the PipeWire should be able to synchronize that.

https://github.com/wiboma/hudiy/blob/ma ... E.md#audio
https://github.com/wiboma/hudiy/blob/ma ... n.md#sound
k.s.deviate
Posts: 9
Joined: Mon Nov 24, 2025 7:32 pm

Re: usb rotary encoder

Post by k.s.deviate »

Sorry, I couldn't find the model. However I found the link from where I purchased it.

https://a.aliexpress.com/_ms4Gidx

I tried it and it does work in the desktop environment but not in Hudiy
hudiy
Site Admin
Posts: 302
Joined: Mon Jul 14, 2025 7:42 pm

Re: usb rotary encoder

Post by hudiy »

It looks like it uses regular media key codes to control the volume. In labwc, those key codes correspond to XF86_AudioLowerVolume, XF86_AudioRaiseVolume, and XF86_AudioMute. According to the labwc documentation, they trigger amixer actions by default, so they directly adjust the volume of the audio device.

https://github.com/labwc/labwc?tab=read ... le#5-usage

When you say it's not working in Hudiy, do you mean that the volume itself doesn't change, or just that the toast message doesn't appear?
If it's only the toast that's missing, you need to set volumeSink to match the audio device sink.

You can get the name of the audio device sink created by PipeWire using:

Code: Select all

pactl list sinks
Then set that name in volumeSinkName in main_configuration.json:
https://github.com/wiboma/hudiy/blob/ma ... n.md#sound

https://github.com/wiboma/hudiy/blob/ma ... E.md#audio
viewtopic.php?p=755#p755
viewtopic.php?t=63
k.s.deviate
Posts: 9
Joined: Mon Nov 24, 2025 7:32 pm

Re: usb rotary encoder

Post by k.s.deviate »

It seems as tho adjusting the volume in the Trixie desktop and in Hudiy are independent of each other.

Setting the volume of the desktop to 100, start Hudiy, let's just say once started, Hudiy volume is set to 50, the encoder will only turn the volume down. You can then turn it back up but it can only go back up to the volume it was before (No toast, don't care).

If I use the encoder to turn the volume down so you can't hear anything while in Hudiy then alt F4 to desktop, the volume of the desktop has be lowered to zero. Go back into Hudiy, use the on screen volume and it will show the same level as it was before, 50.

I apologize if I'm not making sense, for some reason this is hard for me to describe. I'm only using Bluetooth out btw if that matters, I have disabled the audio jack and I'm using a dsi display.
k.s.deviate
Posts: 9
Joined: Mon Nov 24, 2025 7:32 pm

Re: usb rotary encoder

Post by k.s.deviate »

I didn't read properly, I got it sorted out.
Last edited by k.s.deviate on Fri Dec 05, 2025 1:50 am, edited 1 time in total.
k.s.deviate
Posts: 9
Joined: Mon Nov 24, 2025 7:32 pm

Re: usb rotary encoder

Post by k.s.deviate »

Im still having the issue where I need to select the output device.

Edit: I created a new script to ensure the dsp auto connects after boot.
Post Reply