Error Code: -1, errno: 9, error: Bad file descriptor
No Matter how I attempt to schedule this app, I continually run into the following error, any help would be greatly appreciated (I can run the app no problem manually, the only issue I face is with automating the task.
Error: chicony.service - My script Loaded: loaded (/etc/systemd/system/chicony.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Tue 2020-06-23 21:22:48 CDT; 29s ago Process: 545 ExecStart=/home/ccwky12/.gnome/startscript.sh (code=exited, status=255/EXCEPTION) Main PID: 545 (code=exited, status=255/EXCEPTION)
Jun 23 21:22:48 Manjaro-L13 startscript.sh[550]: Error code: -1, errno: 9, error: Bad file descriptor Jun 23 21:22:48 Manjaro-L13 systemd[1]: Starting My script... Jun 23 21:22:48 Manjaro-L13 systemd[1]: chicony.service: Main process exited, code=exited, status=255/EXCEPTION Jun 23 21:22:48 Manjaro-L13 systemd[1]: chicony.service: Failed with result 'exit-code'. Jun 23 21:22:48 Manjaro-L13 systemd[1]: Failed to start My script.
As a note, the script toggles the chicony-ir-toggle from here: https://github.com/hillyu/chicony-ir-toggle
Thank you for your assistance
I was having a similar issue on Manjaro. I believe it was due to the fact that my ".service" file which started chicony on startup was being run before my device actually enabled/loaded the cameras into "/dev", which caused the "file not found/bad file descriptor". I was able to solve it by adding the lines containg "Requires=" and "After=" to me ".service" file.
`[Unit] Description=chicony service Requires=systemd-udev-settle.service After=systemd-udev-settle.service
[Service] ExecStart=PATH_TO_CHICONY-IR-TOGGLE -d /dev/video2 on
[Install] WantedBy=multi-user.target`