Sway touchpad config does not affect touchpad

I encountered a problem configuring touchpad in Sway: settings do not affect libinput configuration. Sway reload, log out and log in, system reboot don’t help.

This is what I initially placed in ~/.config/sway/config:

input "type:touchpad" {
    tap enabled
    tap_button_map lrm
    dwt enabled
    dwtp enabled
}

Then I placed similar code snippet to /etc/sway/config and tried to change "type:touchpad" to "1267:12817:ASUE1211:00_04F3:3211_Touchpad" (identifier given by swaymsg -t get_inputs), no effect either.

This is what I’ve found in logs. I’m not sure it is related though.

Feb 14 06:56:11 fedora sway[1907]: 00:27:19.214 [ERROR] [wlr] [backend/drm/atomic.c:79] connector eDP-1: Atomic commit failed: Device or resource busy
Feb 14 06:56:11 fedora sway[1907]: 00:27:19.214 [ERROR] [sway/desktop/output.c:317] Page-flip failed on output eDP-1
Feb 14 06:57:58 fedora sway[1907]: 00:29:06.136 [ERROR] [wlr] [libinput] event5  - ASUE1211:00 04F3:3211 Touchpad: kernel bug: Touch jump detected and discarded.
Feb 14 06:57:58 fedora sway[1907]: See https://wayland.freedesktop.org/libinput/doc/1.27.1/touchpad-jumping-cursors.html for details

Versions:

  • OS: Linux fedora 6.12.11-200.fc41.x86_64
  • Sway: sway version 1.10.1
  • Libinput: 1.27.1
  • Machine: Vivobook_ASUSLaptop X1605ZA_X1605ZA

Note that I moved from Gnome DE to Sway without reinstalling whole OS, I simply upgraded the system from 40 to 41, then removed Gnome Desktop and Fedora Workstation groups and installed Sway with SDDM. There is a possibility that I messed up with configs somewhere, but I really want to understand what’s going on instead of just reinstall everything as if I were using Windows.

Try it without quotes.

input type:touchpad {
...
}

That’s the way it works in my config.

Unfortunately, it doesn’t work either :frowning:

I think Sway should change "libinput" output of swaymsg -t get_inputs --raw. Here it is, touchpad section:

  {
    "identifier": "1267:12817:ASUE1211:00_04F3:3211_Touchpad",
    "name": "ASUE1211:00 04F3:3211 Touchpad",
    "type": "touchpad",
    "scroll_factor": 1.0,
    "libinput": {
      "send_events": "enabled",
      "tap": "disabled",
      "tap_button_map": "lrm",
      "tap_drag": "enabled",
      "tap_drag_lock": "disabled",
      "accel_speed": 0.0,
      "accel_profile": "adaptive",
      "natural_scroll": "disabled",
      "left_handed": "disabled",
      "click_method": "button_areas",
      "clickfinger_button_map": "lrm",
      "middle_emulation": "disabled",
      "scroll_method": "two_finger",
      "dwt": "enabled",
      "dwtp": "enabled"
    },
    "vendor": 1267,
    "product": 12817
  },

Interesting thing is that "dwt", "dwtp", and "tap_button_map" seem to be changed, but "tap" not.

Does it work if you enable it directly through the commandline?

swaymsg input type:touchpad tap enabled

Yes, it worked! But why?..

I have no idea. Can you try changing the order of lines within your config block?

I tried to move the block, no effect. And I found an interesting detail: swaymsg -t get_config shows that this block is not even picked up.

Where do you store your config? AFAIK if you have a local config, the config in /etc/sway/ is not processed.

Here: /home/gleb/.config/sway/config. But I also tried to insert the same code to /etc/sway/config just to be sure.

Another interesting detail. I placed the following line

SWAY_EXTRA_ARGS="$SWAY_EXTRA_ARGS --config $HOME/.config/sway/config"

to /etc/sway/environment (as a quick try) and exited Sway.

Now, two things happened: I’m unable to log in via SDDM, and my config is applied (I entered via tty).

I suppose SDDM is unable to start the DE because at the moment it tries to do so $HOME is unset. I’ll move this line to .config/sway/environment and see what happens.

Well, I messed up with /usr/share/wayland-sessions/sway.desktop a little, and that was the reason why I wasn’t able to log in.

I created the file .config/sway/environment:

SWAY_EXTRA_ARGS="$SWAY_EXTRA_ARGS --config $HOME/.config/sway/config"

and it worked.

Does it also solve your touchpad issues?

Yes, now everything works fine. Maybe this is because I swapped DEs instead of reinstalling the system with different spin, but it’s fine.