반응형

우분투 해상도 조절하는 법


http://blog.naver.com/mousee84/220301998016



이 내용에 대해 좀 더 상세히 설명하자면


1. xrandr 로 디스플레이 정보 확인  

 - Ctrl + Alt + t 로 터미널 창을 연다.

 - 터미널 창에 xrandr 을 입력하면 다음과 같은 정보가 나온다.


~$ xrandr
Screen 0: minimum 8 x 8, current 2390  x 768, maximum 32767 x 32767
LVDS1 connected primary 1366x768+1280+0 (normal left inverted right x axis y axis) 309mm x 173mm
   1366x768       60.1*+
   1360x768       59.8     60.0 
   1024x768       60.0 
   800x600        60.3     56.2 
   640x480        59.9 
VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 600mm x 336mm
   1024x768       60.0 +   75.1     75.0     70.1 
   1600x1200      70.0     65.0     60.0 
   1280x1024      75.0     60.0 
   1280x960       60.0 
   1152x864       75.0     70.0
   832x624        74.6     75.0 
   800x600        72.2     75.0     60.3     56.2 
   640x480        75.0     72.8     66.7     66.0     60.0     59.9 
   720x400        70.1 
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)


 - 위 화면에서 LVDS 는 랩탑 화면, VGA1 은 VGA 케이블로 연결된 모니터를 뜻한다. 최대 해상도인 1280x768 은 앞서 언급한대로 표시가 되지 않고 있다.


위 화면에서 현재 해상도가 맞지 않는 모니터 명을 확인하세요


모니터 명을 확인하는 방법은 HDMI선에 끼웠다면 HDMI~이고 VGA라면 VGA~ 등등으로 표시됩니다.



2. 추가할 해상도 정보 확인

터미널창에 cvt 1280 768 을 입력하면 해당 해상도의 정보가 아래와 같이 나온다.


~$ cvt 1280 768(즉, cvt 원하는 해상도)
# 1280x768 59.87 Hz (CVT) hsync: 47.78 kHz; pclk: 79.50 MHz
Modeline "1280x768_60.00"   79.50  1280 1344 1472 1664  768 771 781 798 -hsync +vsync


 - Modelline 의 뒷부분을 클립보드에 복사한다.(위의 붉은줄입니다.)


3. 해상도 추가

 - 2 에서 가져온 정보를 이용하여 터미널창에 다음과 같이 순서대로 입력한다.


xrandr --newmode "1280x768_60.00"   79.50  1280 1344 1472 1664  768 771 781 798 -hsync +vsync
xrandr --addmode VGA1 "1280x768_60.00"
xrandr --output VGA1 --mode "1280x768_60.00" --left-of LVDS1

 - 세번째줄의 --left-of LVDS1 은 외부모니터가 랩탑 화면의 왼쪽에 위치함을 뜻한다. 오른쪽이라면 right 로 변경하면 된다.

 - 연결된 모니터의 해상도가 변경되었는지 확인한다.


4. ~/.profile 변경(변경하지 않으면 재부팅 시 계속 다시 설정해야합니다.)

 - 3 에서 적용한 해상도는 저장이 되지 않으므로 부팅을 할 때 마다 재설정을 해야 하는 단점이 있다.

 - 이를 위해 터미널창에서 sudo gedit ~/.profile 을 입력한다.

 - 아래와 같이 profile 의 제일 하단에 3 에서 쓰인 3개 명령어 모두를 추가하고 저장한 후 재부팅하면 에러 없이 해상도가 자동으로 적용된다.

 

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

xrandr --newmode "1280x768_60.00"   79.50  1280 1344 1472 1664  768 771 781 798 -hsync +vsync
xrandr --addmode VGA1 "1280x768_60.00"
xrandr --output VGA1 --mode "1280x768_60.00" --left-of LVDS1


반응형

'Applied > Linux' 카테고리의 다른 글

우분투(18.04lts) 한글 설치하기  (0) 2019.05.19
우분투(16.04lts) 한글 설치하기  (0) 2018.04.27
리눅스 우분투에서 최신 gcc 사용 방법  (0) 2016.12.05
리눅스 컴파일 방법  (0) 2016.11.14
uptime 명령어  (0) 2016.07.23