Skip to content

Conversation

@madsmtm
Copy link
Member

@madsmtm madsmtm commented Jan 17, 2026

The backend was introduced in #135 to fix #42, but I feel like it's somewhat too niche for us to support as a "primary" platform.

In a sense, this is in preparation for some day dropping X11 as a default platform too (though that's years in the future, and should be coordinated with Winit).

Then again, maybe the cost of the extra drm-* dependencies isn't large enough that it really matters?

WDYT?

@madsmtm madsmtm added question Further information is requested DS - DRM/KMS labels Jan 17, 2026
@madsmtm madsmtm force-pushed the madsmtm/disable-kms branch from 0841c1a to 7296b09 Compare January 17, 2026 08:16
@ids1024
Copy link
Member

ids1024 commented Jan 27, 2026

Then again, maybe the cost of the extra drm-* dependencies isn't large enough that it really matters?

Not sure what the best tool is currently for measuring this, but drm-rs is a pure-Rust library that mostly provides thin wrappers around ioctls. So I'd expect the bloat this adds to the binary, after optimizing out all the functions that aren't used by softbuffer, is pretty trivial.

@madsmtm
Copy link
Member Author

madsmtm commented Jan 27, 2026

I guess the reason why I wanted to do this was also motivated by #323, because I felt that DRM being a tier 3 platform somewhat warranted that the user more explicitly opted in to it.

@ids1024
Copy link
Member

ids1024 commented Jan 27, 2026

On the other hand, if winit still has no kms/drm backend, there's probably not much benefit to having this enabled by default, even if there isn't much harm either. The backend will only be used by projects that explicitly use it, in which case they can enable the feature.

@madsmtm
Copy link
Member Author

madsmtm commented Jan 27, 2026

Yeah, that was my reasoning too.

@madsmtm
Copy link
Member Author

madsmtm commented Jan 27, 2026

Maybe part of my problem is that I don't understand when you'd ever want to use this backend? Can you even use it if the desktop has Wayland or X11 installed and running? Isn't DRM/KMS more like the implementation detail of a Wayland compositor, not something you can actually use in e.g. a Bevy game?

@ids1024
Copy link
Member

ids1024 commented Jan 27, 2026

You'd use the DRM/KMS backend if you're running an application on a tty without Wayland or X11. I think it's relatively common to use Qt like this in embedded contexts: https://doc.qt.io/qt-6/embedded-linux.html.

Though presumably most uses of softbuffer would want a winit backend as well. And in the mean time, a Wayland compositor like cage can be used to run a single application.

Copy link
Member

@notgull notgull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with this. Given the lack of bug reports I am sure that 0 people are using the KMS backend.

@madsmtm madsmtm force-pushed the madsmtm/disable-kms branch from 7296b09 to b609adf Compare January 28, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DS - DRM/KMS question Further information is requested

Development

Successfully merging this pull request may close these issues.

GBM/KMS platform

4 participants