dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

[BUG] dual monitor after sleep restore same wallpaper for both screen

Open PerfMonk opened this issue 1 year ago • 7 comments

After leaving computer alone for a while, after unlocking, the wallpaper of the laptop screen is restored on both monitor. I use to have 2 different wallpapers.

I have the following variation config for monitor : monitor=,preferred,auto,1 monitor=eDP-1, [email protected],1920x0,1 monitor=HDMI-A-1, 1920x1080@100,0x0, 1

Hypridle/DPMS/suspend timeout are left the default values.

I'm on Fedora 41. My Laptop specs follow :

System: Kernel: 6.11.10-300.fc41.x86_64 arch: x86_64 bits: 64 compiler: gcc v: 2.43.1-2.fc41 clocksource: tsc avail: hpet,acpi_pm parameters: BOOT_IMAGE=(hd1,gpt2)/vmlinuz-6.11.10-300.fc41.x86_64 root=UUID=67f2e9a1-2f22-46e5-9f3f-70510d7ec878 ro rootflags=subvol=root rd.luks.uuid=luks-36060d0c-9b05-49ce-a3b5-b55857282518 rhgb quiet Desktop: Hyprland v: N/A with: waybar tools: avail: hyprlock,swaylock dm: GDM v: 47.0 Distro: Fedora Linux 41 (Workstation Edition) Machine: Type: Laptop System: ASUSTeK product: VivoBook_ASUSLaptop X513UA_M513UA v: 1.0 serial: Mobo: ASUSTeK model: X513UA v: 1.0 serial: uuid: d5253edf-985d-2748-8f27-f98eb9ef9aa9 UEFI: American Megatrends LLC. v: X513UA.305 date: 03/12/2021 Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Lucienne vendor: ASUSTeK driver: amdgpu v: kernel arch: GCN-5 code: Vega process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s ports: active: HDMI-A-1,eDP-1 empty: none bus-ID: 03:00.0 chip-ID: 1002:164c class-ID: 0300 temp: 40.0 C Device-2: Quanta USB2.0 HD UVC WebCam driver: uvcvideo type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-3:4 chip-ID: 0408:30d4 class-ID: 0e02 serial: 0x0001 Display: wayland server: Xwayland v: 24.1.4 compositor: Hyprland v: 0.44.1 driver: gpu: amdgpu d-rect: 3840x1080 display-ID: 1 Monitor-1: HDMI-A-1 pos: primary,left model: Acer SB222Q serial: 3413031D32X00 built: 2024 res: 1920x1080 hz: 100 dpi: 102 gamma: 1.2 scale: 1 size: 480x260mm (18.9x10.24") diag: 546mm (21.5") ratio: 16:9 modes: max: 1920x1080 min: 720x400 Monitor-2: eDP-1 pos: right model: Najing CEC Panda 0x0046 built: 2018 res: 1920x1080 hz: 60 dpi: 142 gamma: 1.2 scale: 1 size: 344x194mm (13.54x7.64") diag: 395mm (15.5") ratio: 16:9 modes: max: 1920x1080 min: 640x480 API: OpenGL v: 4.6 vendor: amd mesa v: 24.2.7 glx-v: 1.4 es-v: 3.2 direct-render: yes renderer: AMD Radeon Graphics (radeonsi renoir LLVM 19.1.0 DRM 3.59 6.11.10-300.fc41.x86_64) device-ID: 1002:164c memory: 500 MiB unified: no API: EGL Message: EGL data requires eglinfo. Check --recommends

PerfMonk avatar Dec 01 '24 21:12 PerfMonk

@PerfMonk Can you try to switch to swww? Then you can select for both screens an own wallpaper. This restore should work then.

mylinuxforwork avatar Dec 02 '24 22:12 mylinuxforwork

I don't have swww installed. I can't find any swww in fedora but it is on github https://github.com/LGFae/swww I have built it, it's a rust program and put the executables in ~/.local/bin (sww and www-daemon). I will add the start of the daemon in the autostart config.

But I would like to know how to tell ML4W to use swww ? It never got install at first. I used hyprpaper on my previous install.

Then, I'm going to try to lock and come back to see if wallpapers are OK for each monitor. I will keep you informed of results.

Thanks, Bernard

Le lun. 2 déc. 2024 à 17:26, Stephan Raabe @.***> a écrit :

@PerfMonk https://github.com/PerfMonk Can you try to switch to swww? Then you can select for both screens an own wallpaper. This restore should work then.

— Reply to this email directly, view it on GitHub https://github.com/mylinuxforwork/dotfiles/issues/509#issuecomment-2513090446, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFZAWMTNJUTAMCXQUUKIKL2DTNCZAVCNFSM6AAAAABS2DX6EWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJTGA4TANBUGY . You are receiving this because you were mentioned.Message ID: @.***>

--

Bernard Tremblay @.*** R: (418) 658-1411 C: (581) 988-1411

Le but de Linux est de gérer vos ressources et faire le travail, le but des OS propriétaire est de vous vendre d'autres licences...

PerfMonk avatar Dec 03 '24 04:12 PerfMonk

Just did the test. It sets both monitor to the last wallpaper that was set before. If I change the left monitor wallpaper, log out and wait a few secs and login back, then I set both wallpaper to the last left wallpaper. But may be there is other config to setup in order to use swww ???

Also I see that in the ~/.cache there is only current_wallpaper that is kept. I see no traces of wallpaper of the other monitor. So may this case was forgotten in the script that restore the wallpaper ?

EDIT I have looked at swww and it gives me this info :

================= ❯ swww query eDP-1: 1920x1080, scale: 1, currently displaying: color: 000000 HDMI-A-1: 1920x1080, scale: 1, currently displaying: color: 000000

~ ❯ swww restore WARNING: failed to load cache for output eDP-1: cache file does not exist WARNING: failed to load cache for output HDMI-A-1: cache file does not exist

So it looks like the cache is not setup for swww. Wich make me think that there must be somewhere a place to specify what wallpaper to use ??? May be my newly compiled swww is not used at all by your scripts at the present state ???

Any idea ????

Le lun. 2 déc. 2024 à 23:31, Bernard Tremblay @.***> a écrit :

I don't have swww installed. I can't find any swww in fedora but it is on github https://github.com/LGFae/swww I have built it, it's a rust program and put the executables in ~/.local/bin (sww and www-daemon). I will add the start of the daemon in the autostart config.

But I would like to know how to tell ML4W to use www ? It never got install at first. I used hyprpaper on my previous install.

Then, I'm going to try to lock and come back to see if wallpapers are OK for each monitor. I will keep you informed of results.

Thanks, Bernard

Le lun. 2 déc. 2024 à 17:26, Stephan Raabe @.***> a écrit :

@PerfMonk https://github.com/PerfMonk Can you try to switch to swww? Then you can select for both screens an own wallpaper. This restore should work then.

— Reply to this email directly, view it on GitHub https://github.com/mylinuxforwork/dotfiles/issues/509#issuecomment-2513090446, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFZAWMTNJUTAMCXQUUKIKL2DTNCZAVCNFSM6AAAAABS2DX6EWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJTGA4TANBUGY . You are receiving this because you were mentioned.Message ID: @.***>

--

Bernard Tremblay @.*** R: (418) 658-1411 C: (581) 988-1411

Le but de Linux est de gérer vos ressources et faire le travail, le but des OS propriétaire est de vous vendre d'autres licences...

--

Bernard Tremblay @.*** R: (418) 658-1411 C: (581) 988-1411

Le but de Linux est de gérer vos ressources et faire le travail, le but des OS propriétaire est de vous vendre d'autres licences...

PerfMonk avatar Dec 03 '24 04:12 PerfMonk

I just found that the wallpaper settings had a place to switch from hyprpaper to swww. I selected swww but I still have same problem. If I log out and then log back, it set both monitors with same wallpaper (the last one I applied to any monitor). swww is buggy it sometime applies a transition with a growing circle with new wallpaper inside but it doesn't keep growing until the screen is totally filled with new wallpaper. So you can sometime get a small circle with a part of the new wallpaper at the bottom right of the screen. But other than that swww doesn't restore both wallpaper if you have two different wallpapers. I'm out of idea to correct the situation for tonight.

PerfMonk avatar Dec 03 '24 06:12 PerfMonk

swww is too buggy, I switched back to hyprpaper. But when I logon I had time to see that my first wallpaper was applied on both monitors and then the second wallpaper is applied on both monitors. It seems the wallpaper script does know there is 2 different wallpapers but doesn't know how to applied it to the good monitor.

PerfMonk avatar Dec 03 '24 16:12 PerfMonk

I noticed that when I go away and the screen lock, on unlocking, my external monitor has no wallpaper, just a black screen with waybar.

PerfMonk avatar Dec 07 '24 18:12 PerfMonk

The wallpaper-restore.sh script has only one wallpaper in the cache ("$HOME/.config/ml4w/cache/current_wallpaper"). This exclude the possibility to have a different wallpaper for each screen. The cached wallpaper will always be the last wallpaper applied whatever the monitor used. This could be improved, the script should be modified and the script to change the wallpaper would be impacted too since we need a cached wallpaper for each screen. And by the way, waybar could also be linked to a screen and have different colors for different wallpapers. I guess one should think about it carefully before changing things...

PerfMonk avatar Dec 09 '24 20:12 PerfMonk