Linux no mode setting

Why do I need to replace «quiet splash» with «nomodeset»? [duplicate]

Generally you do not want nomodeset as permanent boot parameter. Its just needed until you install the nVidia proprietary driver from the Ubuntu repository (not directly from nVidia). See askubuntu.com/questions/61396/…

1 Answer 1

Short answers for your questions:

1) The option nomodeset means do not load video drivers.

2) Install suitable video drivers or read second option of long answer

1) nomodeset

The newest kernels have moved the video mode setting into the kernel. So all the programming of the hardware specific clock rates and registers on the video card happen in the kernel rather than in the X driver when the X server starts.. This makes it possible to have high resolution nice looking splash (boot) screens and flicker free transitions from boot splash to login screen. Unfortunately, on some cards this doesnt work properly and you end up with a black screen. Adding the nomodeset parameter instructs the kernel to not load video drivers and use BIOS modes instead until X is loaded.

Note that this option is sometimes needed for nVidia cards when using the default «nouveau» drivers. Installing proprietary nvidia drivers usually makes this option no longer necessary, so it may not be needed to make this option permanent, just for one boot until you installed the nvidia

quiet

This option tells the kernel to NOT produce any output (a.k.a. Non verbose mode). If you boot without this option, you’ll see lots of kernel messages such as drivers/modules activations, filesystem checks and errors. Not having the quiet parameter may be useful when you need to find an

splash

This option is used to start an eye-candy «loading» screen while all the core parts of the system are loaded in the background. If you disable it and have quiet enable you’ll get a blank screen.

2) To find drivers in Ubuntu, open the menu, type Drivers, and select Additional Drivers. Upon opening, the system will run a quick scan. This will find out if your system has hardware that would benefit from having proprietary drivers installed. It is here that you will find proprietary drivers.

enter image description here

How to permanently set kernel boot options on an installed OS?

Press Ctrl + Alt + T and type:

sudo gedit /etc/default/grub 

A text editor will open with the grub configuration file. Near the top of that file you will see something very similar to this:

GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" 

add your custom boot options to the GRUB_CMDLINE_LINUX_DEFAULT line, so for instance:

GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset" GRUB_CMDLINE_LINUX="" 

Источник

Kernel mode setting

Kernel Mode Setting (KMS) is a method for setting display resolution and depth in the kernel space rather than user space.

Читайте также:  Ps2 emulator for linux

The Linux kernel’s implementation of KMS enables native resolution in the framebuffer and allows for instant console (tty) switching. KMS also enables newer technologies (such as DRI2) which will help reduce artifacts and increase 3D performance, even kernel space power-saving.

Note: The proprietary NVIDIA driver (since 364.12) also implements kernel mode-setting, but it does not use the built-in kernel implementation and it lacks an fbdev driver for the high-resolution console.

Background

Previously, setting up the video card was the job of the X server. Because of this, it was not easily possible to have fancy graphics in virtual consoles. Also, each time a switch from X to a virtual console was made ( Ctrl+Alt+F2 ), the server had to give control over the video card to the kernel, which was slow and caused flickering. The same «painful» process happened when the control was given back to the X server ( Alt+F7 when X runs in VT7).

With Kernel Mode Setting (KMS), the kernel is now able to set the mode of the video card. This makes fancy graphics during bootup, virtual console and X fast switching possible, among other things.

Installation

The factual accuracy of this article or section is disputed.

Reason: Since mkinitcpio v32, the kms hook is included by default, therefore most setups will have early loading enabled by default. (Discuss in Talk:Kernel mode setting#kms hook is now included by default)

At first, note that for any method you use, you should always disable:

  • Any vga= options in your bootloader as these will conflict with the native resolution enabled by KMS.
  • Any video= lines that enable a framebuffer that conflicts with the driver.
  • Any other framebuffer drivers (such as uvesafb).

Late KMS start

Intel, Nouveau, ATI and AMDGPU drivers already enable KMS automatically for all chipsets, so you need not install it manually.

The proprietary NVIDIA driver supports KMS (since 364.12), which has to be manually enabled.

Early KMS start

KMS is typically initialized after the initramfs stage. However, it is possible to enable KMS already during the initramfs stage. Add the required module for the video driver to the initramfs configuration file:

  • amdgpu for AMDGPU, or radeon when using the legacy ATI driver.
  • i915 for Intel graphics.
  • nouveau for the open-source Nouveau driver.
  • nvidia nvidia_modeset nvidia_uvm nvidia_drm for the out-of-tree nvidia and nvidia-open drivers. See NVIDIA#DRM kernel mode setting for details.
  • mgag200 for Matrox graphics.
  • Depending on QEMU graphics in use (qemu option -vga type or libvirttype‘>[1]):
    • bochs for std (qemu) and vga / bochs (libvirt),
    • virtio-gpu for virtio ,
    • qxl for qxl ,
    • vmwgfx for vmware (qemu) and vmvga (libvirt),
    • cirrus for cirrus .
    • vmwgfx for VMSVGA,
    • vboxvideo for VBoxVGA or VBoxSVGA.

    Initramfs configuration instructions are slightly different depending on the initramfs generator you use.

    mkinitcpio

    For in-tree modules, add kms to the HOOKS array in /etc/mkinitcpio.conf .

    For out-of-tree modules, place the module names in the MODULES array. For example, to enable early KMS for the NVIDIA graphics driver:

    MODULES=(. nvidia nvidia_modeset nvidia_uvm nvidia_drm . )

    Note: If you use PRIME Graphics Processing Unit (GPU) with Intel Integrated Graphics Processors (IGP) being your primary GPU and AMD as the discrete one, intel_agp may lead to troubles when resuming from hibernation (monitor gets no signal). See [2] for details.

    If you are using the #Forcing modes and EDID method, you should embed the custom file into initramfs as well:

    FILES=(/usr/lib/firmware/edid/your_edid.bin)

    Booster

    If you use Booster, you can load required modules with this config change:

    If you are using the #Forcing modes and EDID method, you should embed the custom file into your booster images as well:

    extra_files: /usr/lib/firmware/edid/your_edid.bin

    Troubleshooting

    My fonts are too tiny

    See Linux console#Fonts for how to change your console font to a large font. The Terminus font ( terminus-font ) is available in many sizes, such as ter-132b which is larger.

    Alternatively, disabling modesetting might switch to lower resolution and make fonts appear larger.

    Problem upon bootloading and dmesg

    This article or section is out of date.

    Reason: This section was added in 2011 and 2012. Is it still relevant a decade later? (Discuss in Talk:Kernel mode setting)

    Polling for connected display devices on older systems can be quite expensive. Poll will happen periodically and can in worst cases take several hundred milliseconds, depending on the hardware. This will cause visible stalls, for example in video playback. These stalls might happen even when your video is output to a HDP (Hardware Debug Port), but you have other non HDP outputs in your hardware configuration. If you experience stalls in display output occurring every 10 seconds, disabling polling might help.

    If you see an error code of 0x00000010 (2) while booting up, (you will get about 10 lines of text, the last part denoting that error code), use:

    options drm_kms_helper poll=0

    Forcing modes and EDID

    If your native resolution is not automatically configured or no display at all is detected, then your monitor might send none or just a skewed EDID file. The kernel will try to catch this case and will set one of the most typical resolutions.

    In case you have the EDID file for your monitor, you merely need to explicitly enforce it (see below). However, most often one does not have direct access to a sane file and it is necessary to either extract an existing one and fix it or to generate a new one.

    Generating new EDID binaries for various resolutions and configurations is possible during kernel compilation by following the upstream documentation (also see here for a short guide). Other solutions are outlined in details in this article. Extracting an existing one is in most cases easier, e.g. if your monitor works fine under Windows, you might have luck extracting the EDID from the corresponding driver, or if a similar monitor works which has the same settings, you may use get-edid from the read-edid package. You can also try looking in /sys/class/drm/*/edid .

    After having prepared your EDID, place it in a directory, e.g. called edid under /usr/lib/firmware and copy your binary into it.

    To load it at boot, specify the following in the kernel command line:

    drm.edid_firmware=edid/your_edid.bin

    For kernels older than 4.13, use this line instead:

    drm_kms_helper.edid_firmware=edid/your_edid.bin

    In order to apply it only to a specific connector, use:

    drm.edid_firmware=VGA-1:edid/your_edid.bin

    If you want to set multiple edid files, use:

    drm.edid_firmware=VGA-1:edid/your_edid.bin,VGA-2:edid/your_other_edid.bin

    For the built-in resolutions, refer to the table below. The Name column specifies the name which one is supposed to use in order to enforce its usage.

    Resolution Name
    800×600 edid/800×600.bin
    1024×768 edid/1024×768.bin
    1280×1024 edid/1280×1024.bin
    1600×1200 (kernel 3.10 or higher) edid/1600×1200.bin
    1680×1050 edid/1680×1050.bin
    1920×1080 edid/1920×1080.bin

    If you are doing early KMS, you must include the custom EDID file in the initramfs, otherwise you will run into problems.

    The value of the drm.edid_firmware parameter may also be altered after boot by writing to /sys/module/drm/parameters/edid_firmware :

    # echo edid/your_edid.bin > /sys/module/drm/parameters/edid_firmware

    This will only take affect for newly plugged in displays, already plugged-in screens will continue to use their existing EDID settings. For external displays, replugging them is sufficient to see the effect however.

    Since kernel 3.15, to load an EDID after boot, you can use debugfs instead of a kernel command line parameter if the kernel is not in lockdown mode. This is very useful if you swap the monitors on a connector or just for testing. Once you have an EDID file as above, run:

    # cat correct-edid.bin > /sys/kernel/debug/dri/0/HDMI-A-2/edid_override
    # echo -n reset > /sys/kernel/debug/dri/0/HDMI-A-2/edid_override

    Forcing modes

    Warning: The method described below is somehow incomplete because e.g. Xorg does not take into account the resolution specified, so users are encouraged to use the method described above. However, specifying resolution with video= command line may be useful in some scenarios.

    • : Connector, e.g. DVI-I-1, see /sys/class/drm/ for available connectors
    • x : resolution
    • M : compute a CVT mode?
    • R : reduced blanking?
    • — : color depth
    • @ : refresh rate
    • i : interlaced (non-CVT mode)
    • m : margins?
    • e : output forced to on
    • d : output forced to off
    • D : digital output forced to on (e.g. DVI-I connector)

    You can override the modes of several outputs using video= several times, for instance, to force DVI to 1024×768 at 85 Hz and TV-out off:

    video=DVI-I-1:1024x768@85 video=TV-1:d

    To get the name and current status of connectors, you can use the following shell oneliner:

    $ for p in /sys/class/drm/*/status; do con=$; echo -n "$: "; cat $p; done
    DVI-I-1: connected HDMI-A-1: disconnected VGA-1: disconnected

    Disabling modesetting

    You may want to disable KMS for various reasons. To disable KMS, add nomodeset as a kernel parameter. See Kernel parameters for more info.

    Along with the nomodeset kernel parameter, for an Intel graphics card, you need to add i915.modeset=0 , and for an Nvidia graphics card, you need to add nouveau.modeset=0 . For Nvidia Optimus dual-graphics system, you need to add all the three kernel parameters (i.e. «nomodeset i915.modeset=0 nouveau.modeset=0» ).

    Note: Some Xorg drivers will not work with KMS disabled. See the wiki page on your specific driver for details.

    Источник

Оцените статью
Adblock
detector