Implemented for example on Framework Laptops as the Airplane Mode button.
Sponsored by: Framework Computer Inc
Differential D56026
hid/hsctrl: Add support for Wireless Radio Button Authored by git_danielschaefer.me on Mar 22 2026, 10:22 AM. Tags None Referenced Files
Details
Diff Detail
Event TimelineComment Actions Can confirm this works on my machine too! Although sometimes when I press the button fast enough, it doesn't register. It always does when I hold it down for more than a fraction of a second though. Assuming this will be fixed once we're able to pass GPIO interrupts to iichid. for reference: https://www.usb.org/sites/default/files/hutrr40radiohidusagesfinal_0.pdf btw, only tangentially related, but see D55265 for a bit of discussion on what a generic rfkill interface would look like on freebsd
This comment was removed by wulf. Comment Actions Radio button can not be correctly handled with hidmap. MS does strange things here assuming every event in report as a keypress. E.g. ASUS TUF always reported radio key as depressed that brokes Linux but works on Windows Comment Actions this revision does exactly what i think you're describing. Would you have liked it to be done some way else?
Comment Actions Forgive my ignorance but what exactly is this doing from a high level perspective not from the functional change about simulating the key press. But what triggers the actual RFKILL hardware level disconnect? The same button press? And can software (e.g., a widget) undo this or does one have to press the button again? I am just trying to puzzle software rfkill and hardware rfkill states together and am trying to understand where this fits in... Comment Actions
Nothing at the moment. we need a generic rfkill interface on freebsd; see D55265 for a little discussion on this
That's I think the end goal. Pressing this button just reports this to the desktop environment or some other user program, and it is responsible for actually rfkill'ing or not. Comment Actions That highly depends ... software can clear software, hardware can clear "hardware". And that's why I asked. If I press the button on my non-framework laptop, the BT USB device just vanishes (you can see on console) and wifi stops transmitting as it's firmware/hardware doing that (and the wifi driver getting an interrupt I believe even on that one too). So yes, we need a proper framework that deals with software and hardware rfkill in a way that can hook into drivers. net80211 has no clue about it; LinuxKPI has some already (surprise; given structures etc. are there in the drivers) but we don't drive it or use it in any way. Comment Actions
yeah, as you say for devices with hw rfkill buttons we indeed want a way to report this to the user. The framework button is purely a software things afaiu | |||||||||||||||||||||||||||||||||||||||||||||||||