2014年2月13日 星期四

Ubuntu Intel Resolution

Desktop:

You can try setting your resolution to the desired level manually.

First, run this command, changing the example 1920x1080 resolution to the resolution you want:

cvt 1920 1080

That will spew out something like this:

# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync

We're only interested in the chunk after the quotes and before the -hsync, e.g.

173.00  1920 2048 2248 2576  1080 1083 1088 1120

Use that in the next command to add a graphics mode:

xrandr --newmode clever_name 173.00  1920 2048 2248 2576  1080 1083 1088 1120

Now, add your new mode to your VGA output:

xrandr --addmode VGA1 clever_name

Finally, switch your VGA monitor to use it:

xrandr --output VGA1 --mode clever_name

Now that that works, you can make it take effect every time you log in. To do so, create the following files somewhere:

fix-resolution.sh with what is called a shebang line and then the last three commands you ran that got it working before, e.g.:

#!/bin/sh
xrandr --newmode clever_name 173.00  1920 2048 2248 2576  1080 1083 1088 1120
xrandr --addmode VGA1 clever_name
xrandr --output VGA1 --mode clever_name

fix-resolution.desktop with the following contents:

[Desktop Entry]
Name=fix resolution
Exec=/usr/bin/local/fix-resolution.sh

Now, copy the files to the appropriate places on your hard drive and make the script executable. From a terminal:

cp fix-resolution.sh /usr/local/bin
chmod +x /usr/local/bin/fix-resolution.sh
cp fix-resolution.desktop /etc/xdg/autostart

This will run the commands that force your monitor to the proper resolution every time someone logs into your computer.

Login Screen:
  1. Install the default LightDM greeter for XFCE:
    apt-get install lightdm-gtk-greeter xubuntu-default-settings
  2. Change the corresponding line in /etc/lightdm/lightdm.conf:
    Before:
    [SeatDefaults]
    greeter-session=unity-greeter
    ...
    
    After:
    [SeatDefaults]
    greeter-session=lightdm-gtk-greeter
    ...
     display-setup-script=/usr/local/bin/fix-resolution.sh
Now all displays are configured correctly at the LightDM login screen.

---------------------------------------------------------------------
(dual-monitor: Set大mon數據+off 細mon)
 display-setup-script=/usr/local/bin/fix-resolution-login.sh

#!/bin/sh
xrandr --newmode clever_name 85.25  1368 1440 1576 1784  768 771 781 798
xrandr --addmode VGA1 clever_name
xrandr --output VGA1 --mode clever_name
xrandr --output VGA1 --off

沒有留言:

張貼留言

Related Posts Plugin for WordPress, Blogger...