Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Code: -1, errno: 9, error: Bad file descriptor #8

Open
ccwky11 opened this issue Jun 24, 2020 · 1 comment
Open

Error Code: -1, errno: 9, error: Bad file descriptor #8

ccwky11 opened this issue Jun 24, 2020 · 1 comment

Comments

@ccwky11
Copy link

ccwky11 commented Jun 24, 2020

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

@mtpham99
Copy link

mtpham99 commented Jun 22, 2021

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`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants