Closed mxmvncnt closed 10 months ago
Please first:
Then, can you provide the outputs of v4l2-ctl -d /dev/video2 --list-formats-ext
.
As well as the outputs of linux-enable-ir-emitter -v configure
. The -v
option is very important in order to debug the problem.
Hello,
Here is the output of all 4 video devices:
And here is the output of sudo linux-enable-ir-emitter -v configure
Ok I see. The problem is that at the moment linux-enable-ir-emitter has no "memory" to ignore the problematic instructions that disabled (or crashed) the camera.
I will think about implementing this feature. This is the first time I've seen this case.
Unfortunately, I am going to be very busy until February.
Hi I also have this laptop, and have the same issue ;) Can I help implementing this feature ? What kind of "memory" should be implemented ?
You can test it on the dev branch, you have to install the OpenCV C++ libraries (opencv-devel
package on Fedora distro based) in order to be able to build the software:
git clone https://github.com/EmixamPP/linux-enable-ir-emitter.git
cd linux-enable-ir-emitter
git checkout dev
sudo bash installer.sh install
sudo linux-enable-ir-emitter -v configure
The software will ask you to shut down and boot and retry at some point
I could not test as I cannot reproduce this problem; send me the outputs in case of issue
Don't hesitate to ask me any question if you need help
Thanks!
Here is the output for the initial run in the dev branch:
INFO: Warning to do not kill the process !
Is the ir emitter flashing (not just turn on) ? Yes/No ? n
DEBUG: current: 0 32
DEBUG: maximum: 255 255
DEBUG: resolution: 1 0
DEBUG: new current: 1 32
DEBUG: unit: 4 selector: 2
Is the ir emitter flashing (not just turn on) ? Yes/No ? n
DEBUG: new current: 2 32
Is the ir emitter flashing (not just turn on) ? Yes/No ? n
DEBUG: new current: 3 32
Is the ir emitter flashing (not just turn on) ? Yes/No ? n
DEBUG: new current: 4 32
Is the ir emitter flashing (not just turn on) ? Yes/No ? n
DEBUG: new current: 5 32
Is the ir emitter flashing (not just turn on) ? Yes/No ? n
DEBUG: Negative answer limit exceeded, skipping the pattern.
DEBUG: current: 0
DEBUG: maximum: 255
DEBUG: resolution: 1
DEBUG: new current: 1
DEBUG: unit: 4 selector: 3
ERROR: Impossible to reset the camera.
INFO: Please shutdown your computer, boot and retry.
CRITICAL: Cannot access to /dev/v4l/by-path/pci-0000:05:00.0-usb-0:1:1.2-video-index0
ERROR: The configuration has failed.
INFO: Do not hesitate to visit the GitHub ! https://github.com/EmixamPP/linux-enable-ir-emitter/wiki
After rebooting, it asks me infinitely, and none of them work. Here is the output of where I am at. I did not close it yet, so if I should continue to do the answers, tell me.
OK! So little update 2 minutes after, I was very near the end of the script and it ended by itself, so here is the full output after the reboot, you can discard the one from before.
After rebooting, it asks me infinitely
There is always an ending, since it have to explore all the possibilities, and your camera has a lot.
I've made a modification, could you please retry :
git fetch && git pull
sudo linux-enable-ir-emitter -v configure -l 1
I've added the parameter -l 1
which will skip the pattern if you answered no one time, by default this is 4, and so the exploration will be faster. But maybe the solution could be missed, with 4 also by the way, only using 256 can ensure to miss nothing. However, from my experience, explore everything is useless. The v5 I'm working on will do a 100% automatic search, and so allow exploring everything.
Although, your camera may require a more complex configuration, such as a combination of several instructions. This kind of case could also be done using a 100% automatic technique.
That new version also did not work. BTW Did you see my second reply where I say I was able to go through all the possibilities one by one? I got the same result but it might be more precise than the new one.
Anyways, here is the new output
With the current version I can't do anything more for your problem. But I keep your issue in a corner of my head. When v5 will be ready, I hope it will be able to activate your camera
Hey, I'm coming back to you with a new version that might be able to configure your camera.
The installation method has changed, I no longer maintain the Fedora COPR, but a unique tarball. There is a comment from a bot in pull request https://github.com/EmixamPP/linux-enable-ir-emitter/pull/121, the installation instructions for this pre-version are specified in it.
To configure your camera, run the command sudo linux-enable-ir-emitter -v configure -l -1
, and past the output here.
This runs a fully exhaustive automatic configuration. If the tool thinks it has detected that the transmitter is blinking, it will ask you to confirm.
This can be a long process, but, since all you have to do is confirm whether it works, you don't have to be in the terminal all the time. You can let it search on the side, and cross your fingers, because this time (unless there's a bug in this pre-version) the tool will try everything it can try. And as a result, I don't think I'll be able to make a future version that will activate your emitter.
If the transmitter is flashing and the terminal hasn't asked for confirmation, you'll have to switch to manual mode with -m
.
If you no longer wish to configure your infrared camera, no problem, please just close the issue.
Hey, thanks for replying with this, I am currently trying this, it seems it will take a very long time, doing 0-256 256 (I assume it is 256) times. Do you have a Matrix channel (or other ways of contact)? For now I am at the 200 2 attempt, still nothing but I guess there is hope!
Yes indeed, it captures one second of video every time it tries something. So if there are a lot of possibilities, as in your case, it can take a long time. But normally, you don't have to do anything?
No, I don't have a Matrix channel, but if you need, I can find out how it works. Or you can email me (the address is on my GitHub profile) and I'll send you my discord profile.
Hey, please try the v6 https://github.com/EmixamPP/linux-enable-ir-emitter/pull/154. There is a bot comment with a link to the tarball. Please uninstall any existing version first:
sudo rm -rf /usr/lib64/linux-enable-ir-emitter \
/usr/bin/linux-enable-ir-emitter \
/usr/lib/systemd/system/linux-enable-ir-emitter.service \
/etc/udev/rules.d/99-linux-enable-ir-emitter.rules \
/usr/share/bash-completition/completitions/linux-enable-ir-emitter \
/etc/linux-enable-ir-emitter
Execute sudo linux-enable-ir-emitter -v configure
And paste here the content of the file which is inside /etc/linux-enable-ir-emitter
, from this point I can explain you how to manually tweak any instructions of your camera.
Hello! I have just ran the software again, and at the step before the last one, I saw flashing! This is certainly a good sign. I have pasted below both the output of the software and the file in /etc/
I am pretty sure the unit: 7, selector: 6, control: 1 3 3 0 0 0 0 0 0
instruction is what made the IR light blink, but it could also be the one before.
Also, do you have any idea if the drivers generated from your project could in any way be upstreamed if they are confirmed to work and have been tested? This could allow to unlock many laptops for many installs if only one person uses this program
I am pretty sure the unit: 7, selector: 6, control: 1 3 3 0 0 0 0 0 0 instruction is what made the IR light blink, but it could also be the one before.
Oh nice!
Please first update the tool again (I made a fix commit this morning).
Execute sudo linux-enable-ir-emitter tweak
, you will see a line x) unit: 7, selector: 6, control: 1 3 1 0 0 0 0 0 0
.
Input the corresponding number, then type 1 3 3 3 0 0 0 0 0 0
and press enter. Then you should see the ir emitter flashing.
(Please also paste the outputs here)
Also, do you have any idea if the drivers generated from your project could in any way be upstreamed if they are confirmed to work and have been tested? This could allow to unlock many laptops for many installs if only one person uses this program
This will work for a few people with exactly the same computer; so maybe another Lenovo (Yoga) Slim 7 Pro X 14ARH7 will not work using your configuration file, often the unit and selector are not the same.
At first, since the configuration was done by sniffing a Windows VM, I asked people to bring up their configuration, but because of the problem I mentioned, I created this tool which normally enables any emitter with a single command.
Thanks for the help! It turns out, the right instruction was 1 3 2 0 0 0 0 0 0
. However, it seems like the driver does not persist after a few minutes. I was able to setup Howdy, but after a few minutes or after a reboot, the camera stops flashing which is a little bit weird. The configuration stays at 1 3 1 0 0 0 0 0 0
when it should be 1 3 2 0 0 0 0 0 0
.
After some more testing, I noticed that even if the configuration stays with the 2
it still does not flash. But when running the tweak command and re-inputting exactly the current config it works again.
Execute sudo linux-enable-ir-emitter boot enable
Thanks! This seems to have worked to make the config persistent. Since this works, I think I will close the issue. Thanks a lot for your help and happy new year!
Nice to hear! Happy new year!
If you had 'ERROR: Impossible to reset the control' message, give the DEBUG info displayed
Ouput of
linux-enable-ir-emitter configure
(used the default without the -d parameter. After the first fail I it does not ask me if I see the flashing, it just waits and gives the same error message)configure command output
``` [maxime@laptop-mxm ~]$ sudo linux-enable-ir-emitter configure [sudo] Mot de passe de maxime : INFO: Ensure to not use the camera during the execution. INFO: Warning to do not kill the process ! Is the ir emitter flashing (not just turn on) ? Yes/No ? no Is the ir emitter flashing (not just turn on) ? Yes/No ? no Is the ir emitter flashing (not just turn on) ? Yes/No ? no Is the ir emitter flashing (not just turn on) ? Yes/No ? no Is the ir emitter flashing (not just turn on) ? Yes/No ? no Is the ir emitter flashing (not just turn on) ? Yes/No ? no CRITICAL: Cannot access to /dev/video2 ERROR: Impossible to reset the control. INFO: Please keep this debug in case of issue : DEBUG: unit: 4, selector: 3, control: 0 ERROR: The configuration has failed. INFO: Do not hesitate to visit the GitHub ! https://github.com/EmixamPP/linux-enable-ir-emitter/wiki ```Output of
v4l2-ctl --list-devices
Ouput of
v4l2-ctl -d /dev/videoX --list-formats-ext
v4l2 device output
``` [maxime@laptop-mxm ~]$ v4l2-ctl --list-devices Integrated RGB Camera: Integrat (usb-0000:05:00.0-1): /dev/video0 /dev/video1 /dev/video2 /dev/video3 /dev/media0 ```Additional info
Bus 005 Device 002: ID 30c9:0057 Luxvisions Innotech Limited Integrated RGB Camera