2

I'm setting up a timed wallpaper in GNOME, but when duration is configured to be < 1 second, it doesn't work as expected.

The duration (or each frame) is timed correctly, however the desktop wallpaper itself is only actually being painted once per second.

Would it be possible to configure GNOME / Debian to repaint the desktop more frequently? The target is 60 updates per second, but getting it to 30, 15, or even 2 updates per second would be progress at least.

What I've tried:
  1. Looking for solutions online, but they tend to set the duration > 1 second, or use additional software to play videos or GIFs on the desktop. I'm keen to get the best results I can without additional software.
  2. Read the documentation, but GNOME doesn't have much for timed wallpapers, just normal wallpapers, which isn't helpful. (Desktop Wallpaper, Add extra backgrounds)
  3. I have been unable to find a generic setting related to the wallpaper or desktop update frequency.
My Files
~/Pictures/W6cMZ6wfCjk/live-wallpaper.xml
<background>
  <static>
    <duration>0.016666667</duration>
    <file>/home/redacted/Pictures/W6cMZ6wfCjk/frames/001.png</file>
  </static>
  <static>
    <duration>0.016666667</duration>
    <file>/home/redacted/Pictures/W6cMZ6wfCjk/frames/002.png</file>
  </static>

  <!-- … 581 frames in total, spaced 0.016666667 seconds apart so 60 fps -->
~/.local/share/gnome-background-properties/live-wallpaper.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
 <wallpaper deleted="false">
   <name>Redacted Wallpaper</name>
   <filename>/home/redacted/Pictures/W6cMZ6wfCjk/live-wallpaper.xml</filename>
   <options>zoom</options>
 </wallpaper>
</wallpapers>

1 Answer 1

3
+100

It's feasible but changing your wallpaper 60 times a second is going to peg your CPU, a better solution would be for Gnome Shell to natively support animated backgrounds from a video stream.

Anyhow, here's how to proceed:

# Create a folder to hold your custom overlays
mkdir -p .gnome-shell-custom-overlays/ui
echo 'export G_RESOURCE_OVERLAYS="/org/gnome/shell=$HOME/.gnome-shell-custom-overlays"' \
   >> .profile

# Extract the file we want to customize
gresource extract /usr/lib/gnome-shell/libgnome-shell.so /org/gnome/shell/ui/background.js \
    > ~/.gnome-shell-custom-overlays/ui/background.js

# Change the minimum frame time (feel free to adjust)
sed -i 's:ANIMATION_MIN_WAKEUP_INTERVAL = 1.0;:ANIMATION_MIN_WAKEUP_INTERVAL = 1/60;:' \
    ~/.gnome-shell-custom-overlays/ui/background.js

Then logout from your session and log back in again.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .