linux - 使用 KMS 设置控制台视频分辨率

标签 linux

我搜索了 Google 结果,这似乎是不可能的,所以:有人知道如何使用 KMS 在控制台中更改或设置特定的视频分辨率吗?

我没有使用任何图形服务器或图形子系统,所以这个问题只与控制台有关。

我使用的是带有 Intel 视频卡的 Arch box、启用了 KMS 的 KMS 驱动程序、gummiboot(用于 UEFI 启动过程)并且所有配置都正确。

我们将不胜感激。

最佳答案

尝试将 video=800x600@75(或您需要的分辨率)添加到/etc/default/grub GRUB_CMDLINE_LINUX 或 GRUB_CMDLINE_LINUX_DEFAULT 参数。 就我而言: GRUB_CMDLINE_LINUX_DEFAULT="安静视频=1152x864@75" 并更新 grub2 配置(Debian 中的 update-grub,Fedora/CentOS/RHEL 中的 grub2-mkconfig >/boot/grub2/grub.cfg(来自 root 用户))。 如果使用 grub-legacy,只需将 video=800x600@75 添加到/boot/grub/menu.lst 中的内核选项:

title  Arch Linux  
root   (hd0,0)  
kernel /boot/vmlinuz26 root=/dev/sda1 ro video=800x600@75  
initrd /boot/kernel26.img

在这里找到答案:Changing console resolution on systems with KMS (Kernel Mode Setting)

对于 gummiboot(现在是 systemd-boot),您需要在 EFI 系统分区上编辑/loader/entries/arch.conf。
esp/loader/entries/arch.conf:

title   Arch Linux  
linux   /vmlinuz-linux  
initrd  /intel-ucode.img  
initrd  /initramfs-linux.img  
options root=LABEL=arch_os rw video=800x600@75

systemd-boot - ArchWiki

关于linux - 使用 KMS 设置控制台视频分辨率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29128439/

相关文章:

linux - 安装 GCC 及其所有依赖项

linux - 如何删除 root 拥有的名称中包含空格的文件?

linux - 在不使用循环的情况下使用 bash 在终端中显示运行时钟

python - imshow 中的 OpenCV 错误 : Assertion failed (size. width>0 && size.height>0)

linux - "the kernel address space"是什么?

c - 将代码/符号修补到动态链接的 ELF 二进制文件中

linux - 我可以假设安装了 bash

linux - 如何 tar 最近的 n 个文件

linux - 文件中每一行的 bash 脚本 : how to move a string before . <dot>

c - 为什么它在 dirent.h 中说 "We must not include limits.h!"?