You are not logged in.

#1 2021-01-29 17:28:22

yucca
Member
Registered: 2020-10-08
Posts: 2

How can I set my screen's refresh rate at boot time?

I am wondering the best place to set my screen refresh rate. It seems that by default Arch is setting me to 60hz whereas my monitor is 165hz resulting in screen tearing. To fix this, I put the following in my `.bash_profile`:

xrandr --output DP-4 --mode 1920x1080 --rate 165.00

However, when I boot my computer and open up terminal for the first time, my screen goes black for a few seconds as it resets itself. Thus, I am looking for to set the refresh rate and whatnot at boot time or at some other convenient time.

Offline

#2 2021-01-29 17:39:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,510
Website

Re: How can I set my screen's refresh rate at boot time?

Ah, bash_profile is completely the wrong place for that.  It will fail completely on a tty, and it will do nothing for Xorg until you open a terminal (as you are seeing).

Do you really need it set at boot, or just when xorg starts?  If the latter, put that command in your xinitrc (or similar X startup file) or make the setting in an Xorg.conf.d file.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2021-01-29 17:40:06

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: How can I set my screen's refresh rate at boot time?

See https://wiki.archlinux.org/index.php/Xorg#Configuration if your super-secret mystery desktop doesn't offer a configuration GUI for the display.

For Wayland you will have to rely on the compositor's configuration options — sway-output(5) for example.

EDIT: drat.

Last edited by Head_on_a_Stick (2021-01-29 17:40:18)


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB