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

Issue with OpenGL applications crashing when using Hyprland 0.42.0 #318

Closed
Moerliy opened this issue Aug 16, 2024 · 1 comment
Closed

Issue with OpenGL applications crashing when using Hyprland 0.42.0 #318

Moerliy opened this issue Aug 16, 2024 · 1 comment

Comments

@Moerliy
Copy link

Moerliy commented Aug 16, 2024

This is an issue that came up in the Hyprland repo (ref).

The recent release of Hyprland 0.42.0 introduced significant changes, with the most notable being the switch from wlroots to aquamarine.
However, this update has caused issues on Asahi Linux, where applications that use OpenGL, such as Firefox, Kitty, wpaperd or Chromium …, are no longer running properly.

It seems that a bunch of people are running into this and Hyprland's lead developer vaxerski seems to be out of options on how to solve or approach this bug.

marcan has commented on this a couple of days ago:

If you are trying to create linear buffers with arbitrary pitch, that won't work. The hardware only supports 16-byte aligned pitch. This is your bug, not a driver bug. You need to use buffer formats that are supported by the hardware.

and vaxerski thinks the bug has to do something with Asahi:

I am no marcan, I don't use or understand Apple hardware, but I fail to see where I went wrong as I feel like I report formats correctly. I mean, AMD, Intel, Nvidia work.
The comment about 16-bit aligned linear buffers, sure, but it's not hyprland that reports these things. For mesa drm, we only report formats, that's it.
Currently we report formats that EGL reports as renderable, with the patch we report formats that the KMS primary plane supports.
I feel like I am out of options?

I'm not sure if the bug originates in Hyprland or the Asahi kernel but I would love for this to get resolved so I thought some people here who have a bit more knowledge about this, could help with the investigation of the problem.

Edit: I was a bit at a loss on where to post this issue, so I hope it isn't completely out of place.

@marcan
Copy link
Member

marcan commented Aug 17, 2024

This is pretty unlikely to be our bug, since all other compositors have no issue here, and it's definitely not a kernel bug since if anything Hyprland interacts with Mesa.

The Hyprland authors say it "works on intel, AMD, nvidia". Those are all non-kmsro systems. Almost all other systems use kmsro and split display/render. I bet hyprland is equally broken on Rockchip, Mali, Qualcomm, etc.

Re the original pitch issue, I took a quick look at the hyprland code and immediately saw at least one place where pitch == width * 4 is assumed, which is an incorrect assumption to make. So their code is very clearly broken and has never been tested on a system with pitch alignment requirements. They need to debug this, not us.

I would suggest the Hyprland author interact with the Mesa/freedesktop community to learn how to write a compositor correctly using APIs and flows that work actoss different hardwares and respect hardware limitations and works with kmsro... but they are banned from that community, for very good reasons. So now they're on their own. Good luck.

@marcan marcan closed this as completed Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants