Repository navigation
Description
⚠️ Disclosure: this issue was written entirely by an AI coding agent (Claude Fable 5.1, running in Claude Code), operating under the direction of the account owner (@puchupala). The companion pull request, its code and its commit message were also produced by the same AI agent. Please review with that in mind.
Split out of #888 / #889 at the owner's request: #888 is about the H700-specific on/off motor switch, while the two points below are platform-agnostic and live in the common VIB layer (workspace/all/common/api.c). They are independent of the H700 fix and can land in any order.
1. There is no user-facing way to lower rumble strength
- The only related setting, "Haptic feedback", gates just the OS boot/sleep/power-off pulses;
CFG_getHapticsis never consulted in minarch's rumble path, so game rumble is always passed through at whatever the core requests. - Cores such as mGBA and gpSP expose no strength option of their own, so a game that requests constant max-strength rumble (Pokémon Pinball: Ruby & Sapphire) cannot be toned down at all.
- tg5040 already had to hard-cap the Brick Pro motor voltage in code because full strength was found too strong (Rumble issue in PKM Pinball gba #78 / fix: proper rumble scaling for tg5040 #64), which suggests the comfortable level varies per user and per device rather than being something a single platform constant can settle.
Proposal: a rumbleStrength= percentage in minuisettings.txt (default 100 = no behaviour change), shown in Settings → System next to "Haptic feedback" as Off / 10 % … 100 %, and applied once in VIB_thread right before PLAT_setRumble so vib.strength / VIB_getStrength() stay in core units and minarch's in-game-menu save/restore is untouched. On tg5040/tg5050 it becomes a plain multiply before the existing voltage/level mapping. On a stock H700 build only "Off" has a visible effect (any non-zero scaled value still maps to 1); together with #889 it gives real intermediate strength there.
2. The motor can be left on at process exit and through suspend
Found while auditing stuck-motor paths for #888; reasoned from the source, not reproduced on-device in isolation.
VIB_quitcallsVIB_setStrength(0)(which only queues 0 for the VIB thread) and then immediatelypthread_cancels that thread. The thread is normally insideSDL_Delay, or still counting downDEFER_FRAMES, so the 0 is usually never applied and the last non-zeroPLAT_setRumblestands when the process exits.PWR_enterSleepnever zeroes rumble. With "Haptic feedback" off (the default) the sleep pulse that would otherwise overwrite the motor state does not run, so a core that is mid-rumble when the lid closes keeps the motor on through suspend.
Proposal: after pthread_join in VIB_quit, reset the VIB state and call PLAT_setRumble(0) directly; make VIB_setStrength(0) the first statement of PWR_enterSleep (the VIB thread applies it within ~70 ms, long before PWR_deepSleep runs after the suspend timeout).
Activity
Pobega commentedon Nov 16, 2026
This is an issue with the driver, not NextUI.
I have a PR open to add controllable rumble motor capabilities in BaseOS and clamp it to more reasonable values (40% min and 60% max).
pvaibhav/BaseOS#43
If that lands you're welcome to expose the value and scale the clamps around in NextUI.
I believe doing this completely in userland (NextUI) is a hack TBH
puchupala commentedon Nov 16, 2026
Please allow me to confirm. Perhaps this comment is meant for #888, which modulates H700 rumble strength in userland? If so, I completely agree. Fixing #888 in NextUI is a hack.
This issue, however, proposes a global user-configurable rumble strength scaling option applicable to every platform. Which I believe is within NextUI's scope.
Pobega commentedon Nov 16, 2026
Right, that's what I meant by this:
If the BaseOS PR lands this whole series of issues/PRs can become one PR to control the exposed
(min,max)_duty_pctfrom NextUI.puchupala commentedon Nov 16, 2026
Perhaps I'm misunderstanding something. Please forgive my naivety.
If I understand correctly, #899 already does exactly this. It scales the value passed to
PLAT_setRumble()(here). While this won't work on H700 yet, it should works on the other platforms wherePLAT_setRumble()modulate the strength correctly.Do we need to wait until pvaibhav/BaseOS#43 lands? Doesn't it only fix H700 (effectively replacing the userspace hack #889)? Perhaps I miss something, but does pvaibhav/BaseOS#43 also introduce any new platform-agnostic interface we supposed to use?
NOTE: I'm sorry about the PR numbers. They somehow landed on #889 (h700-hack, closed) and #899 (this PR, global scaling), so it's super confusing. They should be completely independent of one another.
Pobega commentedon Nov 16, 2026
Yeah I've been replying mostly on mobile and have found it hard to follow between the numbers and titles (every one is also prepended with
[AI-generated *]which makes it hard to tell them apart on a small screen, since all I can see in my browser tab is that text.)#899 is probably fine, I haven't tested. It may be worth testing that #899 actually behaves as advertised with pvaibhav/BaseOS#43 - the entire rumble control is in a file authored by me in that PR so I'm not sure how #899 is going to behave with that.
It should work.
puchupala commentedon Nov 16, 2026
I tried to be extra verbose with AI usage, but perhaps that backfired. I apologize again for the confusion. Let me check whether everything works correctly with pvaibhav/BaseOS#43.
Pobega commentedon Nov 16, 2026
Yeah it's valiant and appreciated but does sometimes create extra noise. It's cool, we're all figuring out the best way to communicate with all these new tools.
I also realized I misspoke above:
We should not be modifying those module variables. pvaibhav/BaseOS#43 should already give us a clamp window of 40%~60% motor strength, so if your change requests 100% strength vibrate it should get 60%, and if it requests 25% it will get 45% (due to the clamping.)
I don't want to lead your LLM down a bad path during testing - those module variables are probably up to BaseOS to configure per-device, I'd reckon.
(as for testing, if you want to point your LLM at BaseOS and build that module you could just
adb pushthe module to/tmp/andinsmodit to get the new vibration behavior -- don't need to flash a BaseOS build or anything.)puchupala commentedon Nov 16, 2026
Thank you very much for the pointers. I'll see what I can do. :-)
[-][AI-generated report] Rumble on all platforms: no way to lower strength, and the motor can stay on after exit / through suspend[/-][+]Rumble on all platforms: no way to lower strength, and the motor can stay on after exit / through suspend[/+]puchupala commentedon Nov 23, 2026
I've verified that #899 works with pvaibhav/BaseOS#43 perfectly. :-)