jahnf / Projecteur

Linux Desktop Application for the Logitech Spotlight device (and similar devices) - Digital Laser Pointer
MIT License
379 stars 33 forks source link

After vibration, Projecteur constantly uses one core #133

Closed mayanksuman closed 3 years ago

mayanksuman commented 3 years ago

After vibration, the program constantly use one of core for 100% time.

To reproduce:

  1. Open Projecteur and system monitor.
  2. Connect Spotlight USB.
  3. In Projecteur preferences, go to device tab and select 'Vibration Timer'
  4. Click 'Test' in Vibration settings.

The device will vibrate but this point onwards the application use one core continuously as visible in Gnome system monitor.

OS: Debian Testing

jahnf commented 3 years ago

Hi Mayank, thanks for reporting, I will see if I can reproduce this. Will request more info from your side if necessary.

mayanksuman commented 3 years ago

I think that calling write in device-vibrate.cc:431 (on socket attached to Read Only QSocketNotifier) is causing this issue. Flame graph generated for the application (using perf for 1 minute of activity) after the device has vibrated show some call to QSocketNotifier and a lot of system calls.

Among the system calls, call to poll is prominent, which suggests that program is checking for an event on a file descriptor (of HID device).