Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seat * idle_inhibit touchpad fails with Invalid idle source #7425

Open
wizeman opened this issue Feb 1, 2023 · 2 comments
Open

seat * idle_inhibit touchpad fails with Invalid idle source #7425

wizeman opened this issue Feb 1, 2023 · 2 comments
Labels
bug Not working as intended

Comments

@wizeman
Copy link

wizeman commented Feb 1, 2023

Please fill out the following:

  • Sway Version:
    • swaymsg -t get_version or sway -v

sway version 1.7

  • Description:

These configuration lines seem to be parsed correctly by sway:

seat * idle_inhibit keyboard pointer
seat * idle_wake keyboard pointer

However, if I change any of those lines to one of these instead, I get an error:

seat * idle_inhibit keyboard pointer touchpad
seat * idle_wake keyboard pointer touchpad

The error messages are:

24660:2023-02-01T21:56:31.595038+00:00 hostname user.info sway[3926]: 46:00:20.904 [ERROR] [sway/config.c:858] Error on line 31 'seat * idle_wake keyboard pointer touchpad': Invalid idle source (/home/username/.config/sway/config)
24661:2023-02-01T21:56:31.600024+00:00 hostname user.info sway[3926]: 46:00:20.910 [ERROR] [sway/config.c:426] Error(s) loading config!
24662:2023-02-01T21:56:31.944028+00:00 hostname user.info sway[3926]: 46:00:21.253 [ERROR] [sway/config.c:858] Error on line 31 'seat * idle_wake keyboard pointer touchpad': Invalid idle source (/home/username/.config/sway/config)
24663:2023-02-01T21:56:32.011029+00:00 hostname user.info sway[3926]: 46:00:21.321 [ERROR] [sway/config.c:426] Error(s) loading config!

man 5 sway-input suggests that touchpad is a valid setting for the idle_inhibit and idle_wake seat configuration options and that such input event sources are to be space-separated.

Also, I do have touchpad input event sources, according to swaymsg -t get_inputs, but I would expect the config option to work regardless of whether I currently have such an input event source or not:

$ swaymsg -r -t get_inputs | rg -C3 touchpad
    "name": "SynPS\/2 Synaptics TouchPad",
    "vendor": 2,
    "product": 7,
    "type": "touchpad",
    "scroll_factor": 2.0,
    "libinput": {
      "send_events": "enabled",
@wizeman wizeman added the bug Not working as intended label Feb 1, 2023
@Emantor
Copy link
Contributor

Emantor commented Feb 2, 2023

touchpad simply isn't implemented. This seems to be because sway is handling touchpads as a special case of pointer.

@wizeman
Copy link
Author

wizeman commented Feb 2, 2023

Thanks for looking into this, @Emantor.

touchpad simply isn't implemented.

If that is the case, then both the documentation and the implementation seem to be highly misleading.

The documentation (man 5 sway-input) says:

Valid names are "keyboard", "pointer", "touchpad", "touch", "tablet_pad", "tablet_tool", and "switch".

The way this is written seems to imply that those are the values that are currently supported. Perhaps "touchpad" should be removed from this list? Or a phrase should be added saying "touchpad" is not supported yet?

Also, sway's error message Invalid idle source seems to contradict the documentation, which clearly says that "touchpad" is a valid idle source. Perhaps this error message should be changed to idle source currently unsupported or something similar?

This combination of factors caused me to waste a significant amount of time to figure out whether the problem was one of the following:

  1. That the syntax that I had written wasn't correct
  2. That some other input source (like "pointer") was the cause of the error
  3. That sway wasn't accepting the "touchpad" input source because it wasn't detecting my touchpad correctly
  4. That the error wasn't being being caused due to a combination of input sources, or the order I listed the input sources, rather than simply having "touchpad" as an input source (which the documentation clearly said was a valid value)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

2 participants