up
This commit is contained in:
@@ -34,4 +34,4 @@ export PATH="$HOME/.local/bin:$PATH"
|
|||||||
|
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
alias doc='docker-compose'
|
alias doc='docker-compose'
|
||||||
|
alias cla='cd /home/nnduc/.cache/ && claude'
|
||||||
|
|||||||
@@ -34,6 +34,47 @@ Section "Device"
|
|||||||
Option "TearFree" "true"
|
Option "TearFree" "true"
|
||||||
EndSection
|
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).
|
||||||

|

|
||||||
|
|
||||||
## Installing dependencies
|
## Installing dependencies
|
||||||
@@ -49,8 +90,8 @@ or manual/cargo install.
|
|||||||
```bash
|
```bash
|
||||||
sudo pacman -S i3-wm i3status i3blocks sway swaybg swaylock swayidle \
|
sudo pacman -S i3-wm i3status i3blocks sway swaybg swaylock swayidle \
|
||||||
waybar polybar rofi alacritty dex snixembed \
|
waybar polybar rofi alacritty dex snixembed \
|
||||||
xss-lock xorg-xset xclip scrot imagemagick i3lock \
|
xss-lock xorg-xset xorg-xrandr xclip scrot imagemagick i3lock \
|
||||||
network-manager-applet blueman gnome-keyring \
|
network-manager-applet blueman gnome-keyring polkit-gnome \
|
||||||
pipewire wireplumber pipewire-pulse pipewire-alsa pipewire-jack \
|
pipewire wireplumber pipewire-pulse pipewire-alsa pipewire-jack \
|
||||||
pasystray playerctl brightnessctl \
|
pasystray playerctl brightnessctl \
|
||||||
fcitx5 fcitx5-im fcitx5-configtool
|
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-wm/sway gui-apps/swaybg gui-apps/swaylock gui-apps/swayidle \
|
||||||
gui-apps/waybar x11-misc/polybar x11-misc/rofi x11-terms/alacritty \
|
gui-apps/waybar x11-misc/polybar x11-misc/rofi x11-terms/alacritty \
|
||||||
x11-misc/dex x11-misc/snixembed \
|
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 \
|
media-gfx/imagemagick x11-misc/i3lock \
|
||||||
net-misc/networkmanager net-misc/network-manager-applet net-wireless/blueman \
|
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 \
|
media-video/pipewire media-video/wireplumber media-sound/playerctl \
|
||||||
app-i18n/fcitx app-i18n/fcitx-qt app-i18n/fcitx-gtk
|
app-i18n/fcitx app-i18n/fcitx-qt app-i18n/fcitx-gtk
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -95,6 +95,9 @@ floating_modifier $mod
|
|||||||
# or left-clicking anywhere into the window while holding the floating modifier.
|
# or left-clicking anywhere into the window while holding the floating modifier.
|
||||||
#tiling_drag modifier titlebar
|
#tiling_drag modifier titlebar
|
||||||
#xrandr --output HDMI-2 --auto --right-of eDP1
|
#xrandr --output HDMI-2 --auto --right-of eDP1
|
||||||
|
# High refresh rates can flicker on AMD (VRAM clock switching), so run the
|
||||||
|
# desktop at 120Hz. See README "High refresh rate flicker".
|
||||||
|
exec --no-startup-id xrandr --output DisplayPort-0 --mode 1920x1080 --rate 120
|
||||||
|
|
||||||
# start a terminal
|
# start a terminal
|
||||||
#bindsym $mod+Return exec i3-sensible-terminal
|
#bindsym $mod+Return exec i3-sensible-terminal
|
||||||
|
|||||||
+14
-1
@@ -52,7 +52,7 @@ vim.keymap.set("n", "<leader>P", '"+P')
|
|||||||
|
|
||||||
-- Background toogling
|
-- Background toogling
|
||||||
vim.keymap.set("n", "<leader>bg", function()
|
vim.keymap.set("n", "<leader>bg", function()
|
||||||
vim.o.background = vim.o.background == "dark" and "light" or "dark"
|
vim.o.background = vim.o.background == "dark" and "light" or "dark"
|
||||||
end, { desc = "Toggle light/dark background" })
|
end, { desc = "Toggle light/dark background" })
|
||||||
|
|
||||||
-- Join paragraph
|
-- Join paragraph
|
||||||
@@ -224,4 +224,17 @@ require("lazy").setup({
|
|||||||
|
|
||||||
-- Julia
|
-- Julia
|
||||||
{ "JuliaEditorSupport/julia-vim" },
|
{ "JuliaEditorSupport/julia-vim" },
|
||||||
|
{
|
||||||
|
dir = "/home/nnduc/git/vim-uk",
|
||||||
|
event = "VeryLazy",
|
||||||
|
build = "cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j",
|
||||||
|
opts = {
|
||||||
|
input_method = "vni",
|
||||||
|
toggle_key = "<leader>v",
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("uknvim").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
+12
-12
@@ -1,20 +1,20 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"coq.artifacts": { "branch": "artifacts", "commit": "ef5f21d638ccc456cfa5b8d0ab37093cefe48c8b" },
|
"coq.artifacts": { "branch": "artifacts", "commit": "d545035d06408f2d68cd03bc401425e42c298fc4" },
|
||||||
"coq.thirdparty": { "branch": "3p", "commit": "2bd969a2bcd2624f9c260b1000957c7e665e308e" },
|
"coq.thirdparty": { "branch": "3p", "commit": "a021e24f1ff538d339aece0de80d621b68862701" },
|
||||||
"coq_nvim": { "branch": "coq", "commit": "d939a34ceb2b57d2937890337a4aa75eb55e18a8" },
|
"coq_nvim": { "branch": "coq", "commit": "df4eb27b425568cea17f01a25a07cf447066ce81" },
|
||||||
"fzf-lua": { "branch": "main", "commit": "d9508cc1d05ffcdc91a32dfd38fc1013a56b20da" },
|
"fzf-lua": { "branch": "main", "commit": "05e44d38de0a79c11fba5f7bf8138791b1dbdd1e" },
|
||||||
"gruvbox.nvim": { "branch": "main", "commit": "334d5fd49fc8033f26408425366c66c6390c57bb" },
|
"gruvbox.nvim": { "branch": "main", "commit": "154eb5ff5b96d0641307113fa385eaf0d36d9796" },
|
||||||
"julia-vim": { "branch": "master", "commit": "52b30547346b21bc93acda28d626795667f9e087" },
|
"julia-vim": { "branch": "master", "commit": "52b30547346b21bc93acda28d626795667f9e087" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
"nvim-autopairs": { "branch": "master", "commit": "430522f95fe4fb7c511ec64f8c1a90cc6a66c05c" },
|
||||||
"nvim-bqf": { "branch": "main", "commit": "f65fba733268ffcf9c5b8ac381287eca7c223422" },
|
"nvim-bqf": { "branch": "main", "commit": "c282a62bec6c0621a1ef5132aa3f4c9fc4dcc2c7" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "0203a9608d63eda57679b01e69f33a7b4c34b0d1" },
|
"nvim-lspconfig": { "branch": "master", "commit": "16286347bdba1333c7d124d9de9fe6630731b2b2" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "4b30847c91d498446cb8440c03031359b045e050" },
|
"nvim-tree.lua": { "branch": "master", "commit": "b2aadda94b107480c48e548d6db51c6840b7b33c" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
"nvim-web-devicons": { "branch": "master", "commit": "5f032a85be210cd1c6ac98861eb3b187ff3bd5eb" },
|
||||||
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" },
|
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" },
|
||||||
"vim-ime": { "branch": "master", "commit": "79e3b02eb50a57305113550be7ca163b267b5e30" },
|
"vim-ime": { "branch": "master", "commit": "79e3b02eb50a57305113550be7ca163b267b5e30" },
|
||||||
"viml-surround": { "branch": "master", "commit": "98358bad347aa2b8a180c2edde84c3bd8a51fdd1" },
|
"viml-surround": { "branch": "master", "commit": "98358bad347aa2b8a180c2edde84c3bd8a51fdd1" },
|
||||||
"vimtex": { "branch": "master", "commit": "82d2305ff71dfb3bd91602534cc9bb9a195bcb38" }
|
"vimtex": { "branch": "master", "commit": "cb81778aee678b513af3de7f1ca5943e7ee31b2f" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ context.properties = {
|
|||||||
core.name = pipewire-0 # core name and socket name
|
core.name = pipewire-0 # core name and socket name
|
||||||
|
|
||||||
## Properties for the DSP configuration.
|
## Properties for the DSP configuration.
|
||||||
#default.clock.rate = 48000
|
default.clock.rate = 48000
|
||||||
#default.clock.allowed-rates = [ 48000 ]
|
#default.clock.allowed-rates = [ 48000 ]
|
||||||
#default.clock.quantum = 1024
|
#default.clock.quantum = 1024
|
||||||
#default.clock.min-quantum = 32
|
#default.clock.min-quantum = 32
|
||||||
|
|||||||
+7
-2
@@ -22,8 +22,8 @@ set $term alacritty
|
|||||||
set $menu rofi -show drun
|
set $menu rofi -show drun
|
||||||
|
|
||||||
# Font for window titles.
|
# Font for window titles.
|
||||||
font pango:NotoSans 12
|
|
||||||
|
|
||||||
|
font pango:DejaVu Sans Mono 8
|
||||||
### Output configuration
|
### Output configuration
|
||||||
#
|
#
|
||||||
set $wallpaper_dir /media/sync/images/wallpapers
|
set $wallpaper_dir /media/sync/images/wallpapers
|
||||||
@@ -36,7 +36,9 @@ exec --no-startup-id ~/.config/sway/scripts/wallpaper-rotate $wallpaper_dir
|
|||||||
#output HDMI-A-1 resolution 1920x1080@120hz position 1920,0
|
#output HDMI-A-1 resolution 1920x1080@120hz position 1920,0
|
||||||
#
|
#
|
||||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||||
output DP-2 adaptive_sync on
|
# adaptive_sync on the desktop makes sway stutter/flicker; 120Hz avoids AMD
|
||||||
|
# VRAM clock flicker at high refresh (see README).
|
||||||
|
output DP-1 mode 1920x1080@120Hz adaptive_sync off allow_tearing yes
|
||||||
|
|
||||||
### Idle configuration
|
### Idle configuration
|
||||||
#
|
#
|
||||||
@@ -80,6 +82,9 @@ exec swayidle -w \
|
|||||||
input "2:7:SynPS/2_Synaptics_TouchPad" {
|
input "2:7:SynPS/2_Synaptics_TouchPad" {
|
||||||
events disabled_on_external_mouse
|
events disabled_on_external_mouse
|
||||||
}
|
}
|
||||||
|
input "type:pointer" {
|
||||||
|
accel_profile "flat" # no mouse acceleration for all pointers
|
||||||
|
}
|
||||||
input "5426:156:Razer_Razer_DeathAdder_V2_X_HyperSpeed_Mouse" {
|
input "5426:156:Razer_Razer_DeathAdder_V2_X_HyperSpeed_Mouse" {
|
||||||
accel_profile "flat" # disable mouse acceleration (enabled by default; to set it manually, use "adaptive" instead of "flat")
|
accel_profile "flat" # disable mouse acceleration (enabled by default; to set it manually, use "adaptive" instead of "flat")
|
||||||
pointer_accel 0.5 # set mouse sensitivity (between -1 and 1)
|
pointer_accel 0.5 # set mouse sensitivity (between -1 and 1)
|
||||||
|
|||||||
+2
-1
@@ -1 +1,2 @@
|
|||||||
set selection-clipboard clipboard
|
set selection-clipboard clipboard
|
||||||
|
set guioptions "sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user