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

RPI4 + VLC: does not react to user input at full screen mode #71

Open
beta-tester opened this issue Aug 4, 2022 · 14 comments
Open

RPI4 + VLC: does not react to user input at full screen mode #71

beta-tester opened this issue Aug 4, 2022 · 14 comments

Comments

@beta-tester
Copy link

hi,
from time to time i have the VLC issue, that in full screen mode i can not return to normal windowed mode. no double click nor ESC nor other keyboard shortcuts are working anymore.
even the GPIO - Shutdown button isn't working properly.

first i thought it is fixed with VLC update 3.0.17.4-0+deb11u1+rpi1+rpt2, but it isn't.

i started vlc from the command line vlc -vvv &> vlc.txt and opened a mp4 file.
after a long while VLC wasn't reacting to any user input.
even worse, the picture freezed but the autio was playing normal.
normally when vlc isn't reacting anymore to user input, i get back control as soon the video reached its end, but i gave up, because the length of that video i tried is about 8 hours.

here the -vvv output:
vlc.xz.gz

at line 515595 it starts to see drm_vout generic debug: drmu_env_polltask_cb: Timeout in the output.
maybe this is the cause of the issue,

...
[h264_v4l2m2m @ 0x7914da90] capture: Buffer requeue
[h264_v4l2m2m @ 0x7914da90] --- capture VIDIOC_QBUF: index 16, ts=0.110342 count=1
[h264_v4l2m2m @ 0x7914da90] --- output pre VIDIOC_QBUF: index 0, ts=0.110363 count=0
[h264_v4l2m2m @ 0x7914da90] --- output VIDIOC_QBUF: index 0, ts=0.110363 count=1
[786381d8] drm_vout generic debug: drmu_env_polltask_cb: Timeout
[h264_v4l2m2m @ 0x7914da90] capture: Buffer requeue
[h264_v4l2m2m @ 0x7914da90] --- capture VIDIOC_QBUF: index 18, ts=0.110343 count=1
[h264_v4l2m2m @ 0x7914da90] pts_stats_add: decoder: New interval: 16667->16666/1=16666
[h264_v4l2m2m @ 0x7914da90] --- output pre VIDIOC_QBUF: index 0, ts=0.110364 count=0
[h264_v4l2m2m @ 0x7914da90] --- output VIDIOC_QBUF: index 0, ts=0.110364 count=1
...

when i pressed the GPIO-shutdown button as last chance i tried, the audio stopped and it looks like parts of the VLC application ends. but the RPi4 did not shut down visually. i still could see the freezed picture of the video. fortunately it looks like the VLC.txt file isn't gone lost.

@beta-tester
Copy link
Author

beta-tester commented Aug 4, 2022

here my config file:
config.xz.gz

and my monitors file:
monitors.xz.gz

@jc-kynesim
Copy link

There's a new VLC coming soon that fixes (at least some) fullscreen switch bugs. Thanks for the report.

@jc-kynesim
Copy link

The polltask timeout isn't the cause of the issue - all it means is that the display hasn't had any pictures recently.

@beta-tester
Copy link
Author

thank you for the info.
so i have to change the headline of my issue report when the timeout is not the cause.

@beta-tester beta-tester changed the title RPI4 + VLC: drm_vout generic debug: drmu_env_polltask_cb: Timeout RPI4 + VLC: does not react to user input at full screen mode Aug 4, 2022
@KoxSosen
Copy link

KoxSosen commented Aug 6, 2022

Hello there!

I`m experiencing the same exact issue.

If you need help with anything in terms of testing/providing debug information, please let me know.

@beta-tester
Copy link
Author

beta-tester commented Aug 9, 2022

i figured out a very reproducable case, where i loose control over VLC in fullscreen mode.

(in case it is a case that is not known yet)

  1. open VLC in windowed mode
  2. open a video file (best, use a short video to get control back after it ends, and be sure not to enable any kind of autorepead in VLC)
  3. start the video (still in windowed mode)
  4. move the VLC window to the center of the screen (make sure there is a big gap between VLC window and the left top of the desktop screen)
  5. move the mouse cursor to the center of the VLC window
  6. make a double click in the center of the VLC window to switch to fullscreen mode, but do not move the mouse cursor
  7. make a right click (in non-fullscreen mode the context menu would appear but it is invisible in fullscreen mode)
  8. move the invisible mouse cursor a little bit to the left top (in non-fullscreen mode you would leave the context menu area, but not the vlc window, in fullscreen mode you do not see this)
  9. make a left click (in non-fullscreen mode the context menu would disapper)
  10. move the invisible mouse cursor further to the left top (to leave the invisible/overlayed vlc window area fully)
  11. make a left click
  12. now i have no control over VLC anymore.
    • no ESC, no double click, no keyboard shortcut are working anymore
    • GPIO-shutdown push-button is working (previous i mention that is isn't, but at my last tests it was working always)

i don't know if all steps are required or if you would get back control if you find the vlc window area with the invisible mouse cursor.

looks to me, that part of the issue is related where the mouse cursor "sits" in fullscreen mode "relative" to the non-fullscreen position to the VLC window position.

i am using a keyboard touch pad combo (logitech K400+) and i guess that i make sometimes a right click by accident while vlc is in fullscreen mode.

@beta-tester
Copy link
Author

beta-tester commented Aug 9, 2022

for the last tested case, here a log file of vlc -vv &> >(tee vlc.txt):
vlc.gz

PS.: it was hard to find the command line window blindly to type in the commands in gdb to continue VLC at the end of the video

gdb --args vlc -vv &> >(tee vlc-gdb.txt):
vlc-gdb.gz

so it seems you could get back control over VLC if you could match the position of the invisible mouse cursor with the position of the invisible vlc window blindly in fullscreen mode.

@beta-tester
Copy link
Author

beta-tester commented Aug 9, 2022

@jc-kynesim ,
i just received and installed the announced vlc update 3.0.17.4-0+deb11u1+rpi1+rpt3. i rebooted my RPi4,
but i can still reproduce the issue to 100% in the same way as described before with the new updated vlc version.

@jc-kynesim
Copy link

Yup - not surprised I'm afraid. Fullscreen is a bit of a kludge in order gain performance. It simply grabs the screen away from X in order to use DRM directly - the underlying X windows are still there and keyboard control etc if still handled by X, so if you use the mouse on the invisible X desktop it still does stuff. There isn't an easy fix - I wish there was.

@beta-tester
Copy link
Author

beta-tester commented Aug 17, 2022

It simply grabs the screen away from X in order to use DRM directly - the underlying X windows are still there and keyboard control etc if still handled by X, so if you use the mouse on the invisible X desktop it still does stuff. There isn't an easy fix - I wish there was.

for fullscreen mode, wouldn't it be possible to maximize the vlc 'X' window and make it without "decorations" (frame/bordertitle/menu-area) and make it topmost so the vlc 'X' window takes over the full X screen area of the desctop, so the mouse isn't able to leave the vlc 'X' window area anymore - in hope i does not lose the mouse and keyboard control...
and then put the VLC/DRM overlay on top ot that?

...this is an ugly hack, but the issue is (kind of) solved.

when leaving fullscreen mode, then restore the original vlc 'X' window decoration and size and its previous topmost state.

EDIT: maybe disable right click contect menu in fullscreen mode as well

@hrbekma
Copy link

hrbekma commented Sep 23, 2022

i have the same prob too + green belt at bottom. Still waiting for fix comming with update

@atimmernans
Copy link

I have that same issue since I updated VLC to 3.0.17.4-0+deb11u1+rpi1+rpt2.
It is a problem which I had not before the update (VLC 3.0.16-1+rpi1+rpt2).

@atimmernans
Copy link

for fullscreen mode, wouldn't it be possible to maximize the vlc 'X' window and make it without "decorations" (frame/bordertitle/menu-area) and make it topmost so the vlc 'X' window takes over the full X screen area of the desctop, so the mouse isn't able to leave the vlc 'X' window area anymore - in hope i does not lose the mouse and keyboard control... and then put the VLC/DRM overlay on top ot that?

...this is an ugly hack, but the issue is (kind of) solved.

If you can put such an X window covering the whole screen, no need to hack anything, just use vlc in that window normally. This will avoid all the other side effects that the current full screen mode seems to suffer from.

@atimmernans
Copy link

Note that on mi PI4, MMAL or DRM output suffer from this problem but OpenGL and OpenGL2 works fine (if you disregard tearing issues).

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

5 participants