The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 3,976β€…    Votes:  2β€…
Tags: gnome   18.04   xorg   display-resolution   xrandr  
Link: πŸ” See Original Answer on Ask Ubuntu πŸ”—

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: November 24, 2022    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:


# NAME: scale
# PATH: /lib/systemd/system-sleep
# DESC: Reset Ethernet card after suspend, not working automatically
# DATE: Dec 8, 2018


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
      # sleep 2;

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.

⇧ ASUS PCE cant detect 5ghz network cal -w does not work  β‡©