Understanding nvidia-drm.modeset=1 (NVIDIA Linux driver modesetting)

(Talking about x86 here, keep in mind other arches exist)
The console/VT is still the old linux framebuffer console (fbcon)
https://www.kernel.org/doc/html/latest/fb/fbcon.html
which runs on a simple framebuffer device (fbdev).
The fbdev would usually be provided by the bios’ vga or efi framebuffer (over some in-kernel fb driver).
DRM drivers have the possibility to provide a drm based fbdev emulation, like in i915:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/i915/display/intel_fbdev.c?h=v5.17-rc5
Which can be turned on/off by CONFIG_DRM_FBDEV_EMULATION=y
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/i915/display/intel_fbdev.h?h=v5.17-rc5
NB: the kconfig setting does not provide a general drm fbdev emulation but only enables it in the gpu specific drm driver, if available. You’ll then see in dmesg:

fb0: switching to inteldrmfb from EFI VGA

The nvidia drm driver does not provide a drm fbdev emulation so the fbcon will stay on e.g. efifb.
In general, there are more-or-less ongoing works/rfcs over the past decade or so to get rid of fbdev/fbcon/CONFIG_VT altogether and replace them with something drm only. Some recent discussion, which provides a good insight:
https://patchwork.kernel.org/project/linux-fbdev/cover/20210827100027.1577561-1-javierm@redhat.com/#24417083

simpledrm is rather the opposite of this, it provides a minimal drm driver running on the bios provided framebuffer (EFI/VGA) to have a fallback driver for wayland in case no gpu specific drm driver is available. See it as a vesa driver for wayland.

1 Like