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

Problems with DRM modifiers on external display #1634

Open
mathias234 opened this issue Jan 10, 2025 · 1 comment
Open

Problems with DRM modifiers on external display #1634

mathias234 opened this issue Jan 10, 2025 · 1 comment

Comments

@mathias234
Copy link

Hello, I've have this issue where my external display, a 5120x1440 display, doesn't work properly on Cosmic. The root cause seems to be something to do with hardware limitations, the PC that i connect this monitor to is a laptop with a intel iGPU so not much graphical power.

Having seen this issue on other compositors i've been able to work around it by setting no modifiers on the DrmFormat:

diff --git a/src/backend/drm/mod.rs b/src/backend/drm/mod.rs
index 8dbbacb1..9be2cf59 100644
--- a/src/backend/drm/mod.rs
+++ b/src/backend/drm/mod.rs
@@ -297,6 +297,15 @@ fn plane_formats(dev: &(impl ControlDevice + DevPath), plane: plane::Handle) ->
         });
     }

+
+    formats.insert(DrmFormat {
+        code: DrmFourcc::Argb8888,
+        modifier: DrmModifier::Invalid,
+    });
+
+
+    return Ok(FormatSet::from_formats(formats));
+
     if let Ok(1) = dev.get_driver_capability(DriverCapability::AddFB2Modifiers) {
         let set = dev.get_properties(plane).map_err(|source| {
             DrmError::Access(AccessError {

This is obviously a hack and potentially breaks stuff, I am not very well versed in DRM or anything related to it.
Aquamarine lets you do this through a environment variable, others like wlroot just does it automatically if it sees a failure.

PR on aquamarine that solves this for more explanations on causes:
hyprwm/aquamarine#77

@Drakulix
Copy link
Member

I think this is addressed by the recent change of #1576 at least for compositors using it, which will automatically fall back to using no modifiers, should enabling a new display fail.

Using that or implementing the fallback themselves however is the responsibility of the compositor. So depending on which compositors are giving you issues, you'll need to open an issue on the respective project.

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