This commit is contained in:
nnduc
2026-09-25 14:35:35 +07:00
parent 55cb16f74c
commit b2b943f666
8 changed files with 85 additions and 22 deletions
+45 -4
View File
@@ -34,6 +34,47 @@ Section "Device"
Option "TearFree" "true"
EndSection
```
- amd: xf86-video-amdgpu (`VariableRefresh` = FreeSync, fullscreen apps only under Xorg)
- sudo -e /etc/X11/xorg.conf.d/20-amdgpu.conf
```
Section "Device"
Identifier "AMD"
Driver "amdgpu"
Option "VariableRefresh" "true"
Option "TearFree" "true"
EndSection
```
## High refresh rate flicker (AMD):
- At high refresh rates (240Hz+) the vblank can be too short for the GPU to
switch VRAM clock unnoticed, so the desktop flickers under changing load.
Windows avoids it by keeping VRAM clock high; amdgpu on Linux may not.
- Check: if the `*` jumps between levels while idle, this is likely the cause.
```bash
watch -n0.2 cat /sys/class/drm/card*/device/pp_dpm_mclk
```
- Fix 1: run the desktop at a lower rate (`i3/config` uses 120Hz). Find the
output name with `xrandr` (e.g. `DisplayPort-0`) and adjust it there:
```bash
xrandr --output DisplayPort-0 --mode 1920x1080 --rate 120
```
- sway: same idea in `sway/config` (`swaymsg -t get_outputs` for the name).
Keep `adaptive_sync off` there — sway applies it to the whole desktop, which
can stutter/flicker:
```
output DP-1 mode 1920x1080@120Hz adaptive_sync off
```
- Fix 2: keep the high rate and pin VRAM clock to its top level (more idle
power, resets on reboot; top level is the last line of `pp_dpm_mclk`):
```bash
echo manual | sudo tee /sys/class/drm/card*/device/power_dpm_force_performance_level
echo 3 | sudo tee /sys/class/drm/card*/device/pp_dpm_mclk
```
- Gaming: 120Hz + FreeSync is plenty for ~60fps games (VRR covers the dips).
Cap fps a few below max refresh so VRR stays active, e.g. Dota 2 console
`fps_max 117`. Under Xorg, VRR applies to fullscreen games only; under sway
with `adaptive_sync off` games run without it.
- To turn off FreeSync for a single game (Xorg): `adaptive_sync=false %command%`
(Steam launch options).
![stones](./screenshots/Screenshot_20240503_095414.png)
## Installing dependencies
@@ -49,8 +90,8 @@ or manual/cargo install.
```bash
sudo pacman -S i3-wm i3status i3blocks sway swaybg swaylock swayidle \
waybar polybar rofi alacritty dex snixembed \
xss-lock xorg-xset xclip scrot imagemagick i3lock \
network-manager-applet blueman gnome-keyring \
xss-lock xorg-xset xorg-xrandr xclip scrot imagemagick i3lock \
network-manager-applet blueman gnome-keyring polkit-gnome \
pipewire wireplumber pipewire-pulse pipewire-alsa pipewire-jack \
pasystray playerctl brightnessctl \
fcitx5 fcitx5-im fcitx5-configtool
@@ -63,10 +104,10 @@ sudo emerge --ask \
gui-wm/sway gui-apps/swaybg gui-apps/swaylock gui-apps/swayidle \
gui-apps/waybar x11-misc/polybar x11-misc/rofi x11-terms/alacritty \
x11-misc/dex x11-misc/snixembed \
x11-misc/xss-lock x11-apps/xset x11-misc/xclip media-gfx/scrot \
x11-misc/xss-lock x11-apps/xset x11-apps/xrandr x11-misc/xclip media-gfx/scrot \
media-gfx/imagemagick x11-misc/i3lock \
net-misc/networkmanager net-misc/network-manager-applet net-wireless/blueman \
app-crypt/gnome-keyring \
app-crypt/gnome-keyring gnome-extra/polkit-gnome \
media-video/pipewire media-video/wireplumber media-sound/playerctl \
app-i18n/fcitx app-i18n/fcitx-qt app-i18n/fcitx-gtk
```