5 ms·
Does wayland/x11 use generic GPU drivers(that is supported by all GPU) to write to a framebuffer? For example, if there is no shell such as Gnome or KDE, and we
by iamcreasy 3y ago
Does wayland/x11 use generic GPU drivers(that is supported by all GPU) to write to a framebuffer? For example, if there is no shell such as Gnome or KDE, and we are only booting to a terminal - do wayland/x11 still use that generic GPU driver to draw letters to the screen?
- gertop 3y agoX11 and Wayland aren't involved with text mode. The kernel implements its own framebuffer: https://www.kernel.org/doc/html/latest/fb/fbcon.html https://www.kernel.org/doc/html/latest/fb/fbcon.html
- iamcreasy 3y agoThanks, but how does Linux kernel ensures that it can talk to all framebuffer devices out there? Does it come with a generic implementation that all GPU vendors support?
- sannee 3y agoThere indeed is a standardized interface provided via EFI: https://docs.kernel.org/fb/efifb.html https://docs.kernel.org/fb/efifb.html
- pjmlp 3y agoGeneric as in, as long as there is UEFI to talk to, good luck outside x86 ecosystem.
- pjmlp 3y agoOutside the old PC BIOS modes up to VESA, there isn't such thing as a generic implementation for all GPU vendors.
- TingPing 3y agoWayland is just an IPC protocol, so it imposes little. In practice compositors use mostly hardware agnostic Linux APIs. The driver needs to support things like KMS, DRM, GBM, etc.
- iamcreasy 3y agoSo, is it correct to say Wayland, the process drawing everything on the screen by writing to a gpu framebuffer, is just another linux process with escalated privilege?
- tomnipotent 3y agoWayland client and server share video memory buffers through libdrm GBM API (Mesa) and DRM was designed so that Wayland can use wl_drm protocol without escalated privileges.