Open hw-lunemann opened 2 years ago
I have the same issue using a Dell XPS 15. It's rarer for me, and for me the trackpad does not get back to normal. I will post a debug log here the next time I see it.
It can take a good while before it goes back to normal. Sometimes maybe 10-15 minutes. When it happens I usually don't bother restarting sway because I don't use the mouse a whole lot.
Something else interesting to check: if you run sudo libinput debug-events
before you suspend, you can see upon waking what libinput is receiving. I have had an issue before where sway got disconnected from libinput.
I have this problem too but it happens with my bluetooth mouse as well as trackpad.
I have this problem too but it happens with my bluetooth mouse as well as trackpad.
# sudo libinput debug-events
-event16 DEVICE_ADDED Video Bus seat0 default group1 cap:k
-event0 DEVICE_ADDED Lid Switch seat0 default group2 cap:S
-event1 DEVICE_ADDED Intel Touch Host Controller seat0 default group3 cap:t ntouches 1 calib
-event3 DEVICE_ADDED gpio-keys seat0 default group4 cap:k
-event4 DEVICE_ADDED gpio-keys seat0 default group4 cap:k
-event8 DEVICE_ADDED Microsoft Surface 045E:09AE Keyboard seat0 default group5 cap:kp scroll-nat
-event9 DEVICE_ADDED Microsoft Surface 045E:09B0 Keyboard seat0 default group6 cap:k
-event12 DEVICE_ADDED Microsoft Surface 045E:09AF Mouse seat0 default group7 cap:p left scroll-nat scroll-button
-event13 DEVICE_ADDED Microsoft Surface 045E:09AF Touchpad seat0 default group7 cap:pg size 96x52mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on dwtp-on
-event7 DEVICE_ADDED Microsoft Surface KIP Tablet Mode Switch seat0 default group8 cap:S
-event5 DEVICE_ADDED IPTS Touch seat0 default group9 cap:t size 274x185mm ntouches 11 calib
-event6 DEVICE_ADDED IPTS Stylus seat0 default group10 cap:T size 274x185mm calib
-event31 DEVICE_ADDED M720 Triathlon Keyboard seat0 default group11 cap:k
-event256 DEVICE_ADDED M720 Triathlon Mouse seat0 default group11 cap:p left scroll-nat scroll-button
-event8 KEYBOARD_KEY +0.000s *** (-1) pressed
(suspend)
-event7 SWITCH_TOGGLE +5.415s switch tablet-mode state 1
event7 SWITCH_TOGGLE +5.526s switch tablet-mode state 0
-event0 SWITCH_TOGGLE +5.526s switch lid state 1
-event31 DEVICE_REMOVED M720 Triathlon Keyboard seat0 default group11 cap:k
-event256 DEVICE_REMOVED M720 Triathlon Mouse seat0 default group11 cap:p
-event0 SWITCH_TOGGLE +8.457s switch lid state 0
-event9 KEYBOARD_KEY +8.846s *** (-1) pressed
event9 KEYBOARD_KEY +8.846s KEY_LEFTMETA (125) pressed
event9 KEYBOARD_KEY +8.846s KEY_F19 (189) pressed
event9 KEYBOARD_KEY +8.846s *** (-1) released
event9 KEYBOARD_KEY +8.846s KEY_LEFTMETA (125) released
event9 KEYBOARD_KEY +8.846s KEY_F19 (189) released
-event8 KEYBOARD_KEY +11.538s *** (-1) pressed
event8 KEYBOARD_KEY +11.667s *** (-1) pressed
event8 KEYBOARD_KEY +11.808s *** (-1) released
event8 KEYBOARD_KEY +11.903s *** (-1) pressed
event8 KEYBOARD_KEY +12.041s *** (-1) released
event8 KEYBOARD_KEY +12.043s *** (-1) released
event8 KEYBOARD_KEY +12.108s *** (-1) pressed
event8 KEYBOARD_KEY +12.196s *** (-1) released
event8 KEYBOARD_KEY +12.216s *** (-1) pressed
event8 KEYBOARD_KEY +12.296s *** (-1) pressed
I noticed that even if I quit sway, and load it back up, it remains like this. I had to reboot to get this to go away. Has anyone else experienced that or is that unique to me?
I noticed that even if I quit sway, and load it back up, it remains like this. I had to reboot to get this to go away. Has anyone else experienced that or is that unique to me?
I also tested it where I booted, did not start sway/wayland (no display manager), suspended, and came back. I then started sway, and sure enough I have to click twice on everything.
There'a a bug reported in libinput upstream that matches your description: https://gitlab.freedesktop.org/libinput/libinput/-/issues/712
The upstream bug describes the same problem happening in Gnome, so I guess it's unlikely to be a Sway bug?
There'a a bug reported in libinput upstream that matches your description: https://gitlab.freedesktop.org/libinput/libinput/-/issues/712
The upstream bug describes the same problem happening in Gnome, so I guess it's unlikely to be a Sway bug?
That bug seems to describe a problem with the touch part of the touch pad, but moving the mouse cursor works perfectly fine in my situation.
Mouse clicks are what are impacted for me. But I'll check it out.
I also have the same issue and haven't been able to properly debug it yet. A workaround that I use is helps some times:
sudo modprobe -r psmouse
sudo modprobe psmouse
Same issue here, my workaround is a bit simpler:
then my touchpad works again.
I just had the same behavior with gnome, maybe this is not related to sway at all...
Same behavior for me, on Fedora 38 + Sway : after resuming from suspect, touchpad requires 3 fingers for scroll (until I read this issue, I hadn't realized using 3 fingers instead of 2 would work). I'm dropping an additional piece of info that I haven't seen in the previous comments, maybe it might help someone?
Something that I realized is that the identifier of the touchpad changes when the weird behaviour happens:
When the touchpad requires 3 fingers, it is recognized as a SynPS/2 Synaptics TouchPad:
$ swaymsg -t get_inputs | jq '.[] | select(.type=="touchpad")'
{
"identifier": "2:7:SynPS/2_Synaptics_TouchPad",
"name": "SynPS/2 Synaptics TouchPad",
"vendor": 2,
"product": 7,
"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",
"middle_emulation": "disabled",
"scroll_method": "two_finger",
"dwt": "enabled",
"dwtp": "enabled"
}
}
While when it works correctly (e.g.: after reboots, usually), it's being seen as a "Synaptics TM2749-001":
$ jq '.[] | select(.type=="touchpad")' < input-touchpad-working.json
{
"identifier": "1739:0:Synaptics_TM2749-001",
"name": "Synaptics TM2749-001",
"vendor": 1739,
"product": 0,
"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",
"middle_emulation": "disabled",
"scroll_method": "two_finger",
"dwt": "enabled",
"dwtp": "enabled"
}
}
This seems to be consistent
Sway Version: 1.7 Archlinux
Debug Log: still working on catching that
Configuration File:
Auto start
exec lxqt-policykit-agent exec keepassxc
Variables
#
Logo key. Use Mod1 for Alt.
set $mod Mod4
Home row direction keys, like vim
set $left h set $down j set $up k set $right l
Your preferred terminal emulator
set $term foot
Your preferred application launcher
Note: pass the final command to swaymsg so that the resulting window can be opened
on the original workspace that the command was run on.
set $menu dmenu_path | dmenu | xargs swaymsg exec --
default_border normal
Output configuration
#
Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill #
Example configuration:
#
output HDMI-A-1 resolution 1920x1080 position 1920,0
#
You can get the names of your outputs by running: swaymsg -t get_outputs
Idle configuration
#
Example configuration:
#
exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 600 'swaymsg "output dpms off"' resume 'swaymsg "output dpms on"' \
before-sleep 'swaylock -f -c 000000'
#
This will lock your screen after 300 seconds of inactivity, then turn off
your displays after another 300 seconds, and turn your screens back on when
resumed. It will also lock your screen before your computer goes to sleep.
Input configuration
#
Example configuration:
#
input "2:14:SynPS/2_Synaptics_TouchPad" {
dwt enabled
tap enabled
natural_scroll enabled
middle_emulation enabled
}
#
You can get the names of your inputs by running: swaymsg -t get_inputs
Read
man 5 sway-input
for more information about this section.input type:touchpad { dwt disabled tap enabled natural_scroll enabled }
Key bindings
#
Basics:
#
Start a terminal
#
Moving around:
#
Move your focus around
#
Workspaces:
#
Switch to workspace
#
Layout stuff:
#
You can "split" the current object of your focus with
#
Scratchpad:
#
Sway has a "scratchpad", which is a bag of holding for windows.
#
Resizing containers:
# mode "resize" {
left will shrink the containers width
} bindsym $mod+r mode "resize"
#
Fn keys:
bindsym XF86MonBrightnessDown exec licht intel_backlight -10 --stepping blend (0.75,1.8,2.2) bindsym XF86MonBrightnessUp exec licht intel_backlight +10 --stepping blend (0.75,1.8,2.2)
bindsym XF86AudioRaiseVolume exec pamixer -ui 2 bindsym XF86AudioLowerVolume exec pamixer -ud 2 bindsym XF86AudioMute exec pamixer --toggle-mute
#
Status Bar:
#
Read
man 5 sway-bar
for more information about this section.bar { position top
status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
}
for_window [class="steam"] move workspace $(cat /tmp/steam)