timothycrosley / streamdeck-ui

A Linux compatible UI for the Elgato Stream Deck.

Home Page:https://timothycrosley.github.io/streamdeck-ui/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Stream Deck is attached, but it could not be opened.

Maskime opened this issue · comments

Describe the bug
I've tried my best to go through the install process, several times.
But when I start the command streamdeck in my terminal, I get the following message:

$ streamdeck

------------------------
*** Problem detected ***
------------------------
A Stream Deck is attached, but it could not be opened.
Check installation instructions and ensure a udev rule has been added and loaded.
https://github.com/timothycrosley/streamdeck-ui

To Reproduce
Steps to reproduce the behavior:

  1. Go through install process
  2. start binary
  3. See error

Expected behavior
The window open and I can select my stream deck MK2 to do my configuration.

Screenshots
image
symptom
image
rules file content

Operating system (please complete the following information)

  • OS: Ubuntu 22.04.2 LTS
  • Desktop environment: Gnome 42.5
  • Python version: 3.10

Stream Deck Version

  • Standard MK.2

What I already Tried

  • Uninstall / re-install
  • sudo udevadm trigger several times
  • logout / login
  • reboot
  • include the idProduct in the udev rules file

Should be known
This is happening in VM using VMWare. The usb device is connected and I can see it when I use the lsusb command.
When I want to get more details from the usb device using : lsusb -v -d 09fd:0080 I get some details, but I also get a message : Can't open device, information will be missing.
If I redo the command with sudo I don't get this error message from lsusb

Anyway, thanks for your hard work.
Hopefully I'll get some help, but internet of open projects never fails to astonished me by what it can do !

Arch on zen kernel 6.4.1-zen2-1-zen.
Stream Deck XL

First, try disconnecting and reconnecting the streamdeck.
I noticed that I can use the Python Elgato Streamdeck library and it works fine.

And at this point, I have a different error message:

Exception in thread Thread-1 (_run):
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/username/.local/lib/python3.11/site-packages/streamdeck_ui/stream_deck_monitor.py", line 113, in _run
    self.attached(streamdeck_id, streamdeck)
  File "/home/username/.local/lib/python3.11/site-packages/streamdeck_ui/api.py", line 188, in attached
    self.update_streamdeck_filters(serial_number)
  File "/home/username/.local/lib/python3.11/site-packages/streamdeck_ui/api.py", line 479, in update_streamdeck_filters
    self.update_button_filters(serial_number, page, button)
  File "/home/username/.local/lib/python3.11/site-packages/streamdeck_ui/api.py", line 514, in update_button_filters
    display_handler.replace(page, button, filters)
  File "/home/username/.local/lib/python3.11/site-packages/streamdeck_ui/display/display_grid.py", line 79, in replace
    filter.initialize(self.size)
  File "/home/username/.local/lib/python3.11/site-packages/streamdeck_ui/display/text_filter.py", line 43, in initialize
    label_w, _ = backdrop_draw.textsize(self.text, font=self.true_font)
                 ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ImageDraw' object has no attribute 'textsize'
python: os/threads_posix.h:46: usbi_mutex_lock: Assertion `pthread_mutex_lock(mutex) == 0' failed.
python: os/threads_posix.h:58: usbi_mutex_destroy: Assertion `pthread_mutex_destroy(mutex) == 0' failed.
Aborted (core dumped)

After one or two attempts to start it, I put it aside for a few hours, then tried again just now.
But now, I was getting the same error message as you until I reconnected the deck.

Might be that a thread get's stuck because of the UI error and clogs up the device access in some way ?

Archlinux on kernel 6.4.1-arch2-1 usinging original streamdeck is exhibiting exact same symptoms, including that statcktrace panmarco posted when run from terminal

Downgrading python-pillow should fix this (it did for me on Arch). Back to v9, i.e. sudo pacman -U https://archive.archlinux.org/packages/p/python-pillow/python-pillow-9.5.0-2-x86_64.pkg.tar.zst

Downgrading python-pillow should fix this (it did for me on Arch). Back to v9, i.e. sudo pacman -U https://archive.archlinux.org/packages/p/python-pillow/python-pillow-9.5.0-2-x86_64.pkg.tar.zst

This downgrading is working for me fine. Thanks for this information.

Confirmed. downgrading pillow does restore functioning. looks like the major version upgrade from 9.5 to 10.0 broke some functionality in this project

hi, this project seems to be stale and a new fork as been made with the intention of replacing this one at: https://github.com/streamdeck-linux-gui/streamdeck-linux-gui

fixing this issue with python pillow is a priority, and just waiting for this pr #354 to be moved there

I have the same issue. Has this problem been resolved? Even downgrading doesn't solve the problem