Kharacternyk / pacwall

A live wallpaper that shows the dependency graph and status of installed packages.
GNU General Public License v3.0
556 stars 33 forks source link

Wallpaper not properly set with screen off #59

Closed LRitzdorf closed 2 years ago

LRitzdorf commented 2 years ago

If pacwall-watch-updates.timer triggers while my laptop's screen is powered off (e.g. after several minutes without activity), the wallpaper seems to be un-set, leaving just a black background. Also, the systemd logs from such a run don't show anything out of the ordinary:

○ pacwall@-.service - Pacwall Wallpaper Generator
     Loaded: loaded (/usr/lib/systemd/user/pacwall@.service; static)
     Active: inactive (dead) since Sun 2022-07-03 13:58:00 MDT; 54min ago
TriggeredBy: ● pacwall-watch-updates.timer
    Process: 7489 ExecStart=/usr/bin/pacwall -- (code=exited, status=0/SUCCESS)
   Main PID: 7489 (code=exited, status=0/SUCCESS)
        CPU: 1.229s

Jul 03 13:57:57 ritzcracker systemd[1911]: Starting Pacwall Wallpaper Generator...
Jul 03 13:58:00 ritzcracker systemd[1911]: Finished Pacwall Wallpaper Generator.
Jul 03 13:58:00 ritzcracker systemd[1911]: pacwall@-.service: Consumed 1.229s CPU time.

I'm not sure if this is a pacwall issue or an hsetroot one, since that's the hook I'm using (with i3). Is there a way to verify this? I'd be happy to test suggestions or provide additional logs, if that would help.

Kharacternyk commented 2 years ago

You can try doing sleep 500 && hsetroot -solid "#ff0000" in a terminal, going AFK, coming back after 10 minutes and checking the color of the wallpaper. If it's red, hsetroot works properly. If it's black, it doesn't.

LRitzdorf commented 2 years ago

Interesting — the background color applies via hsetroot, but not the image. I'll open an issue on that project, then. Thanks for the troubleshooting tip!

LRitzdorf commented 2 years ago

Update time! I've been talking with the developer of hsetroot over in himdel/hsetroot#41, and we've determined that adding the -root flag fixes this issue. It may have side effects in some cases, but it seems to me that this is preferable to not working at all when the screen is blanked. How would you feel about adding the -root flag to the default hsetroot hook?

Kharacternyk commented 2 years ago

How would you feel about adding the -root flag to the default hsetroot hook?

I think we should keep the current hook as is for ones who have a multimonitor setup because -root would almost always break the wallpaper for them. For example, my second monitor is a TV that is almost behind me and a wallpaper that spans the monitors won't really work.

However, -root does serve well for your use case, so I propose creating an alternative hsetroot hook and highlighting the pros and cons in the readme. Do you have some time and will to carry it out via a pull request?

LRitzdorf commented 2 years ago

Sure, I can do that! So, update the README and add another example hook file?

Kharacternyk commented 2 years ago

Sure, I can do that! So, update the README and add another example hook file?

Yup.