timothycrosley / streamdeck-ui

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

Can't get streamdeck working fedora 36 #255

Closed patrickhgh closed 1 year ago

patrickhgh commented 2 years ago

$ sudo dnf install python3-pip python3-devel hidapi Dependencies resolved.

Package Arch Version Repository Size

Installing: hidapi x86_64 0.12.0-1.fc36 updates 46 k python3-devel x86_64 3.10.6-1.fc36 updates 208 k python3-pip noarch 21.3.1-2.fc36 fedora 1.8 M Installing dependencies: pyproject-rpm-macros noarch 1.3.3-1.fc36 updates 40 k python-rpm-macros noarch 3.10-17.fc36 fedora 18 k python3-rpm-generators noarch 12-15.fc36 updates 31 k python3-rpm-macros noarch 3.10-17.fc36 fedora 15 k

Transaction Summary

Install 7 Packages

Total download size: 2.2 M Installed size: 10 M Is this ok [y/N]: y Downloading Packages: (1/7): python3-rpm-macros-3.10-17.fc36.noarch.r 31 kB/s | 15 kB 00:00
(2/7): python-rpm-macros-3.10-17.fc36.noarch.rp 37 kB/s | 18 kB 00:00
(3/7): pyproject-rpm-macros-1.3.3-1.fc36.noarch 119 kB/s | 40 kB 00:00
(4/7): hidapi-0.12.0-1.fc36.x86_64.rpm 118 kB/s | 46 kB 00:00
(5/7): python3-rpm-generators-12-15.fc36.noarch 250 kB/s | 31 kB 00:00
(6/7): python3-pip-21.3.1-2.fc36.noarch.rpm 1.7 MB/s | 1.8 MB 00:01
(7/7): python3-devel-3.10.6-1.fc36.x86_64.rpm 769 kB/s | 208 kB 00:00

Total 1.0 MB/s | 2.2 MB 00:02
Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : python-rpm-macros-3.10-17.fc36.noarch 1/7 Installing : python3-rpm-macros-3.10-17.fc36.noarch 2/7 Installing : pyproject-rpm-macros-1.3.3-1.fc36.noarch 3/7 Installing : python3-rpm-generators-12-15.fc36.noarch 4/7 Installing : python3-pip-21.3.1-2.fc36.noarch 5/7 Installing : python3-devel-3.10.6-1.fc36.x86_64 6/7 Installing : hidapi-0.12.0-1.fc36.x86_64 7/7 Running scriptlet: hidapi-0.12.0-1.fc36.x86_64 7/7 Verifying : python-rpm-macros-3.10-17.fc36.noarch 1/7 Verifying : python3-pip-21.3.1-2.fc36.noarch 2/7 Verifying : python3-rpm-macros-3.10-17.fc36.noarch 3/7 Verifying : hidapi-0.12.0-1.fc36.x86_64 4/7 Verifying : pyproject-rpm-macros-1.3.3-1.fc36.noarch 5/7 Verifying : python3-devel-3.10.6-1.fc36.x86_64 6/7 Verifying : python3-rpm-generators-12-15.fc36.noarch 7/7

Installed: hidapi-0.12.0-1.fc36.x86_64
pyproject-rpm-macros-1.3.3-1.fc36.noarch
python-rpm-macros-3.10-17.fc36.noarch
python3-devel-3.10.6-1.fc36.x86_64
python3-pip-21.3.1-2.fc36.noarch
python3-rpm-generators-12-15.fc36.noarch
python3-rpm-macros-3.10-17.fc36.noarch

Complete! $ sudoedit /etc/udev/rules.d/70-streamdeck.rules $ sudo udevadm control --reload-rules $ PATH=$PATH:$HOME/.local/bin $ streamdeck bash: streamdeck: command not found... $ sudoedit /etc/udev/rules.d/99-streamdeck.rules $ sudo udevadm control --reload-rules $ pip3 install --user streamdeck_ui Collecting streamdeck_ui Downloading streamdeck_ui-2.0.4-py3-none-any.whl (1.2 MB) |████████████████████████████████| 1.2 MB 3.0 MB/s
Collecting CairoSVG<3.0.0,>=2.5.2 Downloading CairoSVG-2.5.2-py3-none-any.whl (45 kB) |████████████████████████████████| 45 kB 5.5 MB/s
Collecting pynput<2.0,>=1.7 Downloading pynput-1.7.6-py2.py3-none-any.whl (89 kB) |████████████████████████████████| 89 kB 9.5 MB/s
Collecting python-xlib<0.32,>=0.31 Downloading python_xlib-0.31-py2.py3-none-any.whl (179 kB) |████████████████████████████████| 179 kB 19.8 MB/s
Collecting streamdeck<0.10.0,>=0.9.1 Downloading streamdeck-0.9.1-py3-none-any.whl (26 kB) Collecting pyside2<6.0,>=5.15 Downloading PySide2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-abi3-manylinux1_x86_64.whl (164.3 MB) |████████████████████████████████| 164.3 MB 83 kB/s
Requirement already satisfied: pillow<10.0.0,>=9.0.0 in /usr/lib64/python3.10/site-packages (from streamdeck_ui) (9.1.0) Collecting filetype<2.0.0,>=1.0.10 Downloading filetype-1.1.0-py2.py3-none-any.whl (17 kB) Collecting cssselect2 Downloading cssselect2-0.6.0-py3-none-any.whl (15 kB) Collecting tinycss2 Downloading tinycss2-1.1.1-py3-none-any.whl (21 kB) Collecting cairocffi Downloading cairocffi-1.3.0.tar.gz (88 kB) |████████████████████████████████| 88 kB 10.0 MB/s
Preparing metadata (setup.py) ... done Collecting defusedxml Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB) Requirement already satisfied: six in /usr/lib/python3.10/site-packages (from pynput<2.0,>=1.7->streamdeck_ui) (1.16.0) Collecting evdev>=1.3 Downloading evdev-1.6.0.tar.gz (26 kB) Preparing metadata (setup.py) ... done Collecting shiboken2==5.15.2.1 Downloading shiboken2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-abi3-manylinux1_x86_64.whl (975 kB) |████████████████████████████████| 975 kB 26.4 MB/s
Requirement already satisfied: cffi>=1.1.0 in /usr/lib64/python3.10/site-packages (from cairocffi->CairoSVG<3.0.0,>=2.5.2->streamdeck_ui) (1.15.0) Collecting webencodings Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB) Requirement already satisfied: pycparser in /usr/lib/python3.10/site-packages (from cffi>=1.1.0->cairocffi->CairoSVG<3.0.0,>=2.5.2->streamdeck_ui) (2.20) Requirement already satisfied: ply==3.11 in /usr/lib/python3.10/site-packages (from pycparser->cffi>=1.1.0->cairocffi->CairoSVG<3.0.0,>=2.5.2->streamdeck_ui) (3.11) Using legacy 'setup.py install' for evdev, since package 'wheel' is not installed. Using legacy 'setup.py install' for cairocffi, since package 'wheel' is not installed. Installing collected packages: webencodings, tinycss2, shiboken2, python-xlib, evdev, defusedxml, cssselect2, cairocffi, streamdeck, pyside2, pynput, filetype, CairoSVG, streamdeck-ui Running setup.py install for evdev ... done Running setup.py install for cairocffi ... done Successfully installed CairoSVG-2.5.2 cairocffi-1.3.0 cssselect2-0.6.0 defusedxml-0.7.1 evdev-1.6.0 filetype-1.1.0 pynput-1.7.6 pyside2-5.15.2.1 python-xlib-0.31 shiboken2-5.15.2.1 streamdeck-0.9.1 streamdeck-ui-2.0.4 tinycss2-1.1.1 webencodings-0.5.1 $ PATH=$PATH:$HOME/.local/bin $ $ streamdeck Traceback (most recent call last): File "/home/user/.local/bin/streamdeck", line 5, in from streamdeck_ui.gui import start File "/home/user/.local/lib/python3.10/site-packages/streamdeck_ui/gui.py", line 18, in from streamdeck_ui.api import StreamDeckServer File "/home/user/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 142, in _import return original_import(name, *args, *kwargs) File "/home/user/.local/lib/python3.10/site-packages/streamdeck_ui/api.py", line 8, in from PIL.ImageQt import ImageQt File "/home/user/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 142, in _import return original_import(name, args, **kwargs) ModuleNotFoundError: No module named 'PIL.ImageQt' ~]$

JeffreyPYL commented 2 years ago

I have the same issue. Upon inspection, upgrading Pillow to the latest version will resolve the issue. (v9.2.0)

patrickhgh commented 2 years ago

I upgraded pillow and that seem to work however I get this now. ~]$ streamdeck Error during attach: Could not open HID device. Error during attach: Could not open HID device. Error during attach: Could not open HID device. Error during attach: Could not open HID device.

dodgyrabbit commented 2 years ago

Most likely if you're getting Could not open HID device it means that your udev file is missing your device or the udev rule is there but not working properly.

Instructions: https://github.com/timothycrosley/streamdeck-ui#manual-installation

Also see issue #226

dodgyrabbit commented 2 years ago

I can confirm that using a clean Fedora 46 install, pillow needs to be upgraded. This can be done as follows:

pip install pillow --upgrade

To avoid this in future, I'll publish a new release that bumps the pillow version dependency, which should make the installation more straightforward.

The issue @patrickhgh mentioned is unrelated to this.

dodgyrabbit commented 1 year ago

Version 2.0.5 has been released, which resolve the problem on Fedora 36.

As a side note, Fedora does not support AppIndicator (tray icon) by default. This means, if you close the streamdeck configuration window, it is actually still running and there's no ways to get it back.

You'll have to find the process and kill it, otherwise you will get the message Error during attach: Could not open HID device.

For now, I recommend just leaving the configuration window open and moving it to a separate workspace. This seems to be the GNOME way. I believe this is creating a reasonable amount of confusion and pain for users of Fedora or any distribution that does not support AppIndicator.