Xrandr fix bad horizontal resolution with dual screen on laptop

Execute this script in .xprofile to fix crazy resolution on ubuntu 14 with 2 screen connected.

#!/bin/sh
# HDMI-0 == external screen
# LVDS1 is laptop screen
 
#check if HDMI-0 is connected
if (xrandr | grep "HDMI-0 connected" > /dev/null); then
  exec echo "HDMI-0 is connected!" &
  xrandr --output LVDS1 --off
  xrandr --output HDMI-0 --primary --mode 1920x1080
else
  exec echo "CRT1 isn't connected!"  &
  xrandr --output LVDS1 --primary --mode 1920x1080
fi

#if [ "$1" == "dual" ]; then
#  xrandr --output LVDS1 --mode 1920x1080 --below HDMI-0
#fi

Laisser un commentaire