GhostNaN / mpvpaper

A video wallpaper program for wlroots based wayland compositors.
GNU General Public License v3.0
713 stars 21 forks source link

Clicking on desktop hides video [Raspberry Pi OS Bookworm] #63

Closed ethical-haquer closed 4 months ago

ethical-haquer commented 4 months ago

I'm starting mpvpaper like this: mpvpaper -v -o "-v terminal=yes --loop-playlist" HDMI-A-1 /home/ethical-haquer/Downloads/video.mp4 It works great, playing the short mp4 over and over. However, right as I click the desktop it stops displaying the video (it's still playing though). I'm using the latest Raspberry Pi OS (Debian 12) on a Pi 5. Let me know if you need any other info. TIA.

GhostNaN commented 4 months ago

However, right as I click the desktop it stops displaying the video (it's still playing though).

I'm assuming you are using KDE. If so, this is already a well known issue. See here: https://github.com/GhostNaN/mpvpaper/issues/13 and here: https://github.com/GhostNaN/mpvpaper/issues/45

With that being said, I kind of found a workaround for this issue since then. By using the --layer arg with bottom instead of the default background like so: mpvpaper -l bottom HDMI-A-1 /my/video.mp4 Although I did have some weird behavior with that, so your mileage may vary.

2 other things.

terminal=yes is already enabled by default. Unless you have some override in the config files it's stated here: https://github.com/GhostNaN/mpvpaper/blob/bc62e9ee762dda8e8cf05292d25a54fd66ca7844/src/main.c#L413-L418

And if you like looping playlist, might I suggest using the --slideshow arg.

Anyways, If I was wrong about you using KDE let me know.

ethical-haquer commented 4 months ago

Thanks for the quick reply! And yeah, I'm actually not using KDE:

ethical-haquer@raspberrypi:~/xwinwrap $ screenfetch
         _,met$$$$$gg.           ethical-haquer@raspberrypi
      ,g$$$$$$$$$$$$$$$P.        OS: Debian 12 bookworm
    ,g$$P""       """Y$$.".      Kernel: aarch64 Linux 6.1.0-rpi8-rpi-2712
   ,$$P'              `$$$.      Uptime: 2h 15m
  ',$$P       ,ggs.     `$$b:    Packages: 2071
  `d$$'     ,$P"'   .    $$$     Shell: bash 5.2.15
   $$P      d$'     ,    $$P     Resolution: 1024x600
   $$:      $$.   -    ,d$$'     WM: wlroots wm
   $$\;      Y$b._   _,d$P'      GTK Theme: PiXnoir [GTK3]
   Y$$.    `.`"Y$$$$P"'          Disk: 28G / 33G (86%)
   `$$b      "-.__               CPU: ARM Cortex-A76 @ 4x 2.4GHz
    `Y$$                         GPU: 
     `Y$$.                       RAM: 3469MiB / 8049MiB
       `$$b.                    
         `Y$$b.                 
            `"Y$b._             
                `""""           
ethical-haquer commented 4 months ago

Also, setting --layer to bottom does work, mostly. I just have to click where the top bar would be to bring it over the video, and then it works well.

GhostNaN commented 4 months ago

That is odd then.

I never had that issue with wlroots. Do you have another program running in the background?

GhostNaN commented 4 months ago

Also let me ask you this, it says "WM: wlroots wm". I'm assuming thats "Sway" right?

And you know if you have something running in the background if you have a wallpaper of any kind before mpvpaper.

ethical-haquer commented 4 months ago

Also let me ask you this, it says "WM: wlroots wm". I'm assuming thats "Sway" right?

And you know if you have something running in the background if you have a wallpaper of any kind before mpvpaper.

I honestly don't even know what Sway is :blush:, but Raspberry Pi OS uses LXDE as the DE, and pcmanfm to handle the desktop wallpaper. Just let me know if this isn't the info you need.

And I have my Desktop layout set to "No image".

GhostNaN commented 4 months ago

Raspberry Pi OS uses LXDE as the DE

LXDE is a "Lightweight X11 Desktop Environment" I don't understand how mpvpaper is working AT ALL if that's the case.

According to this: https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/ "For Bookworm, we are using a compositor called Wayfire. This uses a standard Wayland library called wlroots, which is used by several modern Wayland compositors."

So it uses Wayfire, last time I checked Wayfire worked fine. BUT if Raspberry Pi OS is forcing a wallpaper to run in the background even if set to "No image" I'm not sure what I can really do here. Kinda a similar issue with KDE funny enough. Even though Wayfire actually uses wlroots, unlike kwin.

pcmanfm to handle the desktop wallpaper.

That's a file manager, that doesn't handle wallpapers it just allows you to set a setting.

So with Wayfire it uses a config file according to the GitHub page: https://github.com/WayfireWM/wayfire?tab=readme-ov-file#configuration

You could take a look in there to see if it's starting up a wallpaper program or something. If not, there is not much I can really do from my end to "force" it to work.

ethical-haquer commented 4 months ago

Raspberry Pi OS uses LXDE as the DE

LXDE is a "Lightweight X11 Desktop Environment" I don't understand how mpvpaper is working AT ALL if that's the case.

According to this: https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/ "For Bookworm, we are using a compositor called Wayfire. This uses a standard Wayland library called wlroots, which is used by several modern Wayland compositors."

So it uses Wayfire, last time I checked Wayfire worked fine. BUT if Raspberry Pi OS is forcing a wallpaper to run in the background even if set to "No image" I'm not sure what I can really do here. Kinda a similar issue with KDE funny enough. Even though Wayfire actually uses wlroots, unlike kwin.

pcmanfm to handle the desktop wallpaper.

That's a file manager, that doesn't handle wallpapers it just allows you to set a setting.

So with Wayfire it uses a config file according to the GitHub page: https://github.com/WayfireWM/wayfire?tab=readme-ov-file#configuration

You could take a look in there to see if it's starting up a wallpaper program or something. If not, there is not much I can really do from my end to "force" it to work.

Thanks for explaining it to/correcting me. It is strange that it doesn't work, but setting --layer to bottom is a good work-around.

ethical-haquer commented 4 months ago

Well, what do you know, I got it fully working! Looking at that Raspberry Pi news post you linked to, I saw this:

The desktop background itself is still drawn by the old pcmanfm file manager which was used under Bullseye, but this has been modified so that it uses Wayland as its display protocol rather than X11, so is now a native Wayland application.

I set wallpaper_mode to none in the "~/.config/pcmanfm/LXDE-pi/desktop-items-0.conf" file, and then restarted pcmanfm with pcmanfm --desktop-off. The desktop was then solid black, and I was able to start mpvpaper normally. Clicking on the desktop no longer affects the playback. This issue is now fully resolved. Thanks again!

GhostNaN commented 4 months ago

Wow! I'm glad I was wrong. Good digging!