日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

[X][xrandr][archlinux] 手动调整显示器分辨率

發布時間:2023/12/13 综合教程 24 生活家
生活随笔 收集整理的這篇文章主要介紹了 [X][xrandr][archlinux] 手动调整显示器分辨率 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

有一些時候,電腦并不能正確的識別出顯示器的最大分辨率,這有可能是軟件的原因,硬件的原因,顯示器的原因,VGA線的原因等其他原因。

我遇到的情況,是開機時候連著VGA的話,就可以正確識別。如果使用中間進行了插拔,便不能獲得最佳分辨率了。

我當前這臺顯示器最佳分辨率是1920x1080, 斷過VGA之后識別出來的分辨率是1280x768。

除了在KDE的配置中無法設置更高分辨率,xrandr的輸出中,也沒有檢測到更高的分辨率

> xrandr 
Screen 0: minimum 8 x 8, current 1366 x 1536, maximum 32767 x 32767
eDP1 connected primary 1366x768+0+768 (normal left inverted right x axis y axis) 310mm x 170mm
   1366x768      60.00*+
   1280x720      60.00  
   1024x768      60.00  
   1024x576      60.00  
   960x540       60.00  
   800x600       60.32    56.25  
   864x486       60.00  
   640x480       59.94  
   720x405       60.00  
   680x384       60.00  
   640x360       60.00  
DP1 disconnected (normal left inverted right x axis y axis)
DP2 connected 1024x768+91+0 (normal left inverted right x axis y axis) 480mm x 270mm
   1024x768      60.00* 
   800x600       60.32    56.25  
   848x480       60.00  
   640x480       59.94  
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

為了不想重啟電腦,采用如下方式手配分辨率。

參考:https://wiki.archlinux.org/index.php/xrandr#Adding_undetected_resolutions

我將使用的工具是xrandr。步驟如下:

1. 找到正確的參數:

/home/tong/VM/kingkong-centos6.3 [tong@T7] [11:42]
> cvt 1920 1080
# 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

找到正確參數的首選途徑是到/var/log/Xorg.0.log中尋找,但是我并沒有找到,wiki中提供的內容如下:

[    45.063] (II) intel(0): clock: 241.5 MHz   Image Size:  597 x 336 mm
[    45.063] (II) intel(0): h_active: 2560  h_sync: 2600  h_sync_end 2632 h_blank_end 2720 h_border: 0
[    45.063] (II) intel(0): v_active: 1440  v_sync: 1443  v_sync_end 1448 v_blanking: 1481 v_border: 0

2. 將步驟一中獲取到的參數增加到xrandr中。

/home/tong/VM/kingkong-centos6.3 [tong@T7] [11:45]
> xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
/home/tong/VM/kingkong-centos6.3 [tong@T7] [11:46]
> xrandr --addmode DP2 1920x1080_60.00

如果一且順利的話,此時再查看xrandr命令,將發現最佳分辨率設置成功:

/home/tong/VM/kingkong-centos6.3 [tong@T7] [11:47]
> xrandr                              
Screen 0: minimum 8 x 8, current 1366 x 1536, maximum 32767 x 32767
eDP1 connected primary 1366x768+0+768 (normal left inverted right x axis y axis) 310mm x 170mm
   1366x768      60.00*+
   1280x720      60.00  
   1024x768      60.00  
   1024x576      60.00  
   960x540       60.00  
   800x600       60.32    56.25  
   864x486       60.00  
   640x480       59.94  
   720x405       60.00  
   680x384       60.00  
   640x360       60.00  
DP1 disconnected (normal left inverted right x axis y axis)
DP2 connected 1024x768+107+0 (normal left inverted right x axis y axis) 480mm x 270mm
   1024x768      60.00* 
   800x600       60.32    56.25  
   848x480       60.00  
   640x480       59.94  
   1920x1080_60.00  59.96  
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

3. 調整顯示器,使用新增的最佳分辨率

/home/tong/VM/kingkong-centos6.3 [tong@T7] [11:47]
> xrandr --output DP2 --mode 1920x1080_60.00

不出意外的話,顯示器上應該已經獲得了正確的顯示信息。如果有意外,歡迎留言 :)

總結

以上是生活随笔為你收集整理的[X][xrandr][archlinux] 手动调整显示器分辨率的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。