timothycrosley / streamdeck-ui

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

Error during attach: Could not open HID device. #291

Closed daniel-mezo closed 1 year ago

daniel-mezo commented 1 year ago

Describe the bug I am unable to get this program working on my laptop that runs Ubuntu, I get this message spammed on the console: Error during attach: Could not open HID device.

I have disabled Wayland, and followed the tutorial to the letter (probs executed it about 4 times so far). I also tried all 3 built in USB ports of my laptop, as well as plugging the deck into my monitor.

To Reproduce Steps to reproduce the behavior:

  1. Install software following instructions in the README.md
  2. When I execute the command streamdeck the app opens up, but is not responsive and blank
  3. I get the message Error during attach: Could not open HID device. spammed in the console.

Expected behavior The program finds the plugged in Streamdeck.

Screenshots image

Operating system (please complete the following information)

Stream Deck Version Standard MK.2

~$ lsusb | grep Deck
Bus 001 Device 013: ID 0fd9:0080 Elgato Systems GmbH Stream Deck MK.2
daniel-mezo commented 1 year ago

Scratch that, a good old fashioned reboot solved this, not sure why I didn't try that.

sbesh91 commented 1 year ago

I did a reboot just now and am experiencing this issue. Did you do anything beyond a reboot?

daniel-mezo commented 1 year ago

@sbesh91 plugging out and in the device helps for me, while the app is running - I still get this HID error every once in a while, this solves it.

sbesh91 commented 1 year ago

Thanks man, that's what ended up doing the trick for me here too.

zbeeble49 commented 1 year ago

same issue on Pop!_OS 22.04 trying to use Stream Deck 15 Buttons. Have rebooted, unplugged and tried different USB ports, but still get message "Error during attach: Could not open HID device."

zbeeble49 commented 1 year ago

'lsusb' tells me that Steam Deck is: "Bus 003 Device 013: ID 0fd9:0080 Elgato Systems GmbH Stream Deck MK.2"

So I have added "SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0080", TAG+="uaccess" to '/etc/udev/rules.d/70-streamdeck.rules'

Then reloaded with 'sudo udevadm control --reload-rules' and 'steamdeck &' did show the Stream Deck.

Just documenting this here in case somebody else is having this issue.

carpii commented 1 year ago

You can also see this error if you have an instance already running (in systray or whatever), and you try to launch a 2nd instance

KvaGram commented 1 year ago

I also got this issue. Trying to get a stream deck mini to function. I have tried everything I could find. Yes, including a reboot.

KvaGram commented 1 year ago

Never mind for my part. I ran lsusb | grep Deck I got Bus 001 Device 014: ID 0fd9:0090 Elgato Systems GmbH Stream Deck Mini So I added more lines to the rules file with id 90.

Currently looks like this, an I dare not cull any lines now that it is finally working.

SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", TAG+="uaccess", GROUP="users"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0063", TAG+="uaccess", GROUP="users"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006c", TAG+="uaccess", GROUP="users"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006d", TAG+="uaccess", GROUP="users"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0090", TAG+="uaccess", GROUP="users"

KERNEL=="hidraw*", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0080", MODE="0666", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"
KERNEL=="hidraw*", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0090", MODE="0666", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0080", TAG+="uaccess"
dodgyrabbit commented 1 year ago

Note that instead of listing each of the product IDs (different devices), you can instead allow Elgato USB device to be accessible.

sudo nano /etc/udev/rules.d/70-streamdeck.rules

Paste the following (one) line and write the file:

SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", TAG+="uaccess"

Make the new rule take effect:

sudo udevadm trigger

In some cases, people have reported that they needed to create a higher priority file, such as 99-streamdeck.rules but I have never been able to reproduce a problem using the default.

Closing this case as there are no additional steps to take here.