diff --git a/aesthetics/.config/picom.conf b/aesthetics/.config/picom.conf index 8a56ae89..786b8e5d 100644 --- a/aesthetics/.config/picom.conf +++ b/aesthetics/.config/picom.conf @@ -28,7 +28,8 @@ glx-no-rebind-pixmap = true; use-damage = true; # * Tearing -vsync = true; +# https://github.com/yshui/picom/issues/1265 +vsync = false; # don't unredirect all windows when there is an opaque fullscreen window (true # maximizes performance but disables compositing) diff --git a/root/etc/X11/xorg.conf.d/my-xorg.conf b/root/etc/X11/xorg.conf.d/my-xorg.conf index 7408a38c..a42cd4f7 100644 --- a/root/etc/X11/xorg.conf.d/my-xorg.conf +++ b/root/etc/X11/xorg.conf.d/my-xorg.conf @@ -42,3 +42,16 @@ EndSection # * GPU # handled by optimus-manager; not recommended to mess with + +# TODO for now am doing manually; see fixtear script +# https://wiki.archlinux.org/title/NVIDIA/Troubleshooting#Multi-monitor +# fix screen tearing +# only keep screen section +# Section "Screen" +# Identifier "Screen0" +# Device "Device0" +# Monitor "Monitor0" +# Option "ForceFullCompositionPipeline" "on" +# Option "AllowIndirectGLXProtocol" "off" +# Option "TripleBuffer" "on" +# EndSection diff --git a/scripts/bin/fixtear b/scripts/bin/fixtear new file mode 100755 index 00000000..d5af99a4 --- /dev/null +++ b/scripts/bin/fixtear @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# https://wiki.archlinux.org/title/NVIDIA/Troubleshooting#Avoid_screen_tearing +# fixes screen tearing (tested and this works if applied correctly) + +# had to run this with monitor connected then disconnect monitor then reconnect +# just sticking with that because it's easy, otherwise would need to specify +# both displays: +# https://wiki.archlinux.org/title/NVIDIA/Troubleshooting#Multi-monitor +nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }" + +# can validate with: nvidia-settings --query CurrentMetaMode diff --git a/scripts/bin/gpu-switch b/scripts/bin/gpu-switch index b76642de..c91abc40 100755 --- a/scripts/bin/gpu-switch +++ b/scripts/bin/gpu-switch @@ -1,5 +1,7 @@ #!/usr/bin/env bash -# probably won't use this much (will just stay in hybrid mode) +# pretty much only use nvidia mode; too many issues hybrid mode; would use +# integrated only for battery saving +# arg: (integrated|hybrid|nvidia) echo "Run 'sudo prime-switch' after X stops." echo "Press anything to continue" diff --git a/scripts/bin/helpers/xenv.sh b/scripts/bin/helpers/xenv.sh index bed2bc64..e1552212 100644 --- a/scripts/bin/helpers/xenv.sh +++ b/scripts/bin/helpers/xenv.sh @@ -11,6 +11,7 @@ export QT_AUTO_SCREEN_SCALE_FACTOR=1 if monitor_is_hidpi; then export MONITOR_IS_HIDPI=true + export POLYBAR_DPI=192 export QT_ENABLE_HIGHDPI_SCALING=1 @@ -24,6 +25,7 @@ if monitor_is_hidpi; then # export GDK_DPI_SCALE=0.5 else export MONITOR_IS_HIDPI=false + export POLYBAR_DPI=96 fi # * WM and Polybar