timothycrosley / streamdeck-ui

A Linux compatible UI for the Elgato Stream Deck.
https://timothycrosley.github.io/streamdeck-ui/
MIT License
1.14k stars 242 forks source link

segmentation fault: error [release_interface] release interface failed, #194

Closed robin13 closed 2 years ago

robin13 commented 2 years ago

I'm running OS: Ubuntu 20.04.3 LTS with kernel 5.4.0-94-generic streamdeck-ui 1.4.0 Elgato Streamdeck MK.2

Whenever I suspend and wake up from suspend again, the connection is lost to the streamdeck. The streamdeck comes up with the default logo, and in the shell I see:

  bin Traceback (most recent call last):
  File "/home/rclarke/.local/bin/streamdeck", line 8, in <module>
    sys.exit(start())
  File "/home/rclarke/.local/lib/python3.8/site-packages/streamdeck_ui/gui.py", line 673, in start
    api.close_decks()
  File "/home/rclarke/.local/lib/python3.8/site-packages/streamdeck_ui/api.py", line 121, in close_decks
    deck.set_brightness(50)
  File "/home/rclarke/.local/lib/python3.8/site-packages/StreamDeck/Devices/StreamDeckOriginalV2.py", line 129, in set_brightness
    self.device.write_feature(payload)
  File "/home/rclarke/.local/lib/python3.8/site-packages/StreamDeck/Transport/LibUSBHIDAPI.py", line 400, in write_feature
    return self.hidapi.send_feature_report(self.device_handle, payload)
  File "/home/rclarke/.local/lib/python3.8/site-packages/StreamDeck/Transport/LibUSBHIDAPI.py", line 217, in send_feature_report
    raise TransportError("Failed to write feature report (%d)" % result)
StreamDeck.Transport.Transport.TransportError: Failed to write feature report (-1)
libusb: error [release_interface] release interface failed, error -1 errno 22

[1]  + 297942 segmentation fault (core dumped)  streamdeck

Is there anything can be done to make it more robust for coping with suspend/wake-up?

dodgyrabbit commented 2 years ago

Duplicate of #4 Will hopefully look into this again soon.