Hello,
I have just started using Ubuntu mate. I like it a lot. I am trying to fix the resolution to suit my laptop. I have enabled HiDPI in Mate Tweaks and this makes everything enormous. After much googling I found out that this command fixes everything:
xrandr --output LVDS-1 --scale 1.6x1.5
I start off with a resolution of 1920x1080 and that makes the resolution 3072x1620
I read that this goes in a .xprofile file in home folder..
I read that you can create that file with this little series of commands:
RES="3072 1620 60" &&
DISP=$(xrandr | grep -e " connected [^(]" | sed -e "s/([A-Z0-9]+) connected./\1/") &&
MODELINE=$(cvt $(echo $RES) | grep -e "Modeline [^(]" | sed -r 's/.Modeline (.)/\1/') &&
MODERES=$(echo $MODELINE | grep -o -P '(?<=").(?=")') &&
cat > ~/.xprofile << _EOF
#!/bin/sh
xrandr --newmode $MODELINE
xrandr --addmode $DISP $MODERES
_EOF
Well this is the contents of my .xprofile (I changed the shebang thing to be bash instead of sh)
#!/bin/bash
xrandr --newmode "3072x1620_60.00" 423.75 3072 3312 3640 4208 1620 1623 163>
xrandr --addmode LVDS-1 3072x1620_60.00
xrandr --output LVDS-1 --mode 3072x1620_60.00
After a reboot I can see that newmode added to the output of xrandr so I guess that script does run but the resolution doesn't change on my monitor.
I have rebooted about 10 times testing this but every time it doesn't change the resolution. I end up with a rectangle about 1/3 of the screen so I have to open Terminal and run this command to fix things:
xrandr --output LVDS-1 --scale 1.6x1.5
I also tried putting just that command in .xprofile but it doesn't work either after boot up.
I tried creating a file: /etc/xdg/autostart/fix-resolution.desktop
But likewise it doesn't change the resolution at bootup.
Here are the first few lines of what the xrandr
command gives after bootup:
flex@flex-ubuntu:~/Desktop$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
LVDS-1 connected primary 3072x1620+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
And after I run xrandr --output LVDS-1 --scale 1.6x1.5
flex@flex-ubuntu:~/Desktop$ xrandr --output LVDS-1 --scale 1.6x1.5
flex@flex-ubuntu:~/Desktop$ xrandr
Screen 0: minimum 320 x 200, current 3072 x 1620, maximum 16384 x 16384
LVDS-1 connected primary 3072x1620+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
I don't know what's the difference between Screen 0: and LVDS-1? It seems that I need Screen 0: to be current 3072 x 1620 at bootup instead of current 1920 x 1080.
Running that command fixes things but how do I get it to run at a reboot?
Cheers,
Flex