Yes, I’m on the latest official release of UB 20.04.
uname -a
Linux UB2004-EBX3 5.8.0-44-generic #50~20.04.1-Ubuntu SMP Wed Feb 10 21:07:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
grep ‘Setting driver:’ /var/log/Xorg.0.log
[ 9.665] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20200515
These are the scaling settings I am using on a 13" 1920x1080 display.
gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "[{'Gdk/WindowScalingFactor', <2>}]"
gsettings set org.gnome.desktop.interface scaling-factor 2
xrandr --output eDP1 --scale 1.6x1.6
Xrandr handles the fractional scaling and performs extremely well - but the moment the lid closes everything goes to hell. At first I thought maybe it was gnome-screensaver or the greeter lockscreen - but this gets triggered even if those things are not triggered. I have been able to remove suspend or any type of lockscreen but the reversion of my xrandr scale command still happens. I am left on my hugely oversized laptop at a full scale of 2. I can rescale it but then I introduce artifacts that requiring moving or resizing my windows - even then if you go through enough of these cycles you risk instability and the entire system rebooting or the artifacts around the edges of the windows increasing even after resizing or moving the window.
I really do need to find a resolution to this problem as it can lead to system instability and restarting the window manager via nohup budgie-wm --replace &
has already been performed - it does not clean up the artifacts at all.
This command tends to quickly do the cleanup for me - I trigger the Window shade and toggle it, and to be honest - if all of this losing of xrandr scale and re-applying didn’t eventually lead to system instability then I would just work around the issue, but I would like to solve why xrandr is being undone on lid close.
wmctrl -l|awk '{$3=""; $2=""; $1=""; print $0}'| xargs -I % sh -c '{ wmctrl -r "%" -b toggle,shaded; sleep 0.1; wmctrl -r "%" -b toggle,shaded; }'
The 2 file names I modified, below, to make sure the system does not go to sleep, and I really do have to modify both - because if I just update logind.conf it may not go to sleep/suspend, but it will still lose xrandr 1.6x1.6 scaling on closing the lid. UPower appears to disable the acpi notification of the lid close altogether so that does stop the problem from happening on lid close - but I still want the lid close to trigger the sleeping and just remove whatever power management thing may be happening that is causing the screen to lose xrandr scaling.
/etc/systemd/logind.conf
/etc/UPower/UPower.conf
I want the system to simply trigger “systemctl suspend” when I close the lid - not whatever it is that it is actually doing. I have already scripted a solution to trigger a sh script on lid close but it doesn’t help because something else is still being triggered. As long as I suspend it manually via the UI everything appears to work fine, so something in the suspend process of lid close is being problematic and I don’t think it is hardware/BIOS related. It feels like a software problem.