Skip to content

Rumble on all platforms: no way to lower strength, and the motor can stay on after exit / through suspend #898

Open

Description

@puchupala

⚠️ 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_getHaptics is 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_quit calls VIB_setStrength(0) (which only queues 0 for the VIB thread) and then immediately pthread_cancels that thread. The thread is normally inside SDL_Delay, or still counting down DEFER_FRAMES, so the 0 is usually never applied and the last non-zero PLAT_setRumble stands when the process exits.
  • PWR_enterSleep never 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

  1. Pobega commented on Nov 16, 2026

    @Pobega

    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

  2. puchupala commented on Nov 16, 2026

    @puchupala
    Author

    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

    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.

  3. Pobega commented on Nov 16, 2026

    @Pobega

    Right, that's what I meant by this:

    If that lands you're welcome to expose the value and scale the clamps around in NextUI.

    If the BaseOS PR lands this whole series of issues/PRs can become one PR to control the exposed (min,max)_duty_pct from NextUI.

  4. puchupala commented on Nov 16, 2026

    @puchupala
    Author

    Perhaps I'm misunderstanding something. Please forgive my naivety.

    this whole series of issues/PRs can become one PR to control the exposed (min,max)_duty_pct from NextUI.

    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 where PLAT_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.

  5. Pobega commented on Nov 16, 2026

    @Pobega

    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.

  6. puchupala commented on Nov 16, 2026

    @puchupala
    Author

    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.

  7. Pobega commented on Nov 16, 2026

    @Pobega

    I tried to be extra verbose with AI usage

    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:

    If the BaseOS PR lands this whole series of issues/PRs can become one PR to control the exposed (min,max)_duty_pct from NextUI.

    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 push the module to /tmp/ and insmod it to get the new vibration behavior -- don't need to flash a BaseOS build or anything.)

  8. puchupala commented on Nov 16, 2026

    @puchupala
    Author

    Thank you very much for the pointers. I'll see what I can do. :-)

  9. changed the title [-][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[/+] on Nov 23, 2026
  10. puchupala commented on Nov 23, 2026

    @puchupala
    Author

    I've verified that #899 works with pvaibhav/BaseOS#43 perfectly. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions