hyprpaper: Turning off monitor stops outputting wallpaper
What happens:
When I turn off my monitor, this disconnects DP-1. Hyprpaper reacts accordingly: [LOG] Destroying output DP-1
Steps to reproduce:
- run
hyprpaper
- turn off monitor
- turn on monitor
- wallpaper is gone
killall hyprpaper && hyprpaper
fixes this, but it needs to be run every time I turn the monitor back on. I’ve tried this with both wallpaper = ,/path/to/img
and wallpaper = DP-1,/path/to/img
in the config, same result.
Expected result:
Wallpaper is persistent; re-apply wallpaper after DP-1/fallback display is reconnected (turned back on)
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 4
- Comments: 18 (5 by maintainers)
Commits related to this issue
- Clear wallpaper from monitor before destroying ouput Fixes issue #54. — committed to lfos/hyprpaper by lfos a year ago
- Clear wallpaper from monitor before destroying ouput (#79) Fixes issue #54. — committed to hyprwm/hyprpaper by lfos a year ago
c2fb8a2 fixes the issue for me; please give it a try.
@vaxerski We may also want to consider switching
m_mMonitorActiveWallpaperTargets
to a string-based map (with keys being monitor names, similar to other maps inCHyperpaper
) to avoid the size-based side effects described here. After switching, the issue always appears without the fix from PR #79 applied (regardless of the size ofSMonitor
) and never appears after the fix.https://github.com/hyprwm/hyprpaper/blob/66b3ba8d9faa6b6a8894ecc03ac61667d344b8bc/src/helpers/Monitor.hpp#L9
I tried a few times and found that the new
description
field is the problem. New monitor detection works on 3bfaac0 but stops working after adding this property only.This might relate to the structure
SMonitor
’s size. Notice that:works, it needs 248 bytes. and:
doesn’t, it needs 256 bytes.
needs 272 bytes.
I hope this helps.
I’m still experiencing this problem, same output in logs.
hyprland 0.24.1-1, hyprpaper 0.2.0-1, xdg-desktop-portal-hyprland 0.2.1-1 from new Arch community repository.
should be fixed in 654647f7b3cdeaf2f22df0b6744b3d63fb12bc0e, lmk
https://github.com/hyprwm/hyprpaper/blob/66b3ba8d9faa6b6a8894ecc03ac61667d344b8bc/src/render/LayerSurface.cpp#L35
The event listeners are correctly registered for all monitors, but the event handler: https://github.com/hyprwm/hyprpaper/blob/66b3ba8d9faa6b6a8894ecc03ac61667d344b8bc/src/events/Events.cpp#L81 is not called for my external monitor.