Linux drm设置默认分辨率,Wayland如何设置自定义分辨率

本文介绍如何在Wayland显示服务器上设置自定义分辨率。通过使用edid-generator和modeline2edid工具,用户可以创建所需的EDID文件,并通过编辑grub配置使其生效。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

您可以尝试通过Wayland设置自定义分辨率,这需要一定的努力和不同的结果。

您可能应该首先针对Wayland提交错误报告,包括图形卡和显示器。

添加自定义分辨率

xrandr will NOT work with Wayland !!

您可以尝试使用modline添加自定义分辨率,类似于使用xrandr的方法,但是需要一些额外步骤。

首先,我不确定这是否适用于安全启动,因此建议您先禁用安全启动

First, you'll need to clone edid-generator. Then you can pass it your modeline (with the same arguments you gave xrandr --newmode

安装要求

sudo apt install zsh edid-decode automake dos2unix

下载并解压缩

wget https://github.com/akatrevorjay/edid-generator/archive/master.zip

unzip master.zip

cd edid-generator-master

The binary is in ~/edid-generator-master as modeline2edid

Run modeline2edid with your modline, using the example in askfedora link,

./modeline2edid - <<< 'Modeline "3840x2160" 533.6 3840 3982 4027 4064 2160 2170 2180 2190 +hsync +vsync'

Searching for runaway unicorns in '/dev/stdin'

-- Found naughty unicorn: Modeline "3840x2160" 533.6 3840 3982 4027 4064 2160 2170 2180 2190 +hsync +vsync

Wrote 3840x2160.S

将该命令修改为所需的分辨率。

然后用make生成edid二进制文件

make #output not posted

You will now have your new .bin , 3840x2160.bin in this case.

Now, from The Arch wiki enable your custom resoulution

sudo mkdir /usr/lib/firmware/edid

sudo cp 3840x2160.bin /usr/lib/firmware/edid

Change 3840x2160.bin to your custom resolution.

Note: There are already some custom .bin included, you can see them with ls *.bin I am not sure if you can use them without make or not.

通过重启进行测试

重新启动后,在grub中编辑内核行,添加

drm_kms_helper.edid_firmware=edid/3840x2160.bin

Go down to the line starting with linux and add drm_kms_helper.edid_firmware=edid/3840x2160.bin at the end of the line after ro quiet splash

假设一切正常,将其永久化

sudo nano /etc/default/grub

添加自定义分辨率

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash drm_kms_helper.edid_firmware=edid/3840x2160.bin"

保存编辑内容Ctrl + x

更新grub

sudo update-grub

重新启动并享受您的自定义分辨率

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值