Open cr1ogen opened 1 week ago
@CalfMoon would you take a look at this? I'm not very familiar with mpvpaper, but it definitely shouldn't keep running previous wallpapers.
In my computer ramusage never exceeded 400mb. which is also high but it might be because mpvpaper runs mpv in the background. Maybe 700mb is a resolution thing? how big is your monitor?
And multiple process only seemed to form when the pictures are clicked multiple times rapidly which i think is because the previous process don't get enough time to get killed. The problem seemed to slightly decrease when the value of time.sleep()
was increased. Maybe that is the problem.
And I don't really know what ffmpeg is doing there.
Im not really super proficient in python, and right now I don't have much free time so I'm sorry but someone else will have to take a closer look at it.
Yes, I have a 4k monitor and I have no problems with the 700mb size. I was trying standalone mpvpaper and I don't get any ffmpeg logs in Bpytop like when I use it with Waypaper. I also tried changing the wallpaper with a time difference and the old one keeps working below the new one.
It might be related to the thumbnail generation process, which should be over once you see the previews of the videos, but who knows. Could you try to click Refresh in the UI and see if that causes even more usage?
@CalfMoon okay, I'll take a closer look before publishing it officially. But one small question, when you wrote:
subprocess.Popen(["killall", ".mpvpaper-wrapp"])
why is it ".mpvpaper-wrapp" and not just "mpvpaper" ?
It might be related to the thumbnail generation process, which should be over once you see the previews of the videos, but who knows. Could you try to click Refresh in the UI and see if that causes even more usage?
I clicked Refresh in the UI and it doesn't cause any more use
I clicked Refresh in the UI and it doesn't cause any more use
Okay, that's a good news. Thank you
I also can confirm that previous processes are not killed because:
.mpvpaper-wrapp: no process found
I clicked Refresh in the UI and it doesn't cause any more use
Okay, that's a good news. Thank you
Thank you for this great work
I decided to use .mpvpaper-wrapp because the opposite happened in my computer, it detected .mpvpaper-wrapp but but not mpvpaper. I have no idea why it would be different for different systems.
@cr1ogen hi, I reimplemented launching things in mpvpaper, if you have time, please test the current main branch, thanks
@cr1ogen hi, I reimplemented launching things in mpvpaper, if you have time, please test the current main branch, thanks
Hello, the mpvpaper stop button works, but now in order to change the background, I have to stop mpvpaper otherwise it does not change the background
Does this happen for you all the time? I mean, I know there are certain situation, for example, when you set one monitor, and then All, and and then you try to set first monitor again, but it is now behind the running mpvprocess for all monitors (so it changes but it's not visible). So, you must stop (kill) all processes with Stop
, and then start from the fresh layer stack. But if you only change it just for one monitor with All, it is supposed to work without Stopping.
Does this happen for you all the time? I mean, I know there are certain situation, for example, when you set one monitor, and then All, and and then you try to set first monitor again, but it is now behind the running mpvprocess for all monitors (so it changes but it's not visible). So, you must stop (kill) all processes with
Stop
, and then start from the fresh layer stack. But if you only change it just for one monitor with All, it is supposed to work without Stopping.
Yes, I only have one monitor
I see, this is strange. Okay, I just released the version 2.4, if you have time, could you uninstall all previous versions and try with this new version? If the problem persists, a few questions:
/tmp/
folder and tell if there are files called mpv-socket-... ? (try to delete them and restart the program).By the way, I could also reproduce very high CPU and memory consumption when I try to play 4k videos, but that's unfortunately how mpv
plays it, nothing we can do here. For smaller videos, it's more reasonable.
I see, this is strange. Okay, I just released the version 2.4, if you have time, could you uninstall all previous versions and try with this new version? If the problem persists, a few questions:
* What is you distribution and window manager? * Does the original issue with high memory consumption still exist? * Could you check your `/tmp/` folder and tell if there are files called mpv-socket-... ? (try to delete them and restart the program).
I use Debian, mpvpaper from git and use qtile The original issue still persistis i have mpv-socket and when i delete, when starting program is created again
By the way, I could also reproduce very high CPU and memory consumption when I try to play 4k videos, but that's unfortunately how
mpv
plays it, nothing we can do here. For smaller videos, it's more reasonable.
ok, no problem
I use Debian, mpvpaper from git and use qtile
But that's with Wayland, right?
So, now, beside the high resource consumption (which seems normal with mpv), the main problem that you can't just switch to the new video, you must Stop if first (essentially kill the mpvpaper process) and then choose a new one? One possible reason might be that you need socat
to be installed. I thought it's everywhere by default, but please check if it's there...
I use Debian, mpvpaper from git and use qtile
But that's with Wayland, right?
So, now, beside the high resource consumption (which seems normal with mpv), the main problem that you can't just switch to the new video, you must Stop if first (essentially kill the mpvpaper process) and then choose a new one? One possible reason might be that you need
socat
to be installed. I thought it's everywhere by default, but please check if it's there...
Yes it is Wayland, I installed socat which was not installed in Debian and now I can change wallpaper without stopping mpvpaper. Now, the high memory consumption is not due to the wallpaper, it is due to a ffmpeg process that appears when changing the background, which I don't know why it appears and if I use mpvpaper by itself, it doesn't
Good, at least that problem is fixed.
The ffmpeg is used in waypaper only to cache images (at least explicitly), so once you see the thumbnails, there should be no ffmpeg process left. I'll try to reproduce it...
To be honest, I couldn't really see any ffmpeg processes in my system, so it's very hard for me to say what might be wrong. If you have time, maybe you can try to see if, for example: 1) ffmpeg processes multiply when you change the video wallpaper? 2) Do they appear if you set a static image wallpaper with mpvpaper backend? 3) Perhaps there are some details about these processes, like, what is the full argument that is partly hiddedn in the screenshot above? 4) Do they appear for any kind of video? 5) Do they appear for specific fill types? (maybe they are needed to cut the video for the monitor ratio?)
To be honest, I couldn't really see any ffmpeg processes in my system, so it's very hard for me to say what might be wrong. If you have time, maybe you can try to see if, for example:
1. ffmpeg processes multiply when you change the video wallpaper? 2. Do they appear if you set a static image wallpaper with mpvpaper backend? 3. Perhaps there are some details about these processes, like, what is the full argument that is partly hiddedn in the screenshot above? 4. Do they appear for any kind of video? 5. Do they appear for specific fill types? (maybe they are needed to cut the video for the monitor ratio?)
When I use Waypaper with mpvpaper, there is a high memory consumption with ffmpeg
and with mpvpaper that when changing the wallpaper, the first wallpaper remains running in the background.