1

I need scale my screen to read 1920x1080 resolution at a 12" screen. For this I found this line is great:

xrandr --output eDP-1 --scale 0.9x0.9

How can I include that while the original setup of screen, so as early as possible? Any X11 config file? Where and how?

Thank you!

My problem with adding it later is that screen (intel skylake) starts flickering after suspend or reconfiguring. I filed that bug (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1872760) but have not much hope for a quick solution of that.

Arno
  • 485

1 Answers1

2

You could try the next solution if you use lightdm:

Modify /etc/lightdm/lightdm.conf to add the following options:

display-setup-script > calls your mycustomloginvideo.sh before the login screen appears session-setup-script > calls your mycustomdesktopvideo.sh before the user desktop session starts

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
# for your login screen, e.g. LightDM (Ubuntu 11.10) or GDM (11.04 or earlier)
display-setup-script=/usr/share/mycustomloginvideo.sh
# for your desktop session
session-setup-script=/usr/share/mycustomdesktopvideo.sh

You could also use a systemd service:

sudo vim.tiny /etc/systemd/system/xrandrd.service

    [Unit]
    Description=Run xrandr command
    After=graphical.target

    [Service]
    Type=oneshot
    KillMode=none
    ExecStart=/home/user/.config/xrandr.sh

    [Install]
    WantedBy=multi-user.target

$ sudo systemctl enable xrandrd
$ sudo systemctl start xrandrd
$ sudo systemctl daemon-reload    # after each xrandrd.service file modification

You could try display-manager.service instead of graphical.target

Your script could be here:

$ nano ~/.config/xrandr.sh
#!/bin/bash
xrandr --output eDP-1 --scale 0.9x0.9

$ chmod +x ~/.config/xrandr.sh
Gryu
  • 7,559
  • 9
  • 33
  • 52
  • That looks good, so it happens during boot. But it doesn't seem that the x11 is coming up already with this setting. This is a change after init the x11, isn't it? – Arno Apr 28 '20 at 19:41