You are not logged in.

#1 2023-12-13 16:04:55

Hamza193
Member
Registered: 2023-11-11
Posts: 8

change refressh rate on battery/power mode

this is the model of my laptop :
asus rog strix g15 (2022), amd ryzen 9 6900hx, rtx 3070ti, 2k 165hz screen and a physical mux switch
my arch setup uses the kde plasma desktop environnement
i have already installed the asusctl and rog-control-center (both from aur) and they come with many features but they don(t have the feature to change the screen refresh rate between 60hz and 165hz when switching from battery mode and plugged in mode,
i know that there is an option in the settings of plasma but it doesn't seem to work and there isn't a solution to that problem online
is there anyone who found a solution to the problem i have or has a hint, thank you in advance

Offline

#2 2023-12-13 18:08:17

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,763
Website

Re: change refressh rate on battery/power mode

Sounds like a job for a udev rule: https://superuser.com/questions/1417292 … plug-event

But it will only work if your power_supply environment includes POWER_SUPPLY_ONLINE (mine doesn't) and you will have to write a script to change the refresh rate in Plasma. I use sway and I can do that with swaymsg but I don't use Plasma.

Offline

#3 2023-12-14 08:23:03

Hamza193
Member
Registered: 2023-11-11
Posts: 8

Re: change refressh rate on battery/power mode

thanks you for this this suggestion , but do you have any idea how to write a script that changes the refresh rate?

EDIT :
i use xorg as a display server and i found how to change the refresh rate with the command line with xrandr  https://wiki.archlinux.org/title/Xrandr
and when it comes to running commands when the power mode is changed, it is available from the settings that come with plasma

Last edited by Hamza193 (2023-12-14 08:58:06)

Offline

#4 2023-12-14 09:54:46

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,763
Website

Re: change refressh rate on battery/power mode

For sway I would use something like

swaymsg 'output * mode 1920x1200@60.005Hz'

With another line for the switch back to 165Hz.

EDIT: hold on, it's not that simple (unlike me). The udev rule will run as root but the script has to run for your normal user.

Last edited by Head_on_a_Stick (2023-12-14 12:46:34)

Offline

Board footer

Powered by FluxBB