03 BASH – Dispositivi video visti da OpenSUSE

18 Febbraio, 2024 (21:12) | BASH, Linux, Video | By: sargonsei

03 BASH – Scheda grafica, monitor, e altri dispositivi video visti da OpenSUSE Tumbleweed

inxi -SG # Sistema operativo, scheda grafica e monitor
xrandr -q # Porte video e risoluzioni impostabili
xrandr --verbose # Analizza porte video
lspci | awk '$2 == "VGA" {system("lspci -vs " $1)}' # Informazioni relative alla scheda grafica PCI
/usr/sbin/hwinfo --monitor # Informazioni dettagliate relative al monitor
sudo hwinfo --monitor # Informazioni dettagliate relative al monitor
xrandr --output VGA-0 --mode 1920x1080 # Imposta la risoluzione della porta VGA-0 a 1920x1080
xrandr --output DP-1 --mode 1280x1024 # Imposta la risoluzione della porta DP-1 a 1280x1024
xrandr --output HDMI-1 --mode 1280x720 # Imposta la risoluzione della porta HDMI-1 a 1280x720
xrandr --output HDMI-2 --mode 1024x768 # Imposta la risoluzione della porta HDMI-2 a 1024x768
xrandr --output HDMI-2 --mode 1360x768; read -s -n1 -t10 -p "Per accettare la nuova risoluzione premi [+], per rifiutarla premi un altro tasto o attendi 10 secondi." A0; if [ "+" == "$A0" ]; then echo "Risoluzione accettata."; else xrandr --output HDMI-2 --mode 1280x720; fi

Esempi di output:

:~> inxi -SG # Sistema operativo, scheda grafica e monitor
System:
  Host: 192.168.1.6 Kernel: 6.7.4-1-default arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 5.27.10 Distro: openSUSE Tumbleweed 20240216
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] driver: i915 v: kernel
  Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.4 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915
    resolution: 1360x768~60Hz
  API: EGL v: 1.5 drivers: iris,swrast platforms: x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 23.3.5
    renderer: Mesa Intel Xe Graphics (TGL GT2)
  API: Vulkan v: 1.3.275 drivers: N/A surfaces: xcb,xlib
:~> xrandr -q # Porte video e risoluzioni impostabili
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 16384 x 16384
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 connected primary 1360x768+0+0 (normal left inverted right x axis y axis) 1600mm x 900mm
   1360x768      60.37*+
   1920x1080     60.00    50.00    59.94
   1280x1024     60.02
   1280x720      60.61    60.00    50.00    59.94
   1024x768      60.00
   800x600       60.32
   720x576       50.00
   720x480       60.00    59.94
   640x480       60.00    59.94
:~> xrandr --verbose # Analizza porte video
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 16384 x 16384
HDMI-1 disconnected (normal left inverted right x axis y axis)
        Identifier: 0x42
        Timestamp:  4728
        Subpixel:   unknown
        Clones:    
        CRTCs:      0 1 2 3
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        HDCP Content Type: HDCP Type0 
                supported: HDCP Type0, HDCP Type1
        Content Protection: Undesired 
                supported: Undesired, Desired, Enabled
        max bpc: 12 
                range: (8, 12)
        content type: No Data 
                supported: No Data, Graphics, Photo, Cinema, Game
        Colorspace: Default 
                supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
        aspect ratio: Automatic 
                supported: Automatic, 4:3, 16:9
        Broadcast RGB: Automatic 
                supported: Automatic, Full, Limited 16:235
        audio: auto 
                supported: force-dvi, off, auto, on
        link-status: Good 
                supported: Good, Bad
        CONNECTOR_ID: 308 
                supported: 308
        non-desktop: 0 
                range: (0, 1)
DP-1 disconnected (normal left inverted right x axis y axis)
        Identifier: 0x43
        Timestamp:  4728
        Subpixel:   unknown
        Clones:    
        CRTCs:      0 1 2 3
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        HDCP Content Type: HDCP Type0 
                supported: HDCP Type0, HDCP Type1
        Content Protection: Undesired 
                supported: Undesired, Desired, Enabled
        vrr_capable: 0 
                range: (0, 1)
        Colorspace: Default 
                supported: Default, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, RGB_WIDE_FIXED, RGB_WIDE_FLOAT, BT601_YCC
        max bpc: 12 
                range: (6, 12)
        Broadcast RGB: Automatic 
                supported: Automatic, Full, Limited 16:235
        audio: auto 
                supported: force-dvi, off, auto, on
        subconnector: Unknown 
                supported: Unknown, VGA, DVI-D, HDMI, DP, Wireless, Native
        link-status: Good 
                supported: Good, Bad
        CONNECTOR_ID: 318 
                supported: 318
        non-desktop: 0 
                range: (0, 1)
HDMI-2 connected primary 1360x768+0+0 (0x46) normal (normal left inverted right x axis y axis) 1600mm x 900mm
        Identifier: 0x44
        Timestamp:  4728
        Subpixel:   unknown
        Gamma:      1.0:1.0:1.0
        Brightness: 1.0
        Clones:    
        CRTC:       0
        CRTCs:      0 1 2 3
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        _KDE_SCREEN_INDEX: 1 
        EDID: 
                00ffffffffffff007fff00900f000000
                0112010380a05a780a01c1a057479827
                124c4c21080031404540614081800101
                010101010101982150b051001b304070
                360040846300001e4c1d007251d01e20
                6e28550040846300001e000000fc004c
                43442054560a202020202020000000fd
                00303e0e440f000a20202020202001c0
                020323704f0102030405060710111213
                1415161f230907078301000066030c00
                100080011d80d0721c1620102c258040
                846300009e011d8018711c1620582c25
                00408463000098011d00bc52d01e20b8
                28554040846300001e023a80d072382d
                40102c458040846300001e023a801871
                382d40582c450040846300001e000008
        HDCP Content Type: HDCP Type0 
                supported: HDCP Type0, HDCP Type1
        Content Protection: Undesired 
                supported: Undesired, Desired, Enabled
        max bpc: 12 
                range: (8, 12)
        content type: No Data 
                supported: No Data, Graphics, Photo, Cinema, Game
        Colorspace: Default 
                supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
        aspect ratio: Automatic 
                supported: Automatic, 4:3, 16:9
        Broadcast RGB: Automatic 
                supported: Automatic, Full, Limited 16:235
        audio: auto 
                supported: force-dvi, off, auto, on
        link-status: Good 
                supported: Good, Bad
        CONNECTOR_ID: 328 
                supported: 328
        non-desktop: 0 
                range: (0, 1)
  1360x768 (0x46) 86.000MHz +HSync +VSync *current +preferred
        h: width  1360 start 1424 end 1536 total 1792 skew    0 clock  47.99KHz
        v: height  768 start  771 end  777 total  795           clock  60.37Hz
  1920x1080 (0x47) 148.500MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz
  1920x1080 (0x48) 148.500MHz +HSync +VSync
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock  56.25KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  50.00Hz
  1920x1080 (0x49) 148.352MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.43KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  59.94Hz
  1280x1024 (0x4a) 108.000MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
  1280x720 (0x4b) 75.000MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  45.45KHz
        v: height  720 start  725 end  730 total  750           clock  60.61Hz
  1280x720 (0x4c) 74.250MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  45.00KHz
        v: height  720 start  725 end  730 total  750           clock  60.00Hz
  1280x720 (0x4d) 74.250MHz +HSync +VSync
        h: width  1280 start 1720 end 1760 total 1980 skew    0 clock  37.50KHz
        v: height  720 start  725 end  730 total  750           clock  50.00Hz
  1280x720 (0x4e) 74.176MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  44.96KHz
        v: height  720 start  725 end  730 total  750           clock  59.94Hz
  1024x768 (0x4f) 65.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  800x600 (0x50) 40.000MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  720x576 (0x51) 27.000MHz -HSync -VSync
        h: width   720 start  732 end  796 total  864 skew    0 clock  31.25KHz
        v: height  576 start  581 end  586 total  625           clock  50.00Hz
  720x480 (0x52) 27.027MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock  31.50KHz
        v: height  480 start  489 end  495 total  525           clock  60.00Hz
  720x480 (0x53) 27.000MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock  31.47KHz
        v: height  480 start  489 end  495 total  525           clock  59.94Hz
  640x480 (0x54) 25.200MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.50KHz
        v: height  480 start  490 end  492 total  525           clock  60.00Hz
  640x480 (0x55) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz
:~> lspci | awk '$2 == "VGA" {system("lspci -vs " $1)}' # Informazioni relative alla scheda grafica PCI
00:02.0 VGA compatible controller: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 03) (prog-if 00 [VGA controller])
        DeviceName: Onboard - Video
        Subsystem: Intel Corporation Device 2212
        Flags: bus master, fast devsel, latency 0, IRQ 136
        Memory at 6000000000 (64-bit, non-prefetchable) [size=16M]
        Memory at 4000000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 5000 [size=64]
        Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
        Capabilities: 
        Kernel driver in use: i915
        Kernel modules: i915

:~> sudo hwinfo --monitor # Informazioni dettagliate relative al monitor
[sudo] password di root:
32: None 00.0: 10002 LCD Monitor
  [Created at monitor.125]
  Unique ID: rdCR.RhibC2Mxnv3
  Parent ID: _Znp.DSVSd+ZMZj1
  Hardware Class: monitor
  Model: "LCD TV"
  Vendor: ___
  Device: eisa 0x9000 "LCD TV"
  Serial ID: "15"
  Resolution: 640x480@60Hz
  Resolution: 800x600@60Hz
  Resolution: 1024x768@60Hz
  Resolution: 640x480@60Hz
  Resolution: 800x600@60Hz
  Resolution: 1024x768@60Hz
  Resolution: 1280x1024@60Hz
  Resolution: 1280x720@60Hz
  Resolution: 1360x768@60Hz
  Size: 1600x900 mm
  Year of Manufacture: 2008
  Week of Manufacture: 1
  Detailed Timings #0:
     Resolution: 1360x768
     Horizontal: 1360 1424 1536 1792 (+64 +176 +432) +hsync
       Vertical:  768  771  777  795 (+3 +9 +27) +vsync
    Frequencies: 86.00 MHz, 47.99 kHz, 60.37 Hz
  Year of Manufacture: 2008
  Week of Manufacture: 1
  Detailed Timings #1:
     Resolution: 1280x720
     Horizontal: 1280 1390 1430 1650 (+110 +150 +370) +hsync
       Vertical:  720  725  730  750 (+5 +10 +30) +vsync
    Frequencies: 75.00 MHz, 45.45 kHz, 60.61 Hz
  Driver Info #0:
    Max. Resolution: 1280x1024
    Vert. Sync Range: 48-62 Hz
    Hor. Sync Range: 14-68 kHz
    Bandwidth: 86 MHz
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #27 (VGA compatible controller)
:~>