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

Use private mapping from provided shm_pool buffer #1876

Merged
merged 1 commit into from
Apr 30, 2024
Merged

Conversation

Caellian
Copy link
Collaborator

@Caellian Caellian commented Apr 30, 2024

Using MAP_SHARED causes a crash on some compositors/systems as shown by #1824. According to WL docs:

From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the recipient, as MAP_SHARED may fail.

We don't need a MAP_SHARED as the provided buffer will be used exclusively by conky and not shared with other processes.

This PR addresses that and closes #1824.

Testing

  • Tested private mapping in another Wayland client and it worked with hyprland.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@github-actions github-actions bot added sources PR modifies project sources display: wayland related to Wayland backend labels Apr 30, 2024
Copy link

netlify bot commented Apr 30, 2024

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit a576c2c
🔍 Latest deploy log https://app.netlify.com/sites/conkyweb/deploys/66310e808e6cc10007ef11cc

@Caellian Caellian merged commit b486263 into main Apr 30, 2024
62 checks passed
@Caellian Caellian deleted the fix/wl-shm-mmap branch April 30, 2024 16:14
@brndnmtthws brndnmtthws added the bug related to incorrect existing implementation of some functionality label Apr 30, 2024
@stacyharper
Copy link
Contributor

stacyharper commented Dec 7, 2024

This cause a problem, at least on Sway last release (1.10). I just display nothing.

Also the doc mention this:

From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the recipient, as MAP_SHARED may fail.

But on the wl_keyboard::keymap part. Are we sure this is really required here?

Reverting this one, plus #2103, make out_to_wayland = true to works now.

edit:

Honestly I don't see how this could works. We are sharing a buffer with the compositor. If we make this private, the compositor does not receive update on this buffer. So It just display a blank one.

edit2:

I just tried this on Hyprland, and we also need to revert this here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug related to incorrect existing implementation of some functionality display: wayland related to Wayland backend sources PR modifies project sources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Bad page map in process conky causes crash
3 participants