新聞中心
如何使用Linux查看顯示器信息?

創(chuàng)新互聯(lián)建站堅持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:成都做網(wǎng)站、網(wǎng)站設(shè)計、企業(yè)官網(wǎng)、英文網(wǎng)站、手機端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時代的綦江網(wǎng)站設(shè)計、移動媒體設(shè)計的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!
在Linux系統(tǒng)下,我們經(jīng)常需要查看顯示器的相關(guān)信息,以確保它在正確的分辨率下工作,并且可以優(yōu)化配置,使顯示效果更佳。那么,該如何使用Linux查看顯示器信息呢?下面將介紹三種不同的命令來實現(xiàn)這個目標(biāo)。
1. xrandr
xrandr是一個命令行工具,可用于配置顯示器的分辨率、方向和刷新率等。也可以用它來查看顯示器的信息。要查看當(dāng)前連接的顯示器,請在終端中輸入以下命令:
> xrandr
這將顯示您的系統(tǒng)上所有連接的顯示器的信息。對于每個連接的顯示器,您將看到其名稱和支持的分辨率以及刷新率。例如,以下是xrandr輸出的一部分:
> Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
> HDMI-1 connected primary 1920×1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
> 1920×1080 60.00*+ 50.00 59.94
> 1680×1050 59.88
> 1600×900 60.00
> 1280×1024 75.02 60.02
> 1440×900 59.90
> 1280×720 60.00 50.00 59.94
在這個例子中,HDMI-1是連接的顯示器的名稱。該顯示器的分辨率為1920×1080,并支持60Hz和50Hz的刷新率。
2. edid-decode
另一個命令行工具是edid-decode,它允許您查看顯示器的EDID信息。EDID是一種包含顯示器制造商和產(chǎn)品信息的數(shù)據(jù)格式。要使用edid-decode,請在終端中輸入以下命令:
> sudo apt-get install edid-decode
> sudo get-edid | edid-decode
之一個命令將安裝edid-decode,第二個命令將輸出連接的顯示器的EDID信息。以下是edid-decode輸出的一部分:
> EDID version: 1.3
> Manufacturer: AOC
> Model: 2250W
> Serial number: 0000
> Week: 38
> Year: 2023
> EDID block checksum: 0x4b
在這個例子中,顯示器的制造商是AOC,型號是2250W,生產(chǎn)日期是2023年9月。
3. hwinfo
hwinfo是一個通用的硬件信息和診斷工具,可在Linux系統(tǒng)上運行。它允許您查看與顯示器相關(guān)的詳細信息,例如分辨率、屏幕大小和支持的制造商等。要使用hwinfo,請在終端中輸入以下命令:
> sudo apt-get install hwinfo
> sudo hwinfo –monitor
之一個命令將安裝hwinfo,第二個命令將顯示與顯示器相關(guān)的詳細信息。以下是hwinfo輸出的一部分:
> 01: None 00.0: 10002 Monitor
> [Created at monitor.124]
> Unique ID: rdCR.VTJg_JRCVU8
> Hardware Class: monitor
> Model: “DELL P2314H”
> Vendor: DELL
> Device: eisa 0x5cc1
> Resolution: 1920×1080@60Hz
> Size: 510×290 mm
> Year of Manufacture: 2023
在這個例子中,顯示器的制造商是DELL,型號是P2314H,分辨率為1920×1080,尺寸為510x290mm。
結(jié)論
這三種命令都非常有用,可以幫助您查看與顯示器相關(guān)的詳細信息。根據(jù)您的需求,您可以選擇其中任何一個命令來獲取特定的信息。無論是xrandr、edid-decode還是hwinfo,它們都是輕便且非常易于使用的命令行工具。
相關(guān)問題拓展閱讀:
- linux下lvds和vga雙屏怎么調(diào)
linux下lvds和vga雙屏怎么調(diào)
你好,樓主:
RandR是對X11的一個擴展協(xié)議,允許在不重啟X的情況下修改輸出的一些參數(shù)并使之生效,xrandr是該協(xié)議的命令行界面,它的功能之一就是用來設(shè)置雙屏顯示。
缺省情況下,外接顯示器後啟用的是屏幕復(fù)制模式,即兩個屏幕顯示完全相同的內(nèi)容。使用命令xrandr -q查看當(dāng)前的輸出狀態(tài):
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192 LVDS1 connected 1280×800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm 1280×800 60.0+ 60.0 50.0
1024×768 75.1 70.1 60.0
800×600 72.2 75.0 60.3 56.2
768×576 75.0 72.0 60.0
640×480 72.8 75.0 60.0 59.9
VGA1 connected 1920×1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm 1920x.0+ 1680x.0
1280x.0 60.0
1440×900 59.9
1280×960 60.0
1024×768 75.1 70.1 60.0
832×624 74.6
800×600 72.2 75.0 60.3 56.2
640×480 72.8 75.0 66.7 60.0
720×400 70.1
HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) DP3 disconnected (normal left inverted right x axis y axis)
可見,筆記本電腦的屏幕輸出(LVDS1)的顯示分辨率是1280×800,外接顯示器的輸出(VGA1)的分辨率是1920×1080。兩個輸出在整個虛擬屏幕(名稱:Screen 0;當(dāng)前大?。?920×1080;更大:8192×8192)上的坐標(biāo)都是+0+0。所以在外接顯示器中可以看到屏幕左上角有一個1280×800分辨率的小屏幕。
屏幕復(fù)制模式判猜最常用於外接投影儀,現(xiàn)在我需要兩個屏幕分別顯示在各自的顯示器中,并在兩個屏幕中顯示不同的內(nèi)容(也就是Windows下設(shè)置雙屏顯示時選擇的擴展模式)。
由於宴仔我將筆記本電腦放在外接顯示器的左邊,所以為了操作的自然,使用命令xrandr –output VGA1 –right-of LVDS1將外接顯示器的輸出在虛擬屏幕上的位置設(shè)置在筆記本電腦的輸出的右邊,示意圖如下:
這樣,兩個顯示器中就可以顯示不同的內(nèi)容了。由於屬於同一個虛擬屏幕,當(dāng)然也可以將一掘祥型個窗口跨過邊界從一個顯示器拖到另一個顯示器中。再使用命令xrandr -q查看現(xiàn)在的輸出狀態(tài):
Screen 0: minimum 320 x 200, current 3200 x 1080, maximum 8192 x 8192 LVDS1 connected 1280×800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm 1280×800 60.0+ 60.0 50.0
1024×768 75.1 70.1 60.0
800×600 72.2 75.0 60.3 56.2
768×576 75.0 72.0 60.0
640×480 72.8 75.0 60.0 59.9
VGA1 connected 1920×1080+1280+0 (normal left inverted right x axis y axis) 509mm x 286mm 1920x.0+ 1680x.0
1280x.0 60.0
1440×900 59.9
1280×960 60.0
1024×768 75.1 70.1 60.0
832×624 74.6
800×600 72.2 75.0 60.3 56.2
640×480 72.8 75.0 66.7 60.0
720×400 70.1
HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) DP3 disconnected (normal left inverted right x axis y axis)
使用xrandr做的設(shè)置只對當(dāng)前的X會話有效,重啟後恢復(fù)原樣。使設(shè)置持久化的方法為修改xorg.conf或設(shè)置自動執(zhí)行命令。據(jù)說有一些圖形界面封裝的xrandr的前端,完善的桌面環(huán)境如GNOME和KDE應(yīng)該也是可以在圖形界面中設(shè)置的,不過我所使用的XFCE目前似乎只能啟用/禁用復(fù)制模式,而不支持在圖形界面中設(shè)置擴展模式。
下面的腳本用來簡化雙屏顯示的設(shè)置:
#!/bin/bash
# Restart trayer and cairo-dock which I use on my desktop
restart_widget()
{
killall trayer
killall cairo-dock
# Another script which starts trayer and set some options
mytrayer
cairo-dock &
}
set_dualhead()
{
xrandr –output LVDS1 –auto
xrandr –output VGA1 –auto
xrandr –output VGA1 –right-of LVDS1
restart_widget
}
set_lvds()
{
xrandr –output VGA1 –off
xrandr –output LVDS1 –auto
restart_widget
}
set_vga()
{
xrandr –output LVDS1 –off
xrandr –output VGA1 –auto
restart_widget
}
if ; then
set_dualhead
exit
fi
case “$1x” in
“l(fā)vdsx”) set_lvds;;
“vgax”) set_vga;;
*) echo ‘Unknown parameter !’;;
esac
可以通過xrandr之款Linux雙屏工具來調(diào)節(jié)。
1、列出屏幕支持分辨率:
# xrandr -q
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 1280 x 1280
VGA disconnected (normal left inverted right x axis y axis)
LVDS connected 1280×800+0+0 (normal left inverted right x axis y axis) 304mm x 190mm
1280x.0*+
1024x.0
800x.3
640x.9
TV disconnected (normal left inverted right x axis y axis)
2、設(shè)置屏幕分辨率
根據(jù)上面查到的分辨率,我們可以手動設(shè)置,下面將分辨率設(shè)置為 1024×768 , 刷新率為60Hz。
# xrandr -s 1024×768 -r 60
3、查看所有顯示器屬性
# xrandr –prop
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1280 x 1280
VGA disconnected (normal left inverted right x axis y axis)
LVDS connected 1024×768+0+0 (normal left inverted right x axis y axis) 304mm x 190mm
EDID_DATA:
00ffffffffffff00320c
e13780aba28
010101
121b007d
be
fe004c
cc43440a000000fe
004c2d544c4e3100b2
PANEL_FITTING: full_aspect
supported: centerfull_aspect full
BACKLIGHT_CONTROL: combination
腔首supported: nativelegacycombination kernel
BACKLIGHT:(0xb) range: (0,14203)
1280x.0 +
1024x.0*
800x.3
伍凳數(shù)640x.9
粗陵 TV disconnected (normal left inverted right x axis y axis)
HUE: 0 (0x) range: (0,255)
SATURATION: 96 (0x) range: (0,255)
CONTRAST: 96 (0x)range: (0,255)
BRIGHTNESS: 128 (0x) range: (0,255)
BOTTOM: 37 (0x) range: (0,100)
RIGHT: 46 (0xe) range: (0,100)
TOP: 36 (0x) range: (0,100)
LEFT: 54 (0x) range: (0,100)
TV_FORMAT: NTSC-M
supported: NTSC-MNTSCNTSC-JPAL-M
PAL-NPAL
4、設(shè)置雙屏(dual monitor)顯示
如果你設(shè)置有一個LED(筆記本顯示器),再外界一個 VGA 顯示器,用 ”xrandr —prop“ 命令就會得到類似 LVDS1 和 VGA1 列表。可以設(shè)置這兩個雙屏顯示。
xrandr –output LVDS1 –mode 1280×800 –output VGA1 –mode 1024×768 –above LVDS1
linux 查看 顯示器的介紹就聊到這里吧,感謝你花時間閱讀本站內(nèi)容,更多關(guān)于linux 查看 顯示器,「如何使用Linux查看顯示器信息?」,linux下lvds和vga雙屏怎么調(diào)的信息別忘了在本站進行查找喔。
成都網(wǎng)站營銷推廣找創(chuàng)新互聯(lián),全國分站站群網(wǎng)站搭建更好做SEO營銷。
創(chuàng)新互聯(lián)(www.cdcxhl.com)四川成都IDC基礎(chǔ)服務(wù)商,價格厚道。提供成都服務(wù)器托管租用、綿陽服務(wù)器租用托管、重慶服務(wù)器托管租用、貴陽服務(wù)器機房服務(wù)器托管租用。
名稱欄目:「如何使用Linux查看顯示器信息?」 (linux 查看 顯示器)
網(wǎng)頁網(wǎng)址:http://m.5511xx.com/article/ccdhcoj.html


咨詢
建站咨詢
