Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
secretwolfie opened this issue Nov 6, 2023 · 15 comments
Open
3 tasks done

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

secretwolfie opened this issue Nov 6, 2023 · 15 comments
Labels
Upstream Bug something isn't working that can only be fixed upstream

Comments

@secretwolfie
Copy link

secretwolfie commented Nov 6, 2023

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

@secretwolfie secretwolfie added the bug Something isn't working label Nov 6, 2023
Copy link
Contributor

github-actions bot commented Nov 6, 2023

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
Copy link
Collaborator

theofficialgman commented Nov 6, 2023

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 -> #2233 (comment) and the links in here ->

pi-apps/api

Lines 3239 to 3241 in c8fbf81

#Make dual-pane yad windows work correctly on wayland by using xwayland
#We need support for setting window position for dual-pane yad windows to be supported via a wayland protocol, implemented in compositors, and supported in gtk
#Relevant draft PRs for the wayland protocol https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/247 https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/249

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

@theofficialgman theofficialgman added Upstream Bug something isn't working that can only be fixed upstream and removed bug Something isn't working labels Nov 6, 2023
@theofficialgman theofficialgman changed the title Conky's default config Wayland does not support window placement (affects Conky) Nov 6, 2023
@secretwolfie
Copy link
Author

Hello, not able to move the Conky window around.

@theofficialgman
Copy link
Collaborator

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
Copy link

halfacandan commented Dec 25, 2023

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

  • Open the default Conky Config file in a text editor: /home/pi/.conkyrc
  • Change the value of the own_window_type property to desktop (as shown below):
...
own_window = true,
own_window_type = 'desktop',
own_window_transparent = true,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
...
  • Save the file
  • Reboot your machine to see the change

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
Copy link
Owner

Botspot commented Dec 25, 2023

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
Copy link
Owner

Botspot commented Dec 25, 2023

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
Copy link

halfacandan commented Dec 25, 2023

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
Copy link
Owner

Botspot commented Dec 25, 2023

@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
Copy link

halfacandan commented Dec 25, 2023

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
Copy link

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
Copy link
Owner

Botspot commented Dec 25, 2023

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
Copy link

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
Copy link
Collaborator

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.

@Techigami
Copy link

Adding the following to .conkyrc at the top of the script just after the "conky.config = {" header fixed the placement on Wayland (labwc):

out_to_x = false,
out_to_wayland = true,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Upstream Bug something isn't working that can only be fixed upstream
Projects
None yet
Development

No branches or pull requests

5 participants