-
Notifications
You must be signed in to change notification settings - Fork 1
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
Black screen with gstreamer as Qt Media backend (Recent KDE Neon update) #8
Comments
According to a search in Ubuntu's package files database the package that provides libgstvideoconvertscale.so is If you do but still isn't working please send the output of According to that database, versions of ubuntu older than lunar (23.04) don't include that library and you may be in one of those versions or maybe the library moved to another package, to check if your package provides the library run |
According to
Guess I am shit out of luck given that KDE Neon is still using 22.04 as the Ubuntu base. Unless you have an older version I could use until the 24.04 upgrade is available? |
Hmm I don't think using an older package is a good idea. You would need to downgrade Maybe you can open an issue in KDE's bug tracker requesting an updated package as it is breaking qt-multimedia functionality. |
What happens if you run the test.qml as per instructions here? |
No. I am talking about you having an older version of your plugin. Because that worked. Before I updated my system today. Anyway, I ran this: Changed the This is what I got:
|
Unfortunately I am not sure its possible to get around that error aside from trying to switch back to ffmeg to see if the situation has improved with it. |
The test.qml shows a black video too right? I am going to make the bug report if that's true. |
Yeah. No video. |
I tried ffmpeg. Still a crashing. And it was just working with gstreamer fine before I updated KDE Neon. Pain in the ass. |
Yeah, searching for package related errors there are many examples of this kind of problem where a dependency is not up-to date which I think is unfortunate and I'd rather would have preferred KDE people recommended Fedora instead of what seems to be a KDE demo distro mostly intended for developers? |
Meanwhile, I have been using this 'demo distro' for about 8 years as my daily driver for myself and the entire household now. Like, there is a user edition of KDE Neon. But with how crap Ubuntu has become due to Canonical, I may consider the Fedora KDE spin at some point. lol Anyway, if there was no more issue with ffmpeg as the backend that made plasmashell crash, then I wouldn't need gstreamer. |
I really need to get my hands on a AMD system to investigate these ffmpeg crashes, I am not even sure if that has been reported yet. For the packaging problem maybe this but for gstreamer1.0-plugins-base could work? |
Nah. I think I am done for tonight. Can live without it for now. Besides, I don't feel like screwing with my system. It's stable, and that's what's important right now. Since Plasma 6 came out, I had a few dependency issues. Much rather not mess with something that works; especially late in the evening. And yeah, please get an AMD system. A lot of people who want better GPU drivers turn to AMD because of the better out of box experience that it is on Linux. Compared to Nvidia's nonsense (where they give the second class provider treatment to Linux users). It's precisely why I no longer use anything Nvidia. All I have left is an old 750 Ti that I use for GPU pass through for a Spydows virtual machine that I keep completely offline and isolated like the malware that it is (which I don't even use anymore; it's just there). |
Good call, I wouldn't mess with it either. I do for Arch but only because here is pretty easier for me to undo everything.
You just described how I have my GTX 1650 (laptop) lol. I still use it for windows sometimes and for testing things on other distributions but normally is just disabled like it doesn't exist. |
I thought about Arch based systems. But I don't think I'd want something that temperamental as a daily driver. I don't need bleeding edge either. Just need something that works. BTW, the more people stop using the Windows and switch to Linux, the better it will be. I think Valve is helping much with that one. Not to mention MS's hostility which is making more people not want to use their platform anymore. |
Hi again. I found the Qt issue for broken gstreamer video playback https://bugreports.qt.io/browse/QTBUG-123312 the solution is to wait for an update of either gstreamer or qt-multimedia to land in Neon |
Yup. Okay. Just try getting an AMD system so that you can test the plugin on that. Because I'm sure many other AMD users would just prefer to go with the default backend; which is ffmpeg. |
Can you please switch back to ffmpeg and run the test.qml file again? If that one crashes I can skip KDE and report this problem to Qt/AMD |
Yeah. I switched to ffmpeg last night to see if the plugin would work. Anyway, I tried the test file. This is what I got after running it. It just played one of the videos before crashing.
|
Can you please try to get a backtrace? https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports $ gdb qml6
Reading symbols from qml6...
Enable debuginfod for this session? (y or [n]) y
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
(gdb) run /home/luis/projects/plasma-smart-video-wallpaper/playground/000videoTest.qml Wait for debug symbols to finish downloading if needed. Wait for the video window to show. This process may take a while. When the crash occurs you'll see something like this: Thread 1 "qml6" received signal SIGSEGV, Segmentation fault.
0x00007ffff6b54b0a in QRhi::makeThreadLocalNativeContextCurrent (this=<optimized out>)
at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.3/src/gui/rhi/qrhi.cpp:9624
9624 return d->makeThreadLocalNativeContextCurrent();
(gdb) set logging file ~/backtrace.txt
(gdb) set logging enabled on
Copying output to /home/luis/backtrace.txt.
Copying debug output to /home/luis/backtrace.txt.
(gdb) thread apply all bt full
...
--Type <RET> for more, q to quit, c to continue without paging--
c
set logging enabled off
Done logging to /home/luis/backtrace.txt.
(gdb) quit Finally share the contents of backtrace.txt |
Well, here is the backtrace. Keep in mind that if I attempt to run So, I had to run this Backtrace attached: |
Thank you. Can you also send the updated Edit: Here is the bug report where I found that env var https://bugreports.qt.io/browse/QTBUG-113832?jql=text%20~%20%22ffmpeg%20amd%22 |
Here is the result of
But... that's for Windows? How does this relate? |
It was added to windows but is also in ffmpeg if I understood correctly |
Where would I add that environment variable? |
In the same file where the qt media back end one ~/.config/plasma-workspace/env/qt-media-backend.sh is okay |
So, just |
Yeah |
Just verify it shows up in echo $QT_DISABLE_HW_TEXTURES_CONVERSION=1 |
Well, when I paste this in the terminal
|
@linlinxza I'm sorry to hear. If you have time, you could try these steps that I mentioned:
|
My FFmpeg version is: 4.4.2-0ubuntu0.22.04.1 Anyway, I'll try the other stuff tomorrow. It's like 5 AM where I am. lol I just came on here to comment because the rest of the Internet is largely useless (namely with social media); much of which I blocked via my PiHole and used filters on Ublock (that I personally devised) to remove any and all references to social media domains in the search engine and also share buttons. Feels like early 2000's Internet before social media took off with a lot less crap. :) |
UPDATE: You are my hero! I think this is working. I have been able to have the video background that is a minute long loop for about 10 minutes now without a single crash with plasmashell! I created the file
And lo and behold, it frigging works! I think this will have to be the only solution for people with AMD cards who are using distros with older packaging! EDIT: But this does pose a performance issue now. Because it's relying on the CPU more and not the GPU. So, AMD users who need to use this method are leaving performance on the table. I have to re-encode the video clips from 1080p to 720p so that it isn't so taxing on the CPU. Is there another driver name I could specify? |
I appreciate your appreciation! Yea this workaround just prevents FFmpeg from using hardware acceleration through VA-API (libva), so the CPU has to do more work. Based on your logs FFmpeg seemed to be using the correct driver before, so (installing) and specifying another driver shouldn't help. However, I got a new idea. Can you test if these three slightly edited qml test apps also crash? Don't use LIBVA_DRIVER_NAME=nothing for these tests. |
@luisbocanegra I wanted to include a test version without "loops: MediaPlayer.Infinite" as well, but that unfortunately leads to a crash because of another bug. Will fix that one asap. However the call to stop() before playNext() should have the same effect. This could prevent the sketchy behaviour I described earlier, where FFmpeg seems to start playing the next video on a new thread using VAAPI hardware texture surfaces that are still in use by the old video thread. |
@linlinxza Test this file first of all. @luisbocanegra it uses the QML Types MediaPlayer and VideoOutput instead of just Video. This makes it possible to listen for onMediaStatusChanged instead of onPositionChanged. EndOfMedia status is emitted later than positionChanged, and that could prevent this whole VAAPI issue if we are lucky. |
@linlinxza Thank you for your patience helping us troubleshoot this issue, it is really appreciated.
@larsut Thank you for continuing investigating this issue, hopefully that prevents the problem.
Is this bug something that could be platform specific or is also related to AMD? I have tried removing it from the Video type in |
You are welcome, luisboanegra. Here's what I have for logs (did these on mom's AMD laptop): with-delay-log (qml debug enabled).txt Interestingly enough, the test files would go through all the videos if I don't have qml debugging enabled if I run it like this:
Instead of like this this:
Despite getting this issue after each clip:
The next clip will play. It won't crash. |
Please try the mediaplayer one #8 (comment) |
Switched the wallpaper from Video to Mediaplayer 793ecab in https://github.com/luisbocanegra/plasma-smart-video-wallpaper-reborn/tree/switch-to-mediaplayer branch. Things to note:
So I changed loops to be infinite when there's only one video and 1 otherwise @linlinxza please download the file below and run |
I think you are getting somewhere. If I add just one video, plasmashell will crash. But if I add two video clips, they will keep rotating without crashing plasmashell. I tried this on my mom's laptop which doesn't have the config file PS; I didn't have to reboot, or log off and log back in again. I just changed the wallpaper plugin to "Image" and then changed it back to your plugin after upgrading it. I then tried this on my PC and I removed that |
Interesting... Try the following version |
Note This version will show the background color (black by default) for a split of a second when there is only one video because it isn't looping |
It does the same thing already with the previous revision; as in a black background color with what I have now (by using two of the same clips). EDIT: Anyway, I tried the 0.2.1-loops1 version. This works without having to add the copy of the same clip. Now, if it could be smoothed out so it doesn't show any black background, then this would be great. |
Nice, it means @larsut is right and the problem is on the ffmpeg loop implementation. Out of curiosity can you try this one. It's basically what we started with but with MediaPlayer instead of Video type. I expect it to also crash but doesn't hurt trying plasma-smart-video-wallpaper-reborn-v0.2.1-loopsInfiniteOnPosition.zip |
Well, just tried it. So far, it hasn't crashed plasmashell yet. It just does the same thing as the last one; which is a black background for split second before playing the clip again. |
For a single video? For me the black background only shows for multiple videos with that one |
Well, I could try it on another machine with AMD graphics. But, I am sure the result will be the same. Speaking of, got a machine with AMD graphics on it yet? |
Nope |
Even a cheap old machine with AMD graphics would do it. You need to have access to the that kind of hardware so that you could better troubleshoot. Because I can only do so much (given my lack of comprehending how to read and write code; and not knowing how it works). Best I can do is simple 'if' and 'while' statements. |
Well, it was great while it lasted. But after rebooting and then updating, plasmashell crashes again with it. And now the background goes green instead of black again... And if I try putting EDIT: This is so damn weird... it works again. I tried setting I am totally lost on why this thing works and then doesn't. Well, guess I'll enjoy it while I have it. |
I don't know what happened, but the plugin seems to be working now. I tried it on both computers that use AMD graphics. It works. The video has looped every time so far without crashing plasmashell from what I noticed. The screen goes black for a split second, but still keeps on successfully keeps looping the same video file. |
Nice! You can check the packages that have been updated recently either qt (specially qt-multimedia), ffmpeg, plasma, gpu drivers...
Does the crossfade option work? |
Fade doesn't work. Also, I don't know how to check anything. All I do is just keep my system updated regularly. |
This is what I get according to journalctl -f:
Failed to initialize QMediaPlayer "Could not find the videoconvertscale GStreamer element"
Yes, I have gstreamer1.0-libav installed.
The text was updated successfully, but these errors were encountered: