2

I have a rough idea what KMS setting is:

Kernel mode-setting (KMS) shifts responsibility for selecting and setting up the
graphics mode from X.org to the kernel. When X.org is started, it then detects
and uses the mode without any further mode changes. This promises to make 
booting faster, more graphical, and less flickery.

and I gather that nomodeset turns this off (I have not selected that), presumably shifting responsibility back to the graphics card module?

When I do cat /sys/module/i915/parameters/modeset I get -1, what does that mean exactly?

Examing

 modinfo i915 | grep modeset
parm:           modeset:Use kernel modesetting [KMS] (0=DRM_I915_KMS from 
.config, 1=on, -1=force vga console preference [default]) (int)

So looks like it means "force vga console preference", whatever that means...

fpghost
  • 1,659
  • 4
  • 24
  • 35

1 Answers1

4

The documentations for most module parameters is accessible from modinfo (lines wrapped for readability):

$ modinfo i915 | grep modeset
parm:           modeset:Use kernel modesetting [KMS] (0=DRM_I915_KMS from
                .config, 1=on, -1=force vga console preference [default]) (int)

Reading through the Linux source code, it seems that the -1 setting ("force vga console preference") depends on the nomodeset option. That is, if the nomodeset option is present, it acts like i915.modeset=0. Otherwise, if nomodeset is omitted, it is treated as if i915.modeset=1 is set.


Code path:

  • drivers/gpu/drm/i915/i915_drv.c (disables modeset if text console mode is forced):

    if (vgacon_text_force() && i915_modeset == -1)
        driver.driver_features &= ~DRIVER_MODESET;
    
  • video/console/vgacon.c:

    static int vgacon_text_mode_force;
    
    bool vgacon_text_force(void)
    {
        return vgacon_text_mode_force ? true : false;
    }
    
  • (same file):

    static int __init text_mode(char *str)
    {
        vgacon_text_mode_force = 1;
        return 1;
    }
    
  • (same file, set through the kernel cmdline):

    /* force text mode - used by kernel modesetting */
    __setup("nomodeset", text_mode);
    
Lekensteyn
  • 178,446