iberianpig / fusuma

Multitouch gestures with libinput driver on Linux
MIT License
3.67k stars 149 forks source link

Fusuma must be started after connecting bluetooth trackpad #125

Closed wonx closed 5 years ago

wonx commented 5 years ago

Describe the bug I am not really sure if it's a bug or not.

Gestures in bluetooth trackpads (like Apple's Magic trackpad) are not recognized if fusuma is started before the device is paired.

To Reproduce Steps to reproduce the behavior:

  1. Launch fusuma as a daemon (fusuma -d) when the system starts.
  2. Connect a bluetooth trackpad. Notice how the bluetooth trackpad works, but not the gestures.
  3. Run sudo killall fusuma and fusuma once again.
  4. Notice how the gestures now work on the bluetooth trackpad.

Expected behavior fusuma should detect new trackpad devices connected after it has been launched.

Versions You can get this information from copy and paste the output of fusuma --version from the command line. Also, please include the OS and what version of the OS you're running.

user@TM1703:~$ fusuma --version
I, [2019-06-04T17:04:37.677538 #3533]  INFO -- : ---------------------------------------------
I, [2019-06-04T17:04:37.677576 #3533]  INFO -- : Fusuma: 0.11.1
I, [2019-06-04T17:04:37.679002 #3533]  INFO -- : libinput: 1.10.4
I, [2019-06-04T17:04:37.679880 #3533]  INFO -- : OS: Linux 4.15.0-50-generic #54-Ubuntu SMP Mon May 6 18:46:08 UTC 2019
I, [2019-06-04T17:04:37.680549 #3533]  INFO -- : Distribution: Ubuntu 18.04.2 LTS \n \l
I, [2019-06-04T17:04:37.681095 #3533]  INFO -- : Desktop session: ubuntu
I, [2019-06-04T17:04:37.681118 #3533]  INFO -- : ---------------------------------------------
issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.94. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Natetronn commented 5 years ago

I believe I'm running into this as well. I have a Apple Magic Trackpad and it doesn't connect and function like a Trackpad normally would until after I click it a couple times. After this it initializes and connects to the bluetooth and it starts to function normally. This happens after every restart. Fusuma startup applications command doesn't seem to work, unless I manually run fusuma -d directly in the terminal every time.

wonx commented 5 years ago

I have fusuma to launch when I start my session, so what I usually do, is make sure the trackpad connected at the login screen. Otherwise, I have to manually restart the service.

iberianpig commented 5 years ago

Could you check libinput debug-events detect the event to connect a new device? If libinput can catch the event, we should implement it to reload fusuma only when detecting a new device.

wonx commented 5 years ago

Yes, libinput debug-events detects when the trackpad is connected for the first time. It shows the following:

-event18 DEVICE_ADDED Apple Wireless Trackpad seat0 default group13 cap:pg size 132x112mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfing

Natetronn commented 5 years ago

I get something similar:

-event19 DEVICE_ADDED {MY NAME} Trackpad seat0 default group7 cap:pg size 132x112mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

wonx commented 5 years ago

Can it be reopened?

Natetronn commented 5 years ago

I setup an alias: alias swipe="fusuma -d" Not ideal but, gets the job done.

iberianpig commented 5 years ago

It seems to be the same issue.

https://github.com/bulletmark/libinput-gestures/issues/228

iberianpig commented 5 years ago

I will implement this feature in lib/fusuma/plugin/filters/libinput_device_filter.rb.

I think that fusuma should reload @keep_device_ids when it detects DEVICE_ADDED in the record.

iberianpig commented 5 years ago

@wonx @Natetronn Please try version 1.2.1. If you have a any problem, please reopen.

Natetronn commented 5 years ago

Thank you for this!

That seems to have addressed it for me. I restarted the computer, after login I clicked on my touchpad to get it to register, trackpad starts working with mouse movements, opened a website and navigated through a couple of pages, then I swiped both ways and it worked fine. I have fusuma -d in startup applications, as was the case before.

I'll give it a few days of playing around to fully confirm but, on first go, it seems to be working.

Natetronn commented 5 years ago

P.s. I ran sudo gem install fusuma to update but, not sure that was the proper way.