Set video resolution and refresh rate at boot?

Paul pb.g at gmx.de
Fri Aug 27 06:55:02 UTC 2021



Am 26.08.21 um 18:45 schrieb Alex Deucher:
> On Thu, Aug 26, 2021 at 12:35 PM Paul<pb.g at gmx.de>  wrote:
>> Hi there
>>
>> Out of curiosity I would like to ask if it is possible to set a kernel command line parameter for my Radeon 6900XT
>> that sets a specific resolution and refresh rate of a specific connected monitor.
>>
>> Ideally this parameter is set to the monitors used desktop (X11, Wayland) resolution/refreshrate.
>>
>> I did this for years with my Intel IGP's. I appended:
>>
>> video=HDMI-A-1:1920x1080 at 50
>>
>> to the kernel command line. This worked beautifully and the result was my monitor was preconfigured to a specific resolution and refresh
>> rate from the first lines of the kernel to the desktop (X11) and it did not had to switch to anything else in between.
>>
>> Another nice side effect is when in X11 one switches to the console, or vice versa, via STRG+Fx, pretty much everyone has this annoying delay because
>> the monitor has to switch between refresh rates again. With that preconfigured settings at boot this gave a very satisfying feeling, especially if one frequently
>> switches between console and X11 (or wayland maybe).
>>
>> Is this kind of parameter implemented in the kernel/amdgpu driver?
> It works the same for all drivers.  Just make sure the connector name
> is correct.
>
> Alex

Thank you, it works.
I just want to mention that I had to look in "/sys/class/drm/" for the
correct connector naming. Connector names shown by xrandr are different:

ls /sys/class/drm/ | grep card0-
card0-DP-1             # DP-1
card0-DP-2             # DP-2
card0-DP-3             # DP-3
card0-HDMI-A-1     # HDMI-A-1

vs.

xrandr | grep connected | awk '{print $1}'
DisplayPort-0
DisplayPort-1
DisplayPort-2
HDMI-A-0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210827/b8187a12/attachment.htm>


More information about the amd-gfx mailing list