Skip to content

Actions run on every device when several are connected and no -d is given #607

Closed

Description

@ChrisLauinger77

Description

With more than one supported device connected, an action without -d should be refused with Multiple devices, specify with -d. Instead it is executed on every device, and the refusal message never appears.

Reproduce with the mock device plus a real headset (here a Logitech G PRO X 2 LIGHTSPEED, HeadsetControl 4.2.0-10-ga8120a6 = current master, hidapi 0.15.0). -l 1 is safe to try because the G PRO X 2 has no lights:

$ headsetcontrol --test-device -l 1
Found 2 supported device(s):
 HeadsetControl Test device (Test Device) [0xf00b:0xa00c]
 Logitech G PRO X 2 LIGHTSPEED (PRO X 2 LIGHTSPEED) [0x046d:0x0af7]

Successfully set lights!

This headset doesn't support lights

-o json shows the same: the mock's CAP_LIGHTS action has "status": "success", the G PRO X 2 reports its capability error. With -s 64 the sidetone was set on both the mock and the real G PRO X 2.

Cause, in cli/main.cpp: handleMultiDeviceActions marks the request with req.result.status = FEATURE_NOT_PROCESSED plus the message. But FeatureResult::status defaults to NotProcessed, and processFeatureRequests executes exactly the requests with should_process && status == FEATURE_NOT_PROCESSED. Before the C++ rewrite (#443) the check was != FEATURE_NOT_PROCESSED, so the marker worked. That makes it a regression since 4.0.0.

Two side effects:

Related: #585 (the same status check breaks follow mode).

On which OS does the problem happen?

Linux

Activity

  1. added a commit that references this issue on Oct 23, 2026
    abca822
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