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
keyboard input no longer working after system update #649
Comments
Have a look at this omxplayer and keybindings. If I understood it correctly, the solution was to change
to
|
That causes control codes to be displayed in the terminal, but the problem still persists. |
Ah! I spent my day re-installing my rpi3 to see what was wrong. Reproducible on fresh install: https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3 |
OK...so a misunderstanding. I installed the ArchLinuxARM-rpi-2-latest.tar.gz on my RPI 3B. I found termios VMIN VTIME and blocking/non-blocking read operations, especially
So I patched
and got OMXPlayer back responding on the keys :-) Tried the code also on Stretch and Jessie. Seems to do no harm. @jazztickets : Please ask on the Arch Linux ARM forum where you posted this issue why this is necessary after the certain update. Hopefully someone can give more background info. Hope the patch will work for you guys too. |
Awesome, that worked. Thank you! |
I had the same problem after upgrading from Debian Stretch to Debian testing (close to freeze to become Buster) with the Raspbian version of omxplayer and tested the patch posted two comments above and it solved the problem, so thanks a lot @jehutting! As this might suggest that more recent distributions seem to be affected by this problem and Raspbian probably is affected, too, after they synchronize to the new Debian release, it probably makes sense to generally apply this patch to the repository. For people who also want to build the Raspbian package on Debian Buster: The package dependencies are too strict for e.g. libboost*-dev and libssh*-dev. Just install the more recent versions of the dependencies and build the package with e.g. "debuild --no-sign --build=binary -d" to avoid checking the dependencies (after the usual apt source and apt build-dep). |
So this patch has two additional effects:
So this patch should not be applied until further investigation and fixing. |
|
Neither did I detected an increase of CPU usage that high :-) Nevertheless it would be great to know the change in Debian causing the need of this patch (or for its validation). @MagicMuscleMan Have a look at # 637. Seems to me thats your real problem. |
@jehutting Thanks a lot for pointing to #637. The patch from you indeed fixes both(!?) problems. To be honest, I am not sure if the high CPU load was due to the insertion of my debugging messages, after observing the non-quitting behavior for the MKV test files, which I added when quickly hacking a very similar patch as you did (although I missed the new return value and the check for EOF, so it did not work). I guess I could test it, but it's probably pointless, as it now seems obvious that it makes sense to apply both patches. However, I have not yet understood why I reliably have a freezing omxplayer at the end of file with patch in #649 applied (without #637) but not without either patch, but I guess this does neither matter. |
As to the root cause: As I observed it after a distribution upgrade, a lot of package upgrades could cause the need for the patch. As @jazztickets assumes, a glibc update might be the reason. If that's the case the last known good would be Debian package version 2.24-11+deb9u3 and first known bad would be 2.28-2. I checked the dependencies and omxplayer (recursively) depends on 126 packages in Debian (with the Raspbian package). If it's really the libc upgrade I might be able to pin it down to the following packages: |
@MagicMuscleMan Thanks for looking for the root cause. I gave up after an comparison between the glibc-2.24 (as for the Raspbian version) and glibc-2.28, as for the ArchLinux version. Simply couldn't find -yeah but hey what should I look for :-)- something what makes sense to me! Perhaps a change in the kernel/firmware, I simply don't know. It would help me just to have a better understanding of the root cause. But as you already said, that takes quite a lot of work. And as Raspbian probably will go to glibc-2.28 sometime and also probably will run into this, hopefully someone from the RPF kernel/firmware/packages group will have an answer. Go ahead if you want to look further but don't do it especially for me. Issues 649 and 637 are for me two separate, independent issues. This issue is related to glibc (?) while 637 is more FFmpeg version related. In 637 the ffmpeg code gets stuck into an endless loop due to omxplayer wrapper not returning AVERROR_EOF upon EOF. AVERROR_EOF is a condition to leave the loop, the faulty 0 (zero) not. As it is a real loop with no end or sleep or whatever, the CPU loops at full speed, so causing a 100% usage. |
@jehutting could you PR your patch that hopefully resolves this issue? |
Okay, so it was less work than I feared: I can confirm that the problem definitely is related to the libc upgrade:
Upgraded and downgraded Debian packages while bi-secting: The glibc changelog to release 2.28 contains an item which sounds like it could be describing exactly the issue at hand:
|
I'm using omxplayer in Arch Linux ARM and keyboard input no longer works after a certain update. I've tested it with both RPi2 and 3.
List of packages here:
update.txt
Basically, getchar() always returns -1
omxplayer/Keyboard.cpp
Line 95 in 9680057
getchar() seems to work if you don't call tcsetattr, but keyboard input still doesn't work in that case.
omxplayer/Keyboard.cpp
Line 28 in 9680057
I believe the update to glibc is causing this. I tried reverting a handful packages like the kernel to no avail. I didn't try reverting glibc because it's a pain (multiple package dependencies).
Any insight as to why this is happening?
Forum post: https://archlinuxarm.org/forum/viewtopic.php?f=57&t=13005#p59159
The text was updated successfully, but these errors were encountered: