Botspot / pi-apps

Raspberry Pi App Store for Open Source Projects
GNU General Public License v3.0
1.88k stars 206 forks source link

Wayland does not support window placement (affects Conky) #2478

Open secretwolfie opened 8 months ago

secretwolfie commented 8 months ago

20231106_16h32m12s_grim

Confirmations

What happened?

Conky's config not working correctly

Description

Conky's widget doesn't align to the right on Raspberry Pi OS (Bookworm) with Wayland, I have tried changing settings in the config to no avail, is this at all being addressed? I have attached a screenshot for reference, Yes it's a hacknet background.

What are your system specs (run the following command in your terminal)?

OS: Debian GNU/Linux 12 (bookworm)
OS architecture: 64-bit
Last updated Pi-Apps on: 11/05/2023
Latest Pi-Apps version: 11/06/2023
Kernel: aarch64 6.1.61-v8+
Device model: Raspberry Pi 400 Rev 1.0 
Cpu name: Cortex-A72
Ram size: 3.79 GB
Raspberry Pi OS image version: 2023-10-10
Language: en_US.UTF-8

(Recommended) Error log? Terminal output? Debug messages?

No response

github-actions[bot] commented 8 months ago

Hello there 👋 Thanks for submitting your first issue to the Pi-Apps project! We'll try to get back to you as soon as possible. In the meantime, we encourage you join our Discord server, where you can ask any questions you might have.

Please respond as soon as possible if a Pi-Apps maintainer requests more information from you. Stale issues will be closed after a lengthy period of time with no response.

theofficialgman commented 8 months ago

Are you able to move the windows with the compositor once it is generated and then it will pop up back in the same position on subsequent launches?

There is NO wayland protocol support for specifying window positions. The wayland developers are pretty adamantly against this. More info here -> https://github.com/Botspot/pi-apps/issues/2233#issuecomment-1378221777 and the links in here -> https://github.com/Botspot/pi-apps/blob/c8fbf8125fc2174491b19e95e46644349f084a53/api#L3239-L3241

Pi-Apps multi-panel GUI gets around this by the use of XWayland for all spawned windows but this is not ideal.

secretwolfie commented 8 months ago

Hello, not able to move the Conky window around.

theofficialgman commented 8 months ago

I suggest referring to official piOS documentation or asking at the piOS wayfire fork https://github.com/raspberrypi-ui/wayfire about how you are supposed to go about moving decorationless windows. I am not familiar with that but regardless it's not in our control. The Wayland compositor (wayfire) handles how windows are displayed and how the user can manipulate them.

halfacandan commented 6 months ago

I had the same issue as @justlinky. I managed to fix it by:

It looks like the Pi Apps install script for Conky already amends the default config that is pulled from github. Perhaps @theofficialgman could incorporate this change?

Cheers Dan

Botspot commented 6 months ago

Thanks for the tip, @halfacandan. I have made the changes on the https://github.com/Botspot/rpi_conky repo. With a bit more research, I also fixed transparency. Please go ahead and reinstall the conky app from pi-apps to see if it looks good on your system.

If it does look good, then I will make the conky app update for everyone.

Botspot commented 6 months ago

Further research shows that conky can stay on the backmost layer and skip the taskbar with more config, but this reportedly breaks usage on X. https://forum.manjaro.org/t/conky-on-wayland/153442/8 Maybe I could split the conky config into 2 scripts - one for X and the other for wayland users.

halfacandan commented 6 months ago

Thank you for the speedy fix. I uninstalled and then re-installed conky via Pi Apps. The positioning of the conky window is now correctly showing in the top-right corner of the screen after the install.

There is a new bug though. Whenever I click on the desktop, the conky pane disappears and I can't bring it to the fore-ground any more. I then have to re-open it from the start menu but it then appears in the bottom-left corner.

Botspot commented 6 months ago

@halfacandan, try opening ~/.conkyrc and replace lines 9-13 with this:

own_window = true,
out_to_wayland = true,
own_window_type = 'override',
own_window_transparent = false,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
halfacandan commented 6 months ago

I think I have maybe muddied the waters. I realised that the bug I reported was only manifesting when I connected to my raspberry pi via a remote desktop connection (RDP via xrdp). Sorry for the confusion on my part.

Both your current version in the repo and the proposed fix above work when I am logged into the raspberry pi locally. The "bug" with the disappearing conky only manifests with the current version of the install script in your repo when I am logged in via RDP. Applying your suggested fix and connecting via RDP prevents conky from loading/displaying at all so is a downgrade from my point of view.

If you have any more suggestions then I am happy to try them and/or have a screenshare to help with debugging but I think that RDP will always be a limitation here.

halfacandan commented 6 months ago

Maybe I could split the conky config into 2 scripts - one for X and the other for wayland users.

Since doing some more testing, I have switched my system to X as wayland was breaking other apps that I use. The current version of your script in the repo works fine with X. Happy to test any changes that you are proposing.

Botspot commented 6 months ago

Maybe I could split the conky config into 2 scripts - one for X and the other for wayland users.

Since doing some more testing, I have switched my system to X as wayland was breaking other apps that I use. The current version of your script in the repo works fine with X. Happy to test any changes that you are proposing.

Could you try my suggested change here and see if that still works on X? I doubt it but it's worth a try.

halfacandan commented 6 months ago

Could you try my suggested change here and see if that still works on X? I doubt it but it's worth a try.

I'm afraid that it prevents conky from loading when using X on a Raspberry Pi 4 via RDP with OS: Debian GNU/Linux 12 (bookworm) OS architecture: 64-bit

theofficialgman commented 6 months ago

This really is an upstream conky issue. There isn't any reason that conky can't detect the currently display server (x11 vs wayland) and programatically change its own display pipeline https://github.com/brndnmtthws/conky/issues . The config flags could still exist of course but would instead act as overrides.