MODESETTING(4)

✨ MODESETTING ✨ (section 4 of the Kernel Interfaces Manual, bestie)

okay so bestie, lemme put you ON. this is modesetting, the video driver for framebuffer devices, and it's lowkey the moment πŸ’…


🌸 NAME 🌸

modesetting β€” the video driver for framebuffer device. no cap, that's literally the whole name. iconic.


πŸŽ€ SYNOPSIS πŸŽ€

Section "Device"
  Identifier "devname"
  Driver "modesetting"
  BusID  "pci:bus:dev:func"
  ...
EndSection

like. that's the vibe. drop it in your Device section and watch her COOK πŸ”₯


πŸ’– DESCRIPTION πŸ’–

so modesetting is an Xorg driver for KMS devices. she supports TrueColor visuals at framebuffer depths of 15, 16, 24, and 30. RandR 1.2 is supported for multi-head configurations β€” yes bestie, multi-monitor setup, we love to see it πŸ–₯️πŸ–₯️

acceleration? available through glamor for devices supporting at least OpenGL ES 2.0 or OpenGL 2.1. slay.

and if glamor is not enabled, a shadow framebuffer gets configured based on the KMS drivers' preference β€” UNLESS the framebuffer is 24 bits per pixel, in which case the shadow framebuffer is always used. periodt, no exceptions.


πŸ¦‹ SUPPORTED HARDWARE πŸ¦‹

she supports ALL the hardware where a KMS driver is available 🫢 not me being universally compatible. modesetting uses the Linux DRM KMS ioctls and dumb object create/map. look at her go.


πŸ‘‘ CONFIGURATION DETAILS πŸ‘‘

first things first: go read xorg.conf(5) for the general configuration tea β˜• this section is ONLY about the stuff that's specific to this driver, iykyk.

for this driver you do NOT have to specify modes in the screen section of the config file. modesetting can pick up the currently used video mode from the kernel driver and will use it if there are no video modes configured. girl is self-sufficient ✨

for PCI boards you might have to add a BusID line to the Device section β€” see above for a sample line, bestie, it's right there πŸ‘†

and now... the options. there's a bunch. we're doing all of them. no skipping, that's the rule πŸ’œ

  • Option "SWcursor" "boolean" β€” selects software cursor. the default is off.
  • Option "kmsdev" "string" β€” the framebuffer device to use. Default: /dev/dri/card0.
  • Option "ShadowFB" "boolean" β€” enable or disable use of the shadow framebuffer layer. Default: on.
  • Option "DoubleShadow" "boolean" β€” double-buffer shadow updates. when enabled, the driver keeps two copies of the shadow framebuffer. when the shadow framebuffer is flushed, the old and new versions of the shadow are compared, and only tiles that have actually changed are uploaded to the device. this is an optimization for server-class GPUs with a remote display function (typically VNC), where remote updates are triggered by any framebuffer write, so minimizing the amount of data uploaded is crucial. it defaults to enabled for ASPEED and Matrox G200 devices, and disabled otherwise.
  • Option "AccelMethod" "string" β€” one of "glamor" or "none". Default: glamor.
  • Option "PageFlip" "boolean" β€” enable DRI3 page flipping. the default is on.
  • Option "VariableRefresh" "boolean" β€” enables support for enabling variable refresh on the Screen's CRTCs when a suitable application is flipping via the Present extension. the default is off.
  • Option "AsyncFlipSecondaries" "boolean" β€” use async flips for secondary video outputs on multi-display setups. so here's the deal: if a screen has multiple displays attached and DRI3 page flipping is used, then only one of the displays will have its page flip synchronized to vblank for tear-free presentation. that's the display used for presentation timing and timestamping β€” usually the one covering the biggest pixel area of the screen. all the other displays ("Secondaries") will not synchronize their flips. this may cause some tearing on these displays, but it prevents a permanent or periodic slowdown or irritating judder of animations if not all video outputs are running synchronized with each other and with the same refresh rate. there is no perfect solution apart from perfectly synchronized outputs, but this option may give preferrable results if the displays in a multi-display setup mirror or clone each other. the default is off.
  • Option "ZaphodHeads" "string" β€” specify the RandR output(s) to use with zaphod mode for a particular driver instance. ⚠️ if you use this option you must use this option for all instances of the driver. for example: Option "ZaphodHeads" "LVDS,VGA-0" will assign xrandr outputs LVDS and VGA-0 to this instance of the driver.
  • Option "UseGammaLUT" "boolean" β€” enable or disable use of the GAMMA_LUT property, when available. when enabled, this option allows the driver to use gamma ramps with more entries, if supported by the kernel. by default, GAMMA_LUT will be used for kms drivers which are known to be safe for use of GAMMA_LUT.
bestie reminder: that ZaphodHeads thing means ALL instances or none. don't be out here doing half a job πŸ’€

🌈 SEE ALSO 🌈

Xorg(1), xorg.conf(5), Xserver(1), X(7) β€” go read these too, they're giving required reading πŸ“šβœ¨


🫢 AUTHORS 🫢

Authors include: Dave Airlie β€” ty for your service king πŸ‘‘


and that's the whole page bestie!! this came from X Version 11, xorg-server 21.1.25, and it's the MODESETTING(4) page, so if you're reading this you're on the right doc. mwah πŸ’‹ go configure something gorgeous πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from
  • alpine 3.24: xorg-server-doc 21.1.25-r0 Β· MIT
  • arch rolling: xorg-server 21.1.25-2 Β· LicenseRef-Adobe-Display-PostScript AND BSD-3-Clause AND LicenseRef-DEC-3-Clause AND HPND AND LicenseRef-HPND-sell-MIT-disclaimer-xserver AND HPND-sell-variant AND ICU AND ISC AND MIT AND MIT-open-group AND NTP AND SGI-B-2.0 AND SMLNJ AND X11 AND X11-distribute-modifications-variant
  • fedora 43: xorg-x11-server-Xorg 21.1.25-2.fc43 Β· Adobe-Display-PostScript AND BSD-3-Clause AND DEC-3-Clause AND HPND AND HPND-sell-MIT-disclaimer-xserver AND HPND-sell-variant AND ICU AND ISC AND MIT AND MIT-open-group AND NTP AND SGI-B-2.0 AND SMLNJ AND X11 AND X11-distribute-modifications-variant
  • fedora 44: xorg-x11-server-Xorg 21.1.25-2.fc44 Β· Adobe-Display-PostScript AND BSD-3-Clause AND DEC-3-Clause AND HPND AND HPND-sell-MIT-disclaimer-xserver AND HPND-sell-variant AND ICU AND ISC AND MIT AND MIT-open-group AND NTP AND SGI-B-2.0 AND SMLNJ AND X11 AND X11-distribute-modifications-variant
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms