Linux set console resolution

Setting the resolution or character size for boot and text consoles on SLE 12 and newer

This document (7017979) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server or Desktop versions 12 and newer.

Situation

The auto-detected text based resolution during boot and at text consoles (terminal/tty1-6) may not be optimal and needs to be changed.

Resolution

Grub2 provides settings for the initial screen resolution. A kernel parameter can also be added for the KMS (kernel mode setting) resolution. If the auto-detection of the native resolution is not correct it would be appropriate to use both of these settings (grub2 and kernel parameter).

Both the grub2 settings and the kernel parameter can be added to the grub2 boot loader configuration. Follow these steps as the root user to make the changes:

Locate this line:
GRUB_GFXMODE=auto
Change it to the desired resolution. Lets use an example of 1280×1024:
GRUB_GFXMODE=1280×1024

Look for this entry. If it doesn’t exist add it under the GRUB_GFXMODE setting:
GRUB_GFXPAYLOAD=keep

For the kernel parameter locate the line that begins with:
GRUB_CMDLINE_LINUX_DEFAULT=
Go to the end of that line and add this entry (again using 1280×1024 as an example):
video=1280×1024
The full line would look similar to this:

GRUB_CMDLINE_LINUX_DEFAULT=»resume=/dev/disk/by-uuid/0e618837-2b33-4ed1-ba0d-ec8b1dfad196 splash=silent quiet showopts crashkernel=97M,high crashkernel=72M,low video=1280×1024″

Save the file then run the following command to write the changes to the grub2 bootloader configuration:

Читайте также:  Linux what is sport and sport

grub2-mkconfig -o /boot/grub2/grub.cfg

Reboot the system to have the changes take effect.

Cause

Additional Information

For systems that are also running a graphic desktop these settings should have no affect on the graphic resolution.

In some cases KMS being enabled causes trouble with the graphic desktop. This is common in VM’s and in situations where the hardware is not properly detected for some reason. This may result in adding the kernel parameter «nomodeset» which disables the kernel KMS. In that case the kernel parameter mentioned above «video=1280×1024» (or whatever the desired resolution is) should not be added. KMS is already disabled and will not change the resolution set by the GRUB_GFXMODE setting.

For those that are familiar with the «vga=» parameter used in earlier kernel versions, this setting is depreciated and should no longer be used. It will still work if KMS is disabled but is no longer the preferred method and will be removed eventually.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented «AS IS» WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7017979
  • Creation Date: 24-Aug-2016
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

    For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

    Источник

    🐧 Как изменить разрешение консоли в Linux

    Чтобы изменить разрешение консоли, выполните следующие действия:

    1. Определите доступные разрешения

    Для этого в меню GRUB нажмите «c»

    В приглашении GRUB введите:

    grub> set pager=1 grub> videoinfo
    GRUB_GFXMODE= GRUB_GFXPAYLOAD_LINUX=keep

    3. Подтвердите конфигурацию GRUB

    Выполните следующую команду:

    itisgood
    🐧 Как скопировать и вставить текстовый контент из терминала Linux
    🐧 Невозможно войти через GUI на CentOS / RHEL

    You may also like

    🐧 Сравнение команд Printf и Echo на Linux

    🐧 Что означает -z на Bash

    🐧 Примеры команд size на Linux

    🐧 Linux_Logo – вывод ASCII логотипа Linux с.

    🐧 Параметры конфигурационного файла Apt /etc/apt/apt.conf

    🐧 Разница между выключением, перезагрузкой и остановкой Linux

    ⌨️ Введение в команду “./configure”: Компиляция исходного кода.

    🐧 Что такое /dev/zero на Linux?

    Каковы лучшие дистрибутивы Linux в 2022 году

    🐧 Работа с переменной PATH на Linux. Это.

    Leave a Comment Cancel Reply

    • Свежие записи

    • Категории

    • Теги

    • itsecforu.ru

    • Страны посетителей

    IT is good

    В мире компьютерных игр Steam, платформа разработанная компанией Valve, является одной из самых популярных и широко используемых. Она предоставляет огромный выбор игр для…

    В этой статье вы узнаете, как удалить удаленный Git-репозиторий. Процесс прост, но его полезно запомнить, чтобы избежать неожиданностей в будущем. Git – это…

    В 11-й версии своей операционной системы Microsoft серьезно переработала интерфейс и убрала несколько привычных функций. Нововведения не всем пришлись по душе. Мы дадим…

    Продажа ноутбука нередко становится хлопотным занятием. Кроме поиска покупателя, продавцу необходимо подготовить устройство перед проведением сделки. Но если последовательно выполнить все шаги, ничего…

    Вы можете оказаться в ситуации, когда вам нужно использовать скрипт шелла для чтения файлов построчно. В этом руководстве я расскажу о нескольких способах…

    Источник

    How to set the resolution in text consoles (troubleshoot when any `vga=. ` fails)

    It is a common way to set the resolution of a text consoles (that are usually available by Ctrl-Alt-F1 thru Ctrl-Alt-F6) by using a vga=. kernel parameter. I’m using Ubuntu 10.04 Lucid, output of uname -a is:

    Linux 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011 x86_64 GNU/Linux 
    02: None 00.0: 11001 VESA Framebuffer [Created at bios.464] Unique ID: rdCR.R1b4duaxSqA Hardware Class: framebuffer Model: "NVIDIA G73 Board - p456h1 " Vendor: "NVIDIA Corporation" Device: "G73 Board - p456h1 " SubVendor: "NVIDIA" SubDevice: Revision: "Chip Rev" Memory Size: 256 MB Memory Range: 0xc0000000-0xcfffffff (rw) Mode 0x0300: 640x400 (+640), 8 bits Mode 0x0301: 640x480 (+640), 8 bits Mode 0x0303: 800x600 (+800), 8 bits Mode 0x0305: 1024x768 (+1024), 8 bits Mode 0x0307: 1280x1024 (+1280), 8 bits Mode 0x030e: 320x200 (+640), 16 bits Mode 0x030f: 320x200 (+1280), 24 bits Mode 0x0311: 640x480 (+1280), 16 bits Mode 0x0312: 640x480 (+2560), 24 bits Mode 0x0314: 800x600 (+1600), 16 bits Mode 0x0315: 800x600 (+3200), 24 bits Mode 0x0317: 1024x768 (+2048), 16 bits Mode 0x0318: 1024x768 (+4096), 24 bits Mode 0x031a: 1280x1024 (+2560), 16 bits Mode 0x031b: 1280x1024 (+5120), 24 bits Mode 0x0330: 320x200 (+320), 8 bits Mode 0x0331: 320x400 (+320), 8 bits Mode 0x0332: 320x400 (+640), 16 bits Mode 0x0333: 320x400 (+1280), 24 bits Mode 0x0334: 320x240 (+320), 8 bits Mode 0x0335: 320x240 (+640), 16 bits Mode 0x0336: 320x240 (+1280), 24 bits Mode 0x033d: 640x400 (+1280), 16 bits Mode 0x033e: 640x400 (+2560), 24 bits Config Status: cfg=new, avail=yes, need=no, active=unknown 

    It looks like many hi-res modes are available, like 0x305, 0x307, 0x317, 0x318, 0x31a, 0x31b (by the way, what does the plus-number means in the list of modes?). However, setting any of these modes in kernel option string, line vga=0x305 , results in either pitch black text console, or screen filled by blinking color/bw dots. What is the ‘modern’, ‘robust’ way to set up high resolution in text consoles?

    Источник

    Change Ubuntu Server 18.04 LTS Bionic Console Screen Resolution

    Then you may be stuck as I’ve been, because the solution that used to work on 14.04 and 16.04 doesn’t work on 18.04.

    Problems to solve (goals)

    1. hwinfo —framebuffer gives an empty output -> find another solution
    2. adding the usual lines to /etc/default/grub, only helps at the first stage of the boot. After GRUB2 has done its work, the resolution switches back to a lower value -> resolve this too
    3. exclude xorg based tools like xrandr (this is a server without GUI by default)
    4. increase VT1-7 ( Ctrl + Alt + F1 , F2 — F7 ) resolution in case of Desktop systems with a GUI
    5. set the resolution to 1280×1024

    3 Answers 3

    1. Get supported video mode (use vbeinfo instead of hwinfo)

    • reboot
    • hold down SHIFT after the BIOS/UEFI finished
    • press `c´ for the GRUB command line
    • type set pager=1 , then hit ENTER
    • type vbeinfo , then hit ENTER
    • take a note about the supported video mode you need Mode 0x031b: 1280×1024 (+3840), 24 bits
    • reboot

    2. Modify / add the following lines to /etc/default/grub to match the ones below

    > GRUB_CMDLINE_LINUX_DEFAULT="video=0x0345 gfxpayload=true" > GRUB_CMDLINE_LINUX="video=0x0345 gfxpayload=true" > . > # The resolution used on graphical terminal > # note that you can use only modes which your graphic card supports via VBE > # you can see them in real GRUB with the command `vbeinfo' > GRUB_GFXMODE=1280x1024x24 > GRUB_GFXPAYLOAD=1280x1024x24 > GRUB_GFXPAYLOAD_LINUX=1280x1024x24 

    3. Update GRUB

    Note1: I’ve tested the above solution with Ubuntu 18.04 Server and Desktop on VirtualBox.

    Note2: Didn’t include linux terminal (emulator), putty, cygwin, conemu and other fancy tools, because this is about the bare console.

    None of the sources I used had a complete solution, but putting the parts together, solved the problem for me.

    Источник

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