I have a 14 inch ultrabook with a resolution of 2560×1440. I currently run Gnome 3.16 in HiDPI mode with a scaling factor of 2. Since I'm unable to specify a factional scaling factor, like 1.5, I've opted to use xrandr to scale desktop for me.
xrandr --output eDP1 --scale-from 3200x1800 --panning 3200x1800
I've put the above in a script that runs shortly after logging into a Gnome session. There a couple problems with this.
- Sometimes the scaling is lost, like when an on-screen display appears, e.g., pressing one of the brightness controls on the laptop keyboard; and
- watching Netflix full-screen only overlays an additional video image over the browser only occupying top left of the laptop screen.
Regarding #1, the scaling isn't completely lost but the desktop 'shrinks' and only appears in the top left corner leaving black space to the right and bottom of the visible desktop. It appears the 'shrunk' desktop is the scaled one but stuck in the top left corner of the 3200×1800 screen.
I'm hoping if I can configure X to do the scaling, and avoid running xrandr, that the screen will stay scaled.
Best Answer
I just finished setting up a ~150% zoom under Cinnamon, hope this will help you too because GNOME is similar to Cinnamon.
I started with
xrandr
commands from this HiDPI ArchWiki article:Then i wanted to set it permanent, tried
xorg.conf
but it does not want to catchMonitor
sections of config whatever i try. I asked on ArchLinux forums and got an advice to accept it and throw awayxorg.conf
. Anyway, i think my config is correct and you can try and use it with changingMonitor Identifier
. Most interesting part is transformation matrix. Xorg has no option for scaling, but i figured out thatxrandr --scale
is a shorthand for--xrandr --transform
which corresponds toTransformationMatrix
.Here is my
xorg.conf
:This does not work for me, so i continued digging. My system has
lightdm
which starts first, and it needsxrandr
commands to look HiDPIish. Then it startscinnamon-session
which overrides display settings and i need to runxrandr
again. Lightdm is configured byetc/lightdm/lightdm.conf
and by default it runs something specified insession-wrapper
option. You need to create a script with desiredxrandr
tweaks and place it somewhere to be launched bysession-wrapper
. By the way, optionssession-setup-script
anddisplay-setup-script
didn't work for me.Then, in Cinnamon (or GNOME in your case) the best thing i could do is to use autostart feature and add
xrandr
script with zero timeout.