Views:
4,232β
Votes: 2β
Tags:
gnome
18.04
xorg
display-resolution
xrandr
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/1099471
Title:
High DPi screen xrandr scaling on ubuntu 18.04 LTS
ID:
/2018/12/09/High-DPi-screen-xrandr-scaling-on-ubuntu-18.04-LTS
Created:
December 9, 2018
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
This answers both the OPβs question and the other answerβs bonus question.
Create a script using:
sudo -H gedit /lib/systemd/system-sleep/scale
Copy these lines into gedit
:
#!/bin/bash
# NAME: scale
# PATH: /lib/systemd/system-sleep
# DESC: Reset Ethernet card after suspend, not working automatically
# DATE: Dec 8, 2018
MYNAME=$0
set_scale() {
xrandr --output eDP-1 --scale 1.3x1.3
xrandr --output eDP-1 --panning 2560x1440
}
/usr/bin/logger $MYNAME 'case=[' ${1}' ]'
case "${1}/${2}" in
hibernate|suspend|pre*)
;;
resume|thaw|post*)
# sleep 2;
set_scale;;
esac
Save the script and exit gedit
.
Mark the script executable using:
chmod a+x /lib/systemd/system-sleep/scale
The script will run every time you resume from suspend.
You can also have it run in your startup applications by adding an entry containing the command:
/lib/systemd/system-sleep/scale post suspend
Startup Applications are run after you sign on.