Closed camillebernier closed 4 years ago
I've managed to solve my problem. There was a problem with permissions :
$ ll /dev/hidraw4
crw------- 1 root root 242, 4 avril 22 14:53 /dev/hidraw4
So, when I launched my Ledger app as a simple user I didn't have enought rights to open and manage this device.
I tried to launch Ledger Live app with sudo/root but there is a security protection :
$ sudo ./ledger-live-desktop-2.2.4-linux-x86_64.AppImage
[29334:0422/144804.342370:FATAL:electron_main_delegate.cc(211)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
$ sudo chmod 666 /dev/hidraw4
And this "workaround" solves my problem. I don't know where this problem come from Ubuntu, Hidraw, or Ledger Live App...?
Solution above didn't work for me. But this support site from Ledger offers a fix: https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues
$ wget -q -O - https://raw.githubusercontent.com/LedgerHQ/udev-rules/master/add_udev_rules.sh | sudo bash
Keep in mind if you fix the ledger issue by changing the permissions on /dev/hidraw and you try to update the firmware, the update will not work until you give permissions to the new hidraw device, otherwise the update will be stuck on the "updating" screen.
Solution above didn't work for me. But this support site from Ledger offers a fix: https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues
$ wget -q -O - https://raw.githubusercontent.com/LedgerHQ/udev-rules/master/add_udev_rules.sh | sudo bash
This worked for me with Ubuntu 20.04
Thank you @Camiyo for pointing to the HID device permissions.
Whilst your solution is on the right track and certainly is helpful, I recommend against granting global read access, especially if using a shared computer.
Instead of granting global read access, I suggest using chown
to grant read access to your personal user instead. This however only works temporarily - especially since the Ledger device frequently reconnects when switching between Leder applications.
To have the system grant device read permissions to my user automatically every time my Ledger devices connect, I added an OWNER
option to the udev rules:
# Nano S
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001|1000|1001|1002|1003|1004|1005|1006|1007|1008|1009|100a|100b|100c|100d|100e|100f|1010|1011|1012|1013|1014|1015|1016|1017|1018|1019|101a|101b|101c|101d|101e|101f", TAG+="uaccess", TAG+="udev-acl", OWNER="georg"
# Nano X
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0004|4000|4001|4002|4003|4004|4005|4006|4007|4008|4009|400a|400b|400c|400d|400e|400f|4010|4011|4012|4013|4014|4015|4016|4017|4018|4019|401a|401b|401c|401d|401e|401f", TAG+="uaccess", TAG+="udev-acl", OWNER="georg"
This results in:
$ dmesg |grep hidraw
...
[818405.886172] hid-generic 0003:2C97:0004.0008: hiddev97,hidraw1: USB HID v1.11 Device [Ledger Nano X] on usb-0000:00:14.0-1/input0
...
$ ls -l /dev/hidraw*
...
crw------- 1 georg root 245, 1 Feb 5 17:21 /dev/hidraw1
...
Thanks @piby180 and @tacerus ! And to build on top of everybody, this is the scripted version, passing the current username ($USER) to the updated bash script:
$ wget -q -O - https://raw.githubusercontent.com/Karocyt/udev-rules/Karocyt-patch-1/add_udev_rules_with_user.sh | sudo bash -s $USER
For Ledger Nano S Plus i added me as OWNER
to
# Ledger Test, Nano S Plus (idProduct=5011)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0005|5000|5001|5002|5003|5004|5005|5006|5007|5008|5009|500a|500b|500c|500d|500e|500f|5010|5011|5012|5013|5014|5015|5016|5017|5018|5019|501a|501b|501c|501d|501e|501f", TAG+="uaccess", TAG+="udev-acl", OWNER="thall"
Ledger Live Version and Operating System
Expected behavior
Synchronizing Ledger Live with my Ledger Nano S.
Actual behavior
Device detected but connection failed. Please try again or contact us if the problem persists.
==> I think it's a bug because I can synchronize my Ledger with Windows 10 without any problem <==
Steps to reproduce the behavior
I launch Ledger live (the .appImage), I connect my ledger nano s, I enter the pin, then I have the error "Device detected but connection failed. Please try again or contact us if the problem persists."
I tried to clic "Repair" and I tried to remove my personnal config in ~/.config/Ledger\ Live but I'm still unable to synchronize..
I will let the full log below, there is a message : "cannot open device with path /dev/hidraw4" (sometime it's on /dev/hidraw6) so I assume this is a usb problem with Ubuntu, If you guys got an Idea about my problem ?
Here is the complete log I got :