DeskPi-Team / deskpi

DeskPi Pro is the Ultimate Case Kit for Raspberry Pi 4 with Full Size HDMI/2.5 Hard Disk Support and Safe Power Button, It has QC 3.0 Power Supply inside and New ICE Tower Cooler inside.
GNU General Public License v3.0
143 stars 46 forks source link

Cannot use deskpi-config in Manjaro 64 bit #84

Closed johntdavis84 closed 3 months ago

johntdavis84 commented 2 years ago

I didn't see this problem the last time I set up the DeskPi under Manjaro, but I just had to reinstall everything.

I get this whenever I try to adjust the fan settings via the script: sh: line 1: /dev/ttyUSB0: Device or resource busy

Here's the typical sequence:

./deskpi-config Welcome to Use DeskPi-Team's Product Please select speed level that you want: It will always run at the speed level that you choosed.

1 - set fan speed level to 25% 2 - set fan speed level to 50% 3 - set fan speed level to 75% 4 - set fan speed level to 100% 5 - Turn off Fan 6 - Adjust the start speed level according to the temperature 7 - Cancel manual control and enable automatical fan control

Just input the number and press enter. Your choice:2 You've select 50% speed level sh: line 1: /dev/ttyUSB0: Device or resource busy Fan speed level has been change to 50%

I'm not sure what to do to troubleshoot this. I've tested the front USB 2.0 ports with a USB 2.0 flash drive. It works fine.

lsof isn't showing anything using the ttyUSB0 interface.

I'm using Sway under Wayland.

I'm stumped. Any ideas?

yoyojacky commented 3 months ago

hi @johntdavis84 Because serial port devices cannot be called by two applications at the same time, if one application is using it, you will see a "device busy" message if you try to operate it again.

Unless you stop one of the applications that are using it, currently when executing deskpi-config, if the background is already occupied by deskpi.service, the foreground cannot execute.

On the official Raspberry Pi system, if you execute the command deskpi-config, the deskpi.service in the background will stop, and you need to manually execute:

sudo systemctl restart deskpi.service

to restart the service.