Volumio USB Reset Plugin Submission #363
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, sorry to disturb you, I think I have created a useful plugin, and I have done testing and seems to work well. It has a single button in its settings that triggers the following shell script:
for i in /sys/bus/pci/drivers/[uoex]hci_hcd/:; do
[ -e "$i" ] || continue
echo "${i##/}" > "${i%/}/unbind"
echo "${i##/}" > "${i%/}/bind"
done
The author of the script gave the following clarifications:
Notes: [1]: the *hci_hcd kernel drivers typically control the USB ports. ohci_hcd and uhci_hcd are for USB1.1 ports, ehci_hcd is for USB2 ports and xhci_hcd is for USB3 ports. (see
https://en.wikipedia.org/wiki/Host_controller_interface_(USB,_Firewire))
The reason of the need of this script was caused by the fact that some time Volumio started to become unresponsive and unusable, even booting from a fresh installation. Many times in those cases I could solve the issue disconnecting the USB DAC (I have a SMSL SU-8) and the USB3.0 powered hub with a USB3.0 Hard Drive with all the music attached. With only a USB-key with a few songs, Volumio used to start to behave normally again. This script gives an easy way to obtain the same result via software, and from my testing it is a valuable tool. It presents a modal dialog after 10 seconds after the execution of the script, telling the user that a restart is suggested. Volumio then starts to scan the music folders again automatically, but only comes back to normal after a restart and a complete database update. I have also noticed that restarting samba and other network services helps to return to normal behaviour more quickly, if the current version goes well I could add the ability to restart samba with the press of a button, eventually changing the name of the plugin to something like "Volumio Hardware Ports Reset". Thanks a lot for your attention, I hope I will receive good news from you and it will be published. Goodbye for now.