-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Accelerated video on rotated screen using cvlc on Buster #3095
Comments
Video rotation issue is a vlc issue, not kernel. I don't think console (i.e. boot logs) rotation is something supported in the linux/xrandr world, so I don't think that will be fixed. If you don't need 3d support, then you can disable vc4-fkms-v3d and return to using display_rotate=1, but that wouldn't be recommended as development will primarily focus on the fkms world. |
Thank you for flagging the issue forward. I have no need for 3d support right now. But I need accelerated browser rendering. So I would like to stay with vc4. Especially if it is the recommended driver. As a command line tool, cvlc can live outside of x11/gui context. I assume they will need to implement some "smart" solution for screen-rotation detection, depending on whether x11 is running or not. Hopefully that won't take too long. Without vc4 losing screen-rotation support, both issues would not exist. Is there any chance the decision to drop screen-rotation from vc4 could be reversed? Some folks might want to run a portrait-mode screen in console mode, without any x11. |
It's not an issue of dropping support, but that we are switching between two alternate graphics stacks - the legacy framebuffer API to the current mainline DRM/KMS API. They have slightly different feature sets and functionality. Transpose using the Pi SoC has to be done as a two pass operation - compose the scene to memory with transpose, then display the transposed buffer. Realtime rotation as part of composition is something that very few graphics cards support (some Intel cards may), so I suspect your use case of a rotated console fails on most Linux systems using DRM/KMS. If we can find a way to do it, then we will try. Can you also confirm you are using vc4-kms-v3d, not vc4-fkms-v3d? Whilst they both expose the 3D side in the same way, they differ in the way they drive the composition hardware (fkms still uses the firmware, whilst kms takes full control from Linux). |
Does Edit: looks like that requires CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y Edit 2: Just tried a kernel with the above option enabled, and it works up until X starts. Then I just get a black screen. |
After playing around with it a bit more, it's not X. Just having |
I'm a couple of patches above rpi-4.19.y as I'm backporting overscan support from 5.1. Those changes also pick up being able to set DRM/KMS rotate from the kernel command line (cmdline.txt, not bash shell). So I think I need to backtrack and say there is a way to rotate the console, but you may need to wait a few days for changes to propagate through into rpi-update images. |
I tried vc4-kms-v3d, but couldn't get the 90 degree rotation working (with xrandr). This is why I am using vc4-fkms-v3d at this moment.
excellent, excellent - also thanks to XECDesign Does anybody know a command line tool that can do hw-accelerated fullscreen video playback on a rotated screen right now? If cvlc would respect the rotated screen config, this is what I would be using: "cvlc -f --no-osd --play-and-exit file.mp4". Otherwise I will just wait for the cvlc patch. |
|
I tried omxplayer before. I always (with or without --orientation 90) get this:
Many people have posted this issue. I cannot find a single solution, other than "Disable the GL driver": https://www.raspberrypi.org/forums/viewtopic.php?t=204794 I can run cvlc right after omxplayer has failed and it works with full acceleration and even though the screen has blanked for everything x11. (Doing that via ssh.) The only issue with cvlc is that it ignores the screen rotation set by xrandr. |
OMG!! omxplayer does work with --no-osd. And with --orientation 90 it's just beautiful. |
See popcornmix/omxplayer#720 for the omxplayer not automagically setting --no-osd |
Oh, and subtitles will have the same issue of trying to render via the OpenVG service that doesn't exist. |
I tried the rotation thing again. This time using kernel "4.19.66-v7+ #1253 SMP Thu Aug 15". |
After upgrading to Buster, screen rotation (90 degree) didn't work on my Pi. I found this:
So in my /boot/config.txt I removed "display_rotate=1" and enabled vc4-kms-v3d. Then I added "@xrandr -o right" to my /etc/xdg/lxsession/LXDE-pi/autostart. This works well.
However, I use cvlc for accelerated fullscreen video playback. Unfortunately, cvlc completely ignores the screen rotation set by xrandr. A tall video is now rendered sideways on the 90 degree rotated screen. What should be on top, is on the left. What should be the bottom, is on the right.
What is the expected solution to this? Do you expect cvlc to come with a fix to this issue, which is caused by the change in the kernel driver? Are there other any options? How can accelerated fullscreen video playback be achieved right now on a rotated screen on Buster?
Another (minor but nagging) issue is that the kernel boot logs are displayed sideways on a rotated screen currently, before xrandr makes things right. Any ideas about that?
The text was updated successfully, but these errors were encountered: