Using with howdy: sometimes fails with exit code 1
Documentation
- [x] I read carefully the documentation.
Output of linux-enable-ir-emitter --config
# /home/[ME]/.config/linux-enable-ir-emitter.toml
[["/dev/video2".savelist]]
unit = 14
selector = 6
control = [1, 3, 2, 0, 0, 0, 0, 0, 0]
Output of linux-enable-ir-emitter --log
[...]
12:44:54 [DEBUG] (15) linux_enable_ir_emitter::video::ir::enabler: IR enabler waiting for response...
12:44:54 [INFO] Applying control: unit=14 selector=3 cur=[16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0] max=[16, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0] min=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] res=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] def=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] writable=true.
12:44:54 [DEBUG] (15) linux_enable_ir_emitter::video::ir::enabler: IR enabler waiting for response...
12:44:54 [INFO] Applying control: unit=14 selector=3 cur=[16, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0] max=[16, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0] min=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] res=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] def=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] writable=true.
12:44:54 [DEBUG] (15) linux_enable_ir_emitter::video::ir::enabler: IR enabler waiting for response...
12:44:54 [INFO] Applying control: unit=14 selector=3 cur=[16, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0] max=[16, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0] min=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] res=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] def=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] writable=true.
12:44:54 [DEBUG] (15) linux_enable_ir_emitter::video::ir::enabler: IR enabler waiting for response...
12:44:55 [INFO] Resetting control to initial value.
12:44:55 [INFO] Applying control: unit=14 selector=3 cur=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] max=[16, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0] min=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] res=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] def=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] writable=true.
12:44:55 [INFO] Applying control: unit=14 selector=6 cur=[1, 3, 2, 0, 0, 0, 0, 0, 0] max=[1, 3, 3, 0, 0, 0, 0, 0, 0] min=[0, 0, 0, 0, 0, 0, 0, 0, 0] res=[0, 0, 0, 0, 0, 0, 0, 0, 0] def=[1, 3, 1, 0, 0, 0, 0, 0, 0] writable=true.
12:44:55 [DEBUG] (15) linux_enable_ir_emitter::video::ir::enabler: IR enabler waiting for response...
12:44:58 [INFO] The control enables the IR emitter.
12:44:58 [DEBUG] (15) linux_enable_ir_emitter::configure::app::ir_enabler: Exiting configurator task exited.
12:44:58 [INFO] Loading configuration from /home/[ME]/.config/linux-enable-ir-emitter.toml.
12:44:58 [DEBUG] (15) linux_enable_ir_emitter::configuration: Configuration located at: /home/[ME]/.config/linux-enable-ir-emitter.toml
12:44:58 [DEBUG] (15) linux_enable_ir_emitter::configuration: Saving configuration at /home/[ME]/.config/linux-enable-ir-emitter.toml:
[["/dev/video2".savelist]]
unit = 14
selector = 6
control = [1, 3, 2, 0, 0, 0, 0, 0, 0]
12:44:58 [DEBUG] (19) linux_enable_ir_emitter::configure::app::ir_enabler: Exiting video stream task.
Output of linux-enable-ir-emitter --grey-devices
/dev/video2
unit=10 selector=10 cur=[0, 8, 0, 187, 187, 187, 187, 187] max=[255, 255, 255, 255, 255, 255, 255, 255] min=[0, 0, 0, 0, 0, 0, 0, 0] res=[1, 0, 0, 0, 0, 0, 0, 0] def=[0, 0, 0, 0, 0, 0, 0, 0] writable=false
unit=13 selector=14 cur=[0, 0] max=[2, 100] min=[0, 0] res=[1, 10] def=[0, 0] writable=true
unit=13 selector=15 cur=[0] max=[1] min=[0] res=[1] def=[0] writable=false
unit=13 selector=16 cur=[0] max=[1] min=[0] res=[1] def=[0] writable=true
unit=14 selector=2 cur=[1, 0, 0, 0, 0, 0, 0, 16, 39, 0, 0, 0, 0, 0, 0] max=[7, 0, 0, 0, 0, 0, 0, 200, 20, 5, 0, 0, 0, 0, 0] min=[0, 0, 0, 0, 0, 0, 0, 16, 39, 0, 0, 0, 0, 0, 0] res=[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0] def=[1, 0, 0, 0, 0, 0, 0, 16, 39, 0, 0, 0, 0, 0, 0] writable=true
unit=14 selector=3 cur=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] max=[16, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0] min=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] res=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] def=[16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] writable=true
unit=14 selector=6 cur=[1, 3, 1, 0, 0, 0, 0, 0, 0] max=[1, 3, 3, 0, 0, 0, 0, 0, 0] min=[0, 0, 0, 0, 0, 0, 0, 0, 0] res=[0, 0, 0, 0, 0, 0, 0, 0, 0] def=[1, 3, 1, 0, 0, 0, 0, 0, 0] writable=true
unit=14 selector=9 cur=[1, 0, 0, 0] max=[1, 0, 0, 0] min=[0, 0, 0, 0] res=[1, 0, 0, 0] def=[0, 0, 0, 0] writable=true
Computer (or camera) model
Lenovo IdeaPad 5 Pro 16ARH7
Linux distribution
Arch Linux + Plasma 6.6
Installation method
Distro package
Additional information
I use howdy with linux-enable-ir-emitter, and following the Readme (I'm using the 7.0.0 beta) I set the correct line in /etc/pam.d/system-auth before the one with howdy. This works fine for plasma-login-manager and when authenticating in a terminal (eg. with sudo). However, there is an error every time there is a GUI password prompt, for example when running run0 (sorry for the French text in the screenshot, the main errors are in English).
Also, and this is probably unrelated to this issue, I wonder why /usr/bin/linux-enable-ir-emitter run needs to be executed each time there is an authentification with howdy. In versions 6.x, this ran once using a systemd service (at boot, after resume, etc.) and it still works fine for the rest of the session. Is there a reason to not do that for 7.x beta? This would fix this issue at least for my usage.
Hey, I think I probably found the reason for this. It is due to some extra configuration in linux-enable-ir-emitter.toml, which is probably being ran and caused Errno 2 when opening the video devices and thus exit with code 1.
You can try to cp ~/.config/linux-enable-ir-emitter.toml ~/.config/linux-enable-ir-emitter.toml.bak and edit the toml so that it looks like
this
or this
As for the 7.x beta, afaik it helps some stubborn IR emitters that has to be enabled just before use and is probably not required. It is there to make sure linux-enable-ir-emitter runs at least once before howdy uses it.(Usually lenovo laptops only need to do this once every boot, so it is probably ok to keep using the systemd service, though ymmv)
~~P.S. I don't think run0 uses pam in a way that can use howdy. It would just exit silently if it wasn't for the error code 1 mentioned about~~
P.P.S. nvm, polkit does work with howdy, you just need to add auth sufficient pam_howdy.so at the appropriate place in /etc/pam.d/polkit-1. For your reference mine looks like this:
~~P.P.P.S. You actually want the config toml file to use the
/dev/v4l/by-id/usb-SunplusIT....... rather than /dev/video3 as the order of /dev/video* may change after each boot up and that would also mean the IR emitter is not being enabled properly.~~
P.P.P.P.S. actually it seems that the by-id path also sometimes triggers exit with code 1? not sure what happens here then. I guess try changing it to /dev/video*/ first and see if it comes up.
same issue here on ubuntu 25. I edited the config file as you instructed (also had extra stuff at the top)
Thanks a ton @MK73DS !
This was the extra stuff on top of my toml that i needed to get rid of:
[["/dev/v4l/by-id/usb-Chicony_Electronics_Co._Ltd._Integrated_Camera_0001-video-index0".savelist]]
unit = 14
selector = 6
control = [1, 3, 2, 0, 0, 0, 0, 0, 0]
that is the right camera but my howdy is set to /dev/video2 and not v4l, so I only left this entry:
[["/dev/video2".savelist]]
unit = 14
selector = 6
control = [1, 3, 2, 0, 0, 0, 0, 0, 0]
and it does seem it solved the issue of Exit code 1.
Before removing th v4l device section I tried running /usr/local/bin/linux-enable-ir-emitter manually to see the output and got:
$ /usr/local/bin/linux-enable-ir-emitter: /usr/local/bin/linux-enable-ir-emitter: cannot execute binary file
even though it's
$ file /usr/local/bin/linux-enable-ir-emitter /usr/local/bin/linux-enable-ir-emitter: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=da10de4d9ff401d29770abf8aad54a6bbb457aa2, not stripped
$ uname -m x86_64
I did (re)run linux-enable-ir-emitter configure a bunch of times, and it would always work again after I do that, until a reboot or two would bring me back to exit code 1 and causing the IR not to work.
Maybe this helps someone, I might have fixed it (for myself, no guarantees);
After an x amount of different headaches and going through this thread and testing /dev/video2 as path had crappy results, I decided to just leave the original which was generated by the IR enabled software, and also copied this path to Howdy's config:
[["/dev/v4l/by-id/usb-8SSC21M05461V1SR4950H7G_Integrated_RGB_Camera_01.00.00-video-index0".savelist]]
unit = 7
selector = 6
control = [1, 3, 2, 0, 0, 0, 0, 0, 0]
That being said, I did at least once run linux-enable-ir-emitter configure and linux-enable-ir-emitter run as root, so a
copy of the linux-enable-ir-emitter.toml is also saved in /root/.config/ , although it's inconclusive if that helped. I also had the same first experience as @arnelap after a reboot, with the ELF not being possible to execute, absolutely the same error.
One thing which I did differently was sudo cp /home/$USER/.config/linux-enable-ir-emitter.toml /etc/linux-enable-ir-emitter.toml before even trying to run Howdy for the first time. My reasoning was that since PAM executes as root anyway, best to put it in an easily accessible location, and the file being owned by root.
Fast forward to right after first reboot - both the Howdy config and the .toml had this as path for video device;
[["/dev/v4l/by-id/usb-8SSC21M05461V1SR4950H7G_Integrated_RGB_Camera_01.00.00-video-index0".savelist]]
inside the linux-enable.ir-emitter.toml, and
/dev/v4l/by-id/usb-8SSC21M05461V1SR4950H7G_Integrated_RGB_Camera_01.00.00-video-index0
inside Howdy's config
set as path (since it should function better than /dev/video2 due to the UVC Extension Unit being tied to the first logical interface, but take that statement with an elephant sized grain of salt).
The one file which still had /dev/video2 was the .toml copy in /etc. After changing it to the same I had in Howdy and the one in homedir, I rebooted, and upon login was greeted by a red, menacing flashing light. Another reboot and nothing breaks anymore.
I did not touch, move, copy or alter in any way the /usr/local/bin/linux-enable-ir-emitter. If /dev/video2 worked fine for you, probably don't bother switching at first, but do create a root owned copy in /etc, and if the error is still present, go to /etc/pam.d/common-auth and replace /home/$USER/.config/linux-enable-ir-emitter.toml with /etc/linux-enable-ir-emitter.toml, that is what's currently working for me.
Edit: user version for linux-enable-ir-emitter is 7.0.0-beta2, Ubuntu 24.04.4 LTS Server (yes, seriously :D)
I got the same problem. After configuring successfully using linux-enable-ir-emitter configure, I ran linux-enable-ir-emitter run and it worked too. However, after several reboots, when I run linux-enable-ir-emitter run again, it fails. Here is the log:
╭─npvinh@thinkpad-p1-gen-6 ~
╰─➤ ir-emitter run --config /etc/ir-emitter.toml
03:04:52 [INFO] Loading configuration from /etc/ir-emitter.toml.
03:04:52 [INFO] Applying control: unit=14 selector=6 cur=[1, 3, 2, 0, 0, 0, 0, 0, 0] writable=true.
Error: No such file or directory (os error 2)
╭─npvinh@thinkpad-p1-gen-6 ~
╰─➤ cat /etc/ir-emitter.toml 1 ↵
[["/dev/v4l/by-id/usb-Generic_Integrated_Camera_200901010001-video-index0".savelist]]
unit = 14
selector = 6
control = [1, 3, 2, 0, 0, 0, 0, 0, 0]
[["/dev/video2".savelist]]
unit = 14
selector = 6
control = [1, 3, 2, 0, 0, 0, 0, 0, 0]
@phucvinh57
[["/dev/v4l/by-id/usb-Generic_Integrated_Camera_200901010001-video-index0".savelist]] unit = 14 selector = 6 control = [1, 3, 2, 0, 0, 0, 0, 0, 0]
Does removing these lines from the /etc/ir-emitter.toml solve the issue?
@arnelap Not yet, I have tried to remove all configurations then reinstall, but the problem has not been solved. Finally, I decided to use the C++ version.
By the way, I greatly appreciate your work. I use linux-enable-ir-emitter in my own project and it works like a charm!
The problem I encountered seems to be the same When on the login interface or using sudo in terminal, the infrared camera can work normally and pass authentication. However, when installing an application on the App Store or using snap (not running with sudo) on the terminal, the authentication window that pops up prompts'/usr/local/bin/linux-enable ir emitter failed: exit code 1 '`
Ubuntu 26.04(24.04 doesn't have this problem) linux-enable-ir is 7.0.0 beta
[["/dev/video2".savelist]]
unit = 14
selector = 6
control = [1, 3, 2, 0, 0, 0, 0, 0, 0]
The log file only shows the configuration process. There's no output during runtime.
Hello same issue here: configuring the camera works as intended, then after a couple of reboots the IR camera is not triggered anymore. first time i run configure it set the first device, after it wasn't working anymore, running configure added the second device. doesn't matter if I keep either one or both, after a few reboots the IR camera is not coming up.
[["/dev/v4l/by-id/usb-Chicony_Electronics_Co._Ltd._Integrated_Camera_0001-video-index0".savelist]] unit = 14 selector = 6 control = [1, 3, 2, 0, 0, 0, 0, 0, 0]
[["/dev/video2".savelist]] unit = 14 selector = 6 control = [1, 3, 2, 0, 0, 0, 0, 0, 0]