varietywalls / variety

Wallpaper downloader and manager for Linux systems
http://peterlevi.com/variety
GNU General Public License v3.0
1.17k stars 140 forks source link

Incomplete image drawn to primary monitor #311

Open dnut opened 4 years ago

dnut commented 4 years ago

Version of Variety 0.8.3

Describe the bug Sometimes the background does not load completely on my primary monitor.

Context This happens about 10% of the time. Later I can go back to the same image and it doesn't have a problem.

To Reproduce This may be difficult to reproduce without using my exact hardware and system configuration. I switch image every 5 minutes, so I do see this issue quite often.

I'm guessing it's a race condition or something. Maybe the file isn't fully written to the drive when variety tries to load it on the first display. I use an NVMe SSD though, so I don't see why it would be unusually slow.

Attach Variety's log file variety.log

Desktop environment and version Openbox 3.6.1-6

OS name and version Arch Linux 5.5.10-arch1-1

Screenshots The side monitors are lower resolution so my screenshots always have those weird borders on the top and bottom with artifacts. Ignore that. The issue is the wallpaper for the center screen. 2020-03-23_21:39:16_5120x1440_scrot 2020-03-23_17:58:00_5120x1440_scrot

dnut commented 4 years ago

Just noticed this happening on a different monitor which contradicts my previous post. This is the first time I saw it happen on a different screen. Took me a while to upload the file, so the log file has a few more wallpapers after the one in question. 2020-03-24_21:02:35_5120x1440_scrot.png variety.log

dnut commented 4 years ago

Now this is happening most of the time. I may stop using variety since it's barely functional.

I upgraded my side monitors to 1080p, not sure if that's the cause.

dnut commented 4 years ago

If you point me to the code that loads the wallpaper, I'll try to fix it.

jlu5 commented 4 years ago

Which wallpaper sources have you enabled? I'm assuming the image file itself isn't the issue, since it draws fine on at least one of the monitors.

Variety passes wallpaper setting to a shell script, which in turn invokes a per-DE external program to set the wallpaper: https://github.com/varietywalls/variety/blob/master/data/scripts/set_wallpaper For openbox and other WM-only environments it'll try to use either feh or nitrogen (in that order) if they are installed.

dnut commented 4 years ago

https://i.imgur.com/KTrE4Kn.png

I have both feh and nitrogren installed so it must be using feh.

I set variety to a 1 second interval and did some testing. I was able to determine:

I don't know yet exactly how variety goes from downloading a file to setting it as the wallpaper, but it seems like it's happening before the file is fully downloaded.