Bash list all display output ports












0














I am looking for a command which prints all visual output ports a laptops has.



I have searched Stack and Google for a while now but I cannot find an answer.



The closest I got is xandr



eDP-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 277mm x 156mm
1366x768 60.00*+ 40.00
1360x768 59.80 59.96
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
960x600 60.00
960x540 59.99
800x600 60.00 60.32 56.25
840x525 60.01 59.88
800x512 60.17
700x525 59.98
640x512 60.02
720x450 59.89
640x480 60.00 59.94
680x384 59.80 59.96
576x432 60.06
512x384 60.00
400x300 60.32 56.34
320x240 60.05
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)


Looking for something like



HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)


Unfortunately this output doesn't show the information I need. The information from xrandr is not accurate.



Tried lspci, dmesg(maybe it is in there but couldn't find it), lshw and possible some more hardware listing commands.



The ideal situation would be



VGA x1
HDMI x1 or mini
DP x1
DVI x1


But a finger at the right direction would be greatly appreciated










share|improve this question




















  • 1




    Something like this? xrandr |awk '/connected/{print $1,$2}'
    – George Vasiliou
    Mar 27 at 20:56










  • I by "ports" you mean "holes in the casing where I can stick a connector" then the only place where those may be listed is the manufacturer's web site. (Example for the HP EliteBook 820 G3.) Only the manufacturer knows what they have designed and assembled. xrandr lists all the ports which the GPU provides; the manufacturer, in their wisdom, may chose not make all of them available externally, or to provide extra connectors via converters.
    – AlexP
    May 26 at 17:24


















0














I am looking for a command which prints all visual output ports a laptops has.



I have searched Stack and Google for a while now but I cannot find an answer.



The closest I got is xandr



eDP-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 277mm x 156mm
1366x768 60.00*+ 40.00
1360x768 59.80 59.96
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
960x600 60.00
960x540 59.99
800x600 60.00 60.32 56.25
840x525 60.01 59.88
800x512 60.17
700x525 59.98
640x512 60.02
720x450 59.89
640x480 60.00 59.94
680x384 59.80 59.96
576x432 60.06
512x384 60.00
400x300 60.32 56.34
320x240 60.05
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)


Looking for something like



HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)


Unfortunately this output doesn't show the information I need. The information from xrandr is not accurate.



Tried lspci, dmesg(maybe it is in there but couldn't find it), lshw and possible some more hardware listing commands.



The ideal situation would be



VGA x1
HDMI x1 or mini
DP x1
DVI x1


But a finger at the right direction would be greatly appreciated










share|improve this question




















  • 1




    Something like this? xrandr |awk '/connected/{print $1,$2}'
    – George Vasiliou
    Mar 27 at 20:56










  • I by "ports" you mean "holes in the casing where I can stick a connector" then the only place where those may be listed is the manufacturer's web site. (Example for the HP EliteBook 820 G3.) Only the manufacturer knows what they have designed and assembled. xrandr lists all the ports which the GPU provides; the manufacturer, in their wisdom, may chose not make all of them available externally, or to provide extra connectors via converters.
    – AlexP
    May 26 at 17:24
















0












0








0







I am looking for a command which prints all visual output ports a laptops has.



I have searched Stack and Google for a while now but I cannot find an answer.



The closest I got is xandr



eDP-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 277mm x 156mm
1366x768 60.00*+ 40.00
1360x768 59.80 59.96
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
960x600 60.00
960x540 59.99
800x600 60.00 60.32 56.25
840x525 60.01 59.88
800x512 60.17
700x525 59.98
640x512 60.02
720x450 59.89
640x480 60.00 59.94
680x384 59.80 59.96
576x432 60.06
512x384 60.00
400x300 60.32 56.34
320x240 60.05
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)


Looking for something like



HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)


Unfortunately this output doesn't show the information I need. The information from xrandr is not accurate.



Tried lspci, dmesg(maybe it is in there but couldn't find it), lshw and possible some more hardware listing commands.



The ideal situation would be



VGA x1
HDMI x1 or mini
DP x1
DVI x1


But a finger at the right direction would be greatly appreciated










share|improve this question















I am looking for a command which prints all visual output ports a laptops has.



I have searched Stack and Google for a while now but I cannot find an answer.



The closest I got is xandr



eDP-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 277mm x 156mm
1366x768 60.00*+ 40.00
1360x768 59.80 59.96
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
960x600 60.00
960x540 59.99
800x600 60.00 60.32 56.25
840x525 60.01 59.88
800x512 60.17
700x525 59.98
640x512 60.02
720x450 59.89
640x480 60.00 59.94
680x384 59.80 59.96
576x432 60.06
512x384 60.00
400x300 60.32 56.34
320x240 60.05
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)


Looking for something like



HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)


Unfortunately this output doesn't show the information I need. The information from xrandr is not accurate.



Tried lspci, dmesg(maybe it is in there but couldn't find it), lshw and possible some more hardware listing commands.



The ideal situation would be



VGA x1
HDMI x1 or mini
DP x1
DVI x1


But a finger at the right direction would be greatly appreciated







display xrandr output hdmi vga






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 18:07

























asked Mar 27 at 20:28









Rob Michiels

358




358








  • 1




    Something like this? xrandr |awk '/connected/{print $1,$2}'
    – George Vasiliou
    Mar 27 at 20:56










  • I by "ports" you mean "holes in the casing where I can stick a connector" then the only place where those may be listed is the manufacturer's web site. (Example for the HP EliteBook 820 G3.) Only the manufacturer knows what they have designed and assembled. xrandr lists all the ports which the GPU provides; the manufacturer, in their wisdom, may chose not make all of them available externally, or to provide extra connectors via converters.
    – AlexP
    May 26 at 17:24
















  • 1




    Something like this? xrandr |awk '/connected/{print $1,$2}'
    – George Vasiliou
    Mar 27 at 20:56










  • I by "ports" you mean "holes in the casing where I can stick a connector" then the only place where those may be listed is the manufacturer's web site. (Example for the HP EliteBook 820 G3.) Only the manufacturer knows what they have designed and assembled. xrandr lists all the ports which the GPU provides; the manufacturer, in their wisdom, may chose not make all of them available externally, or to provide extra connectors via converters.
    – AlexP
    May 26 at 17:24










1




1




Something like this? xrandr |awk '/connected/{print $1,$2}'
– George Vasiliou
Mar 27 at 20:56




Something like this? xrandr |awk '/connected/{print $1,$2}'
– George Vasiliou
Mar 27 at 20:56












I by "ports" you mean "holes in the casing where I can stick a connector" then the only place where those may be listed is the manufacturer's web site. (Example for the HP EliteBook 820 G3.) Only the manufacturer knows what they have designed and assembled. xrandr lists all the ports which the GPU provides; the manufacturer, in their wisdom, may chose not make all of them available externally, or to provide extra connectors via converters.
– AlexP
May 26 at 17:24






I by "ports" you mean "holes in the casing where I can stick a connector" then the only place where those may be listed is the manufacturer's web site. (Example for the HP EliteBook 820 G3.) Only the manufacturer knows what they have designed and assembled. xrandr lists all the ports which the GPU provides; the manufacturer, in their wisdom, may chose not make all of them available externally, or to provide extra connectors via converters.
– AlexP
May 26 at 17:24












4 Answers
4






active

oldest

votes


















0














xrandr | awk 'BEGIN { hdmi=dp=0; }; 
/^HDMI-/ { hdmi++;}; /^DP-/ { dp++; };
END { printf "%8s%sn","HDMI x",hdmi; printf "%8s%sn","DP x",dp; }'

HDMI x1
DP x0





share|improve this answer





















  • Unfortunately this doesn't give me the output I am looking for. I dont have a problem with substracting output but with the inacurate information from xrandr. I have a EliteBook 820 G1 which does not have a HDMI port but xrandr displays HDMI x2.
    – Rob Michiels
    Mar 28 at 18:07



















0














So I am messing with trying to change dual monitor setup on my machine and found your post. Because I'm interested in the actual display I'm looking for EDID resource from the attached monitor:



find /sys/devices -name "edid"


which produces an output like:



/sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-HDMI-A-1/edid
/sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DVI-D-1/edid
/sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-2/edid
/sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-HDMI-A-2/edid
/sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/edid


not all of which are valid but if you look at the individual folders in the /sys stuff theres file called status that looks like:



cat /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/status
connected


also more details about the connected display devices (vs the actual video card output) by doing something like:



cat /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/edid | edid-decode
Extracted contents:
header: 00 ff ff ff ff ff ff 00
serial number: 41 0c 0b 09 cd 0e 00 00 32 1a
version: 01 04
basic params: b5 46 28 78 3a
chroma info: 59 05 af 4f 42 af 27 0e 50 54
established: bd 4b 00
standard: d1 c0 81 80 81 40 95 0f 95 00 b3 00 81 c0 01 01
descriptor 1: 4d d0 00 a0 f0 70 3e 80 30 20 35 00 ba 8e 21 00 00 1a
descriptor 2: a3 66 00 a0 f0 70 1f 80 30 20 35 00 ba 8e 21 00 00 1a
descriptor 3: 00 00 00 fc 00 50 48 4c 20 33 32 38 50 36 56 0a 20 20
descriptor 4: 00 00 00 fd 00 17 50 1e a0 3c 01 0a 20 20 20 20 20 20
extensions: 01
checksum: 74

Manufacturer: PHL Model 90b Serial Number 3789
Made week 50 of 2016
EDID version: 1.4
Digital display
10 bits per primary color channel
DisplayPort interface
Maximum image size: 70 cm x 40 cm
Gamma: 2.20
DPMS levels: Off
Supported color formats: RGB 4:4:4, YCrCb 4:4:4, YCrCb 4:2:2
First detailed timing is preferred timing
Established timings supported:
720x400@70Hz
640x480@60Hz
640x480@67Hz
640x480@72Hz
640x480@75Hz
800x600@60Hz
800x600@75Hz
1024x768@60Hz
1024x768@75Hz
1280x1024@75Hz
Standard timings supported:
1920x1080@60Hz
1280x1024@60Hz
1280x960@60Hz
1440x900@75Hz
1440x900@60Hz
1680x1050@60Hz
1280x720@60Hz
Detailed mode: Clock 533.250 MHz, 698 mm x 398 mm
3840 3888 3920 4000 hborder 0
2160 2163 2168 2222 vborder 0
+hsync -vsync
Detailed mode: Clock 262.750 MHz, 698 mm x 398 mm
3840 3888 3920 4000 hborder 0
2160 2163 2168 2191 vborder 0
+hsync -vsync
Monitor name: PHL
Monitor ranges (bare limits): 23-80Hz V, 30-160kHz H, max dotclock 600MHz
Has 1 extension blocks
Checksum: 0x74 (valid)

CEA extension block
Extension version: 3
34 bytes of CEA data
Video data block
VIC 16 1920x1080@60Hz
VIC 31 1920x1080@50Hz
VIC 4 1280x720@60Hz
VIC 19 1280x720@50Hz
VIC 3 720x480@60Hz
VIC 18 720x576@50Hz
VIC 2 720x480@60Hz
VIC 17 720x576@50Hz
VIC 1 640x480@60Hz
VIC 5 1920x1080i@60Hz
VIC 20 1920x1080i@50Hz
Audio data block
Linear PCM, max channels 2
Supported sample rates (kHz): 48 44.1 32
Supported sample sizes (bits): 24 20 16
Speaker allocation data block
Speaker map: FL/FR
Vendor-specific data block, OUI 000c03 (HDMI)
Source physical address 1.0.0.0
DC_30bit
DC_Y444
DVI_Dual
Maximum TMDS clock: 600MHz
Extended HDMI video details:
HDMI VIC 0 3840x2160@30Hz
HDMI VIC 1 3840x2160@25Hz
HDMI VIC 2 3840x2160@24Hz
Underscans PC formats by default
Basic audio support
Supports YCbCr 4:4:4
Supports YCbCr 4:2:2
1 native detailed modes
Detailed mode: Clock 27.000 MHz, 698 mm x 398 mm
720 736 798 858 hborder 0
480 489 495 525 vborder 0
-hsync -vsync
Detailed mode: Clock 74.250 MHz, 698 mm x 398 mm
1280 1390 1430 1650 hborder 0
720 725 730 750 vborder 0
+hsync +vsync
Detailed mode: Clock 148.500 MHz, 698 mm x 398 mm
1920 2448 2492 2640 hborder 0
1080 1084 1089 1125 vborder 0
+hsync +vsync
Detailed mode: Clock 147.170 MHz, 698 mm x 398 mm
2048 2096 2128 2208 hborder 0
1080 1083 1093 1111 vborder 0
+hsync -vsync
Checksum: 0x18 (valid)

EDID block does NOT conform to EDID 1.3!
Detailed block string not properly terminated





share|improve this answer





























    0














    xmonLines=`xrandr | grep " connected" | while read line ; do echo 'i' ; done`
    regex="^(w+)s+.+$"
    let "int=1"
    for i in $xmonLines; do
    xmon=`xrandr | grep " connected" | sed $int!d`
    if [[ $xmon =~ $regex ]]; then
    printf "${BASH_REMATCH[1]}n"
    fi
    let "int++"
    done





    share|improve this answer





























      0














      This is a complicated problem.



      xrandr will display any and all outputs according to the knowledge of all the GPUs that are under control of the X11 server. But a hardware manufacturer may add built-in converters to e.g. convert a GPU chip's DisplayPort output to DVI, or just leave some of the GPU's outputs unwired. The GPU, and by extension xrandr, has no way to know about changes like that. Also, a listed DisplayPort output might physically be a Mini-DP or a Thunderbolt connection.



      If you have a laptop with two GPUs and have one of them disabled (either through BIOS or by software like Bumblebee for NVidia Optimus technology), the output information of a disabled GPU will obviously not be available to xrandr.



      Another way to approach the problem might be using dmidecode: with dmidecode -t 8, you should get a listing of all connectors/ports the hardware manufacturer has described in BIOS DMI data. However, this information may not always be correct or complete: I have a laptop that lists no DMI connector information at all.






      share|improve this answer





















        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "106"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433916%2fbash-list-all-display-output-ports%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        0














        xrandr | awk 'BEGIN { hdmi=dp=0; }; 
        /^HDMI-/ { hdmi++;}; /^DP-/ { dp++; };
        END { printf "%8s%sn","HDMI x",hdmi; printf "%8s%sn","DP x",dp; }'

        HDMI x1
        DP x0





        share|improve this answer





















        • Unfortunately this doesn't give me the output I am looking for. I dont have a problem with substracting output but with the inacurate information from xrandr. I have a EliteBook 820 G1 which does not have a HDMI port but xrandr displays HDMI x2.
          – Rob Michiels
          Mar 28 at 18:07
















        0














        xrandr | awk 'BEGIN { hdmi=dp=0; }; 
        /^HDMI-/ { hdmi++;}; /^DP-/ { dp++; };
        END { printf "%8s%sn","HDMI x",hdmi; printf "%8s%sn","DP x",dp; }'

        HDMI x1
        DP x0





        share|improve this answer





















        • Unfortunately this doesn't give me the output I am looking for. I dont have a problem with substracting output but with the inacurate information from xrandr. I have a EliteBook 820 G1 which does not have a HDMI port but xrandr displays HDMI x2.
          – Rob Michiels
          Mar 28 at 18:07














        0












        0








        0






        xrandr | awk 'BEGIN { hdmi=dp=0; }; 
        /^HDMI-/ { hdmi++;}; /^DP-/ { dp++; };
        END { printf "%8s%sn","HDMI x",hdmi; printf "%8s%sn","DP x",dp; }'

        HDMI x1
        DP x0





        share|improve this answer












        xrandr | awk 'BEGIN { hdmi=dp=0; }; 
        /^HDMI-/ { hdmi++;}; /^DP-/ { dp++; };
        END { printf "%8s%sn","HDMI x",hdmi; printf "%8s%sn","DP x",dp; }'

        HDMI x1
        DP x0






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 27 at 20:58









        Hauke Laging

        55.8k1285134




        55.8k1285134












        • Unfortunately this doesn't give me the output I am looking for. I dont have a problem with substracting output but with the inacurate information from xrandr. I have a EliteBook 820 G1 which does not have a HDMI port but xrandr displays HDMI x2.
          – Rob Michiels
          Mar 28 at 18:07


















        • Unfortunately this doesn't give me the output I am looking for. I dont have a problem with substracting output but with the inacurate information from xrandr. I have a EliteBook 820 G1 which does not have a HDMI port but xrandr displays HDMI x2.
          – Rob Michiels
          Mar 28 at 18:07
















        Unfortunately this doesn't give me the output I am looking for. I dont have a problem with substracting output but with the inacurate information from xrandr. I have a EliteBook 820 G1 which does not have a HDMI port but xrandr displays HDMI x2.
        – Rob Michiels
        Mar 28 at 18:07




        Unfortunately this doesn't give me the output I am looking for. I dont have a problem with substracting output but with the inacurate information from xrandr. I have a EliteBook 820 G1 which does not have a HDMI port but xrandr displays HDMI x2.
        – Rob Michiels
        Mar 28 at 18:07













        0














        So I am messing with trying to change dual monitor setup on my machine and found your post. Because I'm interested in the actual display I'm looking for EDID resource from the attached monitor:



        find /sys/devices -name "edid"


        which produces an output like:



        /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-HDMI-A-1/edid
        /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DVI-D-1/edid
        /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-2/edid
        /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-HDMI-A-2/edid
        /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/edid


        not all of which are valid but if you look at the individual folders in the /sys stuff theres file called status that looks like:



        cat /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/status
        connected


        also more details about the connected display devices (vs the actual video card output) by doing something like:



        cat /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/edid | edid-decode
        Extracted contents:
        header: 00 ff ff ff ff ff ff 00
        serial number: 41 0c 0b 09 cd 0e 00 00 32 1a
        version: 01 04
        basic params: b5 46 28 78 3a
        chroma info: 59 05 af 4f 42 af 27 0e 50 54
        established: bd 4b 00
        standard: d1 c0 81 80 81 40 95 0f 95 00 b3 00 81 c0 01 01
        descriptor 1: 4d d0 00 a0 f0 70 3e 80 30 20 35 00 ba 8e 21 00 00 1a
        descriptor 2: a3 66 00 a0 f0 70 1f 80 30 20 35 00 ba 8e 21 00 00 1a
        descriptor 3: 00 00 00 fc 00 50 48 4c 20 33 32 38 50 36 56 0a 20 20
        descriptor 4: 00 00 00 fd 00 17 50 1e a0 3c 01 0a 20 20 20 20 20 20
        extensions: 01
        checksum: 74

        Manufacturer: PHL Model 90b Serial Number 3789
        Made week 50 of 2016
        EDID version: 1.4
        Digital display
        10 bits per primary color channel
        DisplayPort interface
        Maximum image size: 70 cm x 40 cm
        Gamma: 2.20
        DPMS levels: Off
        Supported color formats: RGB 4:4:4, YCrCb 4:4:4, YCrCb 4:2:2
        First detailed timing is preferred timing
        Established timings supported:
        720x400@70Hz
        640x480@60Hz
        640x480@67Hz
        640x480@72Hz
        640x480@75Hz
        800x600@60Hz
        800x600@75Hz
        1024x768@60Hz
        1024x768@75Hz
        1280x1024@75Hz
        Standard timings supported:
        1920x1080@60Hz
        1280x1024@60Hz
        1280x960@60Hz
        1440x900@75Hz
        1440x900@60Hz
        1680x1050@60Hz
        1280x720@60Hz
        Detailed mode: Clock 533.250 MHz, 698 mm x 398 mm
        3840 3888 3920 4000 hborder 0
        2160 2163 2168 2222 vborder 0
        +hsync -vsync
        Detailed mode: Clock 262.750 MHz, 698 mm x 398 mm
        3840 3888 3920 4000 hborder 0
        2160 2163 2168 2191 vborder 0
        +hsync -vsync
        Monitor name: PHL
        Monitor ranges (bare limits): 23-80Hz V, 30-160kHz H, max dotclock 600MHz
        Has 1 extension blocks
        Checksum: 0x74 (valid)

        CEA extension block
        Extension version: 3
        34 bytes of CEA data
        Video data block
        VIC 16 1920x1080@60Hz
        VIC 31 1920x1080@50Hz
        VIC 4 1280x720@60Hz
        VIC 19 1280x720@50Hz
        VIC 3 720x480@60Hz
        VIC 18 720x576@50Hz
        VIC 2 720x480@60Hz
        VIC 17 720x576@50Hz
        VIC 1 640x480@60Hz
        VIC 5 1920x1080i@60Hz
        VIC 20 1920x1080i@50Hz
        Audio data block
        Linear PCM, max channels 2
        Supported sample rates (kHz): 48 44.1 32
        Supported sample sizes (bits): 24 20 16
        Speaker allocation data block
        Speaker map: FL/FR
        Vendor-specific data block, OUI 000c03 (HDMI)
        Source physical address 1.0.0.0
        DC_30bit
        DC_Y444
        DVI_Dual
        Maximum TMDS clock: 600MHz
        Extended HDMI video details:
        HDMI VIC 0 3840x2160@30Hz
        HDMI VIC 1 3840x2160@25Hz
        HDMI VIC 2 3840x2160@24Hz
        Underscans PC formats by default
        Basic audio support
        Supports YCbCr 4:4:4
        Supports YCbCr 4:2:2
        1 native detailed modes
        Detailed mode: Clock 27.000 MHz, 698 mm x 398 mm
        720 736 798 858 hborder 0
        480 489 495 525 vborder 0
        -hsync -vsync
        Detailed mode: Clock 74.250 MHz, 698 mm x 398 mm
        1280 1390 1430 1650 hborder 0
        720 725 730 750 vborder 0
        +hsync +vsync
        Detailed mode: Clock 148.500 MHz, 698 mm x 398 mm
        1920 2448 2492 2640 hborder 0
        1080 1084 1089 1125 vborder 0
        +hsync +vsync
        Detailed mode: Clock 147.170 MHz, 698 mm x 398 mm
        2048 2096 2128 2208 hborder 0
        1080 1083 1093 1111 vborder 0
        +hsync -vsync
        Checksum: 0x18 (valid)

        EDID block does NOT conform to EDID 1.3!
        Detailed block string not properly terminated





        share|improve this answer


























          0














          So I am messing with trying to change dual monitor setup on my machine and found your post. Because I'm interested in the actual display I'm looking for EDID resource from the attached monitor:



          find /sys/devices -name "edid"


          which produces an output like:



          /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-HDMI-A-1/edid
          /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DVI-D-1/edid
          /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-2/edid
          /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-HDMI-A-2/edid
          /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/edid


          not all of which are valid but if you look at the individual folders in the /sys stuff theres file called status that looks like:



          cat /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/status
          connected


          also more details about the connected display devices (vs the actual video card output) by doing something like:



          cat /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/edid | edid-decode
          Extracted contents:
          header: 00 ff ff ff ff ff ff 00
          serial number: 41 0c 0b 09 cd 0e 00 00 32 1a
          version: 01 04
          basic params: b5 46 28 78 3a
          chroma info: 59 05 af 4f 42 af 27 0e 50 54
          established: bd 4b 00
          standard: d1 c0 81 80 81 40 95 0f 95 00 b3 00 81 c0 01 01
          descriptor 1: 4d d0 00 a0 f0 70 3e 80 30 20 35 00 ba 8e 21 00 00 1a
          descriptor 2: a3 66 00 a0 f0 70 1f 80 30 20 35 00 ba 8e 21 00 00 1a
          descriptor 3: 00 00 00 fc 00 50 48 4c 20 33 32 38 50 36 56 0a 20 20
          descriptor 4: 00 00 00 fd 00 17 50 1e a0 3c 01 0a 20 20 20 20 20 20
          extensions: 01
          checksum: 74

          Manufacturer: PHL Model 90b Serial Number 3789
          Made week 50 of 2016
          EDID version: 1.4
          Digital display
          10 bits per primary color channel
          DisplayPort interface
          Maximum image size: 70 cm x 40 cm
          Gamma: 2.20
          DPMS levels: Off
          Supported color formats: RGB 4:4:4, YCrCb 4:4:4, YCrCb 4:2:2
          First detailed timing is preferred timing
          Established timings supported:
          720x400@70Hz
          640x480@60Hz
          640x480@67Hz
          640x480@72Hz
          640x480@75Hz
          800x600@60Hz
          800x600@75Hz
          1024x768@60Hz
          1024x768@75Hz
          1280x1024@75Hz
          Standard timings supported:
          1920x1080@60Hz
          1280x1024@60Hz
          1280x960@60Hz
          1440x900@75Hz
          1440x900@60Hz
          1680x1050@60Hz
          1280x720@60Hz
          Detailed mode: Clock 533.250 MHz, 698 mm x 398 mm
          3840 3888 3920 4000 hborder 0
          2160 2163 2168 2222 vborder 0
          +hsync -vsync
          Detailed mode: Clock 262.750 MHz, 698 mm x 398 mm
          3840 3888 3920 4000 hborder 0
          2160 2163 2168 2191 vborder 0
          +hsync -vsync
          Monitor name: PHL
          Monitor ranges (bare limits): 23-80Hz V, 30-160kHz H, max dotclock 600MHz
          Has 1 extension blocks
          Checksum: 0x74 (valid)

          CEA extension block
          Extension version: 3
          34 bytes of CEA data
          Video data block
          VIC 16 1920x1080@60Hz
          VIC 31 1920x1080@50Hz
          VIC 4 1280x720@60Hz
          VIC 19 1280x720@50Hz
          VIC 3 720x480@60Hz
          VIC 18 720x576@50Hz
          VIC 2 720x480@60Hz
          VIC 17 720x576@50Hz
          VIC 1 640x480@60Hz
          VIC 5 1920x1080i@60Hz
          VIC 20 1920x1080i@50Hz
          Audio data block
          Linear PCM, max channels 2
          Supported sample rates (kHz): 48 44.1 32
          Supported sample sizes (bits): 24 20 16
          Speaker allocation data block
          Speaker map: FL/FR
          Vendor-specific data block, OUI 000c03 (HDMI)
          Source physical address 1.0.0.0
          DC_30bit
          DC_Y444
          DVI_Dual
          Maximum TMDS clock: 600MHz
          Extended HDMI video details:
          HDMI VIC 0 3840x2160@30Hz
          HDMI VIC 1 3840x2160@25Hz
          HDMI VIC 2 3840x2160@24Hz
          Underscans PC formats by default
          Basic audio support
          Supports YCbCr 4:4:4
          Supports YCbCr 4:2:2
          1 native detailed modes
          Detailed mode: Clock 27.000 MHz, 698 mm x 398 mm
          720 736 798 858 hborder 0
          480 489 495 525 vborder 0
          -hsync -vsync
          Detailed mode: Clock 74.250 MHz, 698 mm x 398 mm
          1280 1390 1430 1650 hborder 0
          720 725 730 750 vborder 0
          +hsync +vsync
          Detailed mode: Clock 148.500 MHz, 698 mm x 398 mm
          1920 2448 2492 2640 hborder 0
          1080 1084 1089 1125 vborder 0
          +hsync +vsync
          Detailed mode: Clock 147.170 MHz, 698 mm x 398 mm
          2048 2096 2128 2208 hborder 0
          1080 1083 1093 1111 vborder 0
          +hsync -vsync
          Checksum: 0x18 (valid)

          EDID block does NOT conform to EDID 1.3!
          Detailed block string not properly terminated





          share|improve this answer
























            0












            0








            0






            So I am messing with trying to change dual monitor setup on my machine and found your post. Because I'm interested in the actual display I'm looking for EDID resource from the attached monitor:



            find /sys/devices -name "edid"


            which produces an output like:



            /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-HDMI-A-1/edid
            /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DVI-D-1/edid
            /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-2/edid
            /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-HDMI-A-2/edid
            /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/edid


            not all of which are valid but if you look at the individual folders in the /sys stuff theres file called status that looks like:



            cat /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/status
            connected


            also more details about the connected display devices (vs the actual video card output) by doing something like:



            cat /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/edid | edid-decode
            Extracted contents:
            header: 00 ff ff ff ff ff ff 00
            serial number: 41 0c 0b 09 cd 0e 00 00 32 1a
            version: 01 04
            basic params: b5 46 28 78 3a
            chroma info: 59 05 af 4f 42 af 27 0e 50 54
            established: bd 4b 00
            standard: d1 c0 81 80 81 40 95 0f 95 00 b3 00 81 c0 01 01
            descriptor 1: 4d d0 00 a0 f0 70 3e 80 30 20 35 00 ba 8e 21 00 00 1a
            descriptor 2: a3 66 00 a0 f0 70 1f 80 30 20 35 00 ba 8e 21 00 00 1a
            descriptor 3: 00 00 00 fc 00 50 48 4c 20 33 32 38 50 36 56 0a 20 20
            descriptor 4: 00 00 00 fd 00 17 50 1e a0 3c 01 0a 20 20 20 20 20 20
            extensions: 01
            checksum: 74

            Manufacturer: PHL Model 90b Serial Number 3789
            Made week 50 of 2016
            EDID version: 1.4
            Digital display
            10 bits per primary color channel
            DisplayPort interface
            Maximum image size: 70 cm x 40 cm
            Gamma: 2.20
            DPMS levels: Off
            Supported color formats: RGB 4:4:4, YCrCb 4:4:4, YCrCb 4:2:2
            First detailed timing is preferred timing
            Established timings supported:
            720x400@70Hz
            640x480@60Hz
            640x480@67Hz
            640x480@72Hz
            640x480@75Hz
            800x600@60Hz
            800x600@75Hz
            1024x768@60Hz
            1024x768@75Hz
            1280x1024@75Hz
            Standard timings supported:
            1920x1080@60Hz
            1280x1024@60Hz
            1280x960@60Hz
            1440x900@75Hz
            1440x900@60Hz
            1680x1050@60Hz
            1280x720@60Hz
            Detailed mode: Clock 533.250 MHz, 698 mm x 398 mm
            3840 3888 3920 4000 hborder 0
            2160 2163 2168 2222 vborder 0
            +hsync -vsync
            Detailed mode: Clock 262.750 MHz, 698 mm x 398 mm
            3840 3888 3920 4000 hborder 0
            2160 2163 2168 2191 vborder 0
            +hsync -vsync
            Monitor name: PHL
            Monitor ranges (bare limits): 23-80Hz V, 30-160kHz H, max dotclock 600MHz
            Has 1 extension blocks
            Checksum: 0x74 (valid)

            CEA extension block
            Extension version: 3
            34 bytes of CEA data
            Video data block
            VIC 16 1920x1080@60Hz
            VIC 31 1920x1080@50Hz
            VIC 4 1280x720@60Hz
            VIC 19 1280x720@50Hz
            VIC 3 720x480@60Hz
            VIC 18 720x576@50Hz
            VIC 2 720x480@60Hz
            VIC 17 720x576@50Hz
            VIC 1 640x480@60Hz
            VIC 5 1920x1080i@60Hz
            VIC 20 1920x1080i@50Hz
            Audio data block
            Linear PCM, max channels 2
            Supported sample rates (kHz): 48 44.1 32
            Supported sample sizes (bits): 24 20 16
            Speaker allocation data block
            Speaker map: FL/FR
            Vendor-specific data block, OUI 000c03 (HDMI)
            Source physical address 1.0.0.0
            DC_30bit
            DC_Y444
            DVI_Dual
            Maximum TMDS clock: 600MHz
            Extended HDMI video details:
            HDMI VIC 0 3840x2160@30Hz
            HDMI VIC 1 3840x2160@25Hz
            HDMI VIC 2 3840x2160@24Hz
            Underscans PC formats by default
            Basic audio support
            Supports YCbCr 4:4:4
            Supports YCbCr 4:2:2
            1 native detailed modes
            Detailed mode: Clock 27.000 MHz, 698 mm x 398 mm
            720 736 798 858 hborder 0
            480 489 495 525 vborder 0
            -hsync -vsync
            Detailed mode: Clock 74.250 MHz, 698 mm x 398 mm
            1280 1390 1430 1650 hborder 0
            720 725 730 750 vborder 0
            +hsync +vsync
            Detailed mode: Clock 148.500 MHz, 698 mm x 398 mm
            1920 2448 2492 2640 hborder 0
            1080 1084 1089 1125 vborder 0
            +hsync +vsync
            Detailed mode: Clock 147.170 MHz, 698 mm x 398 mm
            2048 2096 2128 2208 hborder 0
            1080 1083 1093 1111 vborder 0
            +hsync -vsync
            Checksum: 0x18 (valid)

            EDID block does NOT conform to EDID 1.3!
            Detailed block string not properly terminated





            share|improve this answer












            So I am messing with trying to change dual monitor setup on my machine and found your post. Because I'm interested in the actual display I'm looking for EDID resource from the attached monitor:



            find /sys/devices -name "edid"


            which produces an output like:



            /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-HDMI-A-1/edid
            /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DVI-D-1/edid
            /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-2/edid
            /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-HDMI-A-2/edid
            /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/edid


            not all of which are valid but if you look at the individual folders in the /sys stuff theres file called status that looks like:



            cat /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/status
            connected


            also more details about the connected display devices (vs the actual video card output) by doing something like:



            cat /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0/card0-DP-1/edid | edid-decode
            Extracted contents:
            header: 00 ff ff ff ff ff ff 00
            serial number: 41 0c 0b 09 cd 0e 00 00 32 1a
            version: 01 04
            basic params: b5 46 28 78 3a
            chroma info: 59 05 af 4f 42 af 27 0e 50 54
            established: bd 4b 00
            standard: d1 c0 81 80 81 40 95 0f 95 00 b3 00 81 c0 01 01
            descriptor 1: 4d d0 00 a0 f0 70 3e 80 30 20 35 00 ba 8e 21 00 00 1a
            descriptor 2: a3 66 00 a0 f0 70 1f 80 30 20 35 00 ba 8e 21 00 00 1a
            descriptor 3: 00 00 00 fc 00 50 48 4c 20 33 32 38 50 36 56 0a 20 20
            descriptor 4: 00 00 00 fd 00 17 50 1e a0 3c 01 0a 20 20 20 20 20 20
            extensions: 01
            checksum: 74

            Manufacturer: PHL Model 90b Serial Number 3789
            Made week 50 of 2016
            EDID version: 1.4
            Digital display
            10 bits per primary color channel
            DisplayPort interface
            Maximum image size: 70 cm x 40 cm
            Gamma: 2.20
            DPMS levels: Off
            Supported color formats: RGB 4:4:4, YCrCb 4:4:4, YCrCb 4:2:2
            First detailed timing is preferred timing
            Established timings supported:
            720x400@70Hz
            640x480@60Hz
            640x480@67Hz
            640x480@72Hz
            640x480@75Hz
            800x600@60Hz
            800x600@75Hz
            1024x768@60Hz
            1024x768@75Hz
            1280x1024@75Hz
            Standard timings supported:
            1920x1080@60Hz
            1280x1024@60Hz
            1280x960@60Hz
            1440x900@75Hz
            1440x900@60Hz
            1680x1050@60Hz
            1280x720@60Hz
            Detailed mode: Clock 533.250 MHz, 698 mm x 398 mm
            3840 3888 3920 4000 hborder 0
            2160 2163 2168 2222 vborder 0
            +hsync -vsync
            Detailed mode: Clock 262.750 MHz, 698 mm x 398 mm
            3840 3888 3920 4000 hborder 0
            2160 2163 2168 2191 vborder 0
            +hsync -vsync
            Monitor name: PHL
            Monitor ranges (bare limits): 23-80Hz V, 30-160kHz H, max dotclock 600MHz
            Has 1 extension blocks
            Checksum: 0x74 (valid)

            CEA extension block
            Extension version: 3
            34 bytes of CEA data
            Video data block
            VIC 16 1920x1080@60Hz
            VIC 31 1920x1080@50Hz
            VIC 4 1280x720@60Hz
            VIC 19 1280x720@50Hz
            VIC 3 720x480@60Hz
            VIC 18 720x576@50Hz
            VIC 2 720x480@60Hz
            VIC 17 720x576@50Hz
            VIC 1 640x480@60Hz
            VIC 5 1920x1080i@60Hz
            VIC 20 1920x1080i@50Hz
            Audio data block
            Linear PCM, max channels 2
            Supported sample rates (kHz): 48 44.1 32
            Supported sample sizes (bits): 24 20 16
            Speaker allocation data block
            Speaker map: FL/FR
            Vendor-specific data block, OUI 000c03 (HDMI)
            Source physical address 1.0.0.0
            DC_30bit
            DC_Y444
            DVI_Dual
            Maximum TMDS clock: 600MHz
            Extended HDMI video details:
            HDMI VIC 0 3840x2160@30Hz
            HDMI VIC 1 3840x2160@25Hz
            HDMI VIC 2 3840x2160@24Hz
            Underscans PC formats by default
            Basic audio support
            Supports YCbCr 4:4:4
            Supports YCbCr 4:2:2
            1 native detailed modes
            Detailed mode: Clock 27.000 MHz, 698 mm x 398 mm
            720 736 798 858 hborder 0
            480 489 495 525 vborder 0
            -hsync -vsync
            Detailed mode: Clock 74.250 MHz, 698 mm x 398 mm
            1280 1390 1430 1650 hborder 0
            720 725 730 750 vborder 0
            +hsync +vsync
            Detailed mode: Clock 148.500 MHz, 698 mm x 398 mm
            1920 2448 2492 2640 hborder 0
            1080 1084 1089 1125 vborder 0
            +hsync +vsync
            Detailed mode: Clock 147.170 MHz, 698 mm x 398 mm
            2048 2096 2128 2208 hborder 0
            1080 1083 1093 1111 vborder 0
            +hsync -vsync
            Checksum: 0x18 (valid)

            EDID block does NOT conform to EDID 1.3!
            Detailed block string not properly terminated






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered May 26 at 16:38









            Happy Heyoka

            111




            111























                0














                xmonLines=`xrandr | grep " connected" | while read line ; do echo 'i' ; done`
                regex="^(w+)s+.+$"
                let "int=1"
                for i in $xmonLines; do
                xmon=`xrandr | grep " connected" | sed $int!d`
                if [[ $xmon =~ $regex ]]; then
                printf "${BASH_REMATCH[1]}n"
                fi
                let "int++"
                done





                share|improve this answer


























                  0














                  xmonLines=`xrandr | grep " connected" | while read line ; do echo 'i' ; done`
                  regex="^(w+)s+.+$"
                  let "int=1"
                  for i in $xmonLines; do
                  xmon=`xrandr | grep " connected" | sed $int!d`
                  if [[ $xmon =~ $regex ]]; then
                  printf "${BASH_REMATCH[1]}n"
                  fi
                  let "int++"
                  done





                  share|improve this answer
























                    0












                    0








                    0






                    xmonLines=`xrandr | grep " connected" | while read line ; do echo 'i' ; done`
                    regex="^(w+)s+.+$"
                    let "int=1"
                    for i in $xmonLines; do
                    xmon=`xrandr | grep " connected" | sed $int!d`
                    if [[ $xmon =~ $regex ]]; then
                    printf "${BASH_REMATCH[1]}n"
                    fi
                    let "int++"
                    done





                    share|improve this answer












                    xmonLines=`xrandr | grep " connected" | while read line ; do echo 'i' ; done`
                    regex="^(w+)s+.+$"
                    let "int=1"
                    for i in $xmonLines; do
                    xmon=`xrandr | grep " connected" | sed $int!d`
                    if [[ $xmon =~ $regex ]]; then
                    printf "${BASH_REMATCH[1]}n"
                    fi
                    let "int++"
                    done






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 18 at 14:03









                    RunarSF

                    11




                    11























                        0














                        This is a complicated problem.



                        xrandr will display any and all outputs according to the knowledge of all the GPUs that are under control of the X11 server. But a hardware manufacturer may add built-in converters to e.g. convert a GPU chip's DisplayPort output to DVI, or just leave some of the GPU's outputs unwired. The GPU, and by extension xrandr, has no way to know about changes like that. Also, a listed DisplayPort output might physically be a Mini-DP or a Thunderbolt connection.



                        If you have a laptop with two GPUs and have one of them disabled (either through BIOS or by software like Bumblebee for NVidia Optimus technology), the output information of a disabled GPU will obviously not be available to xrandr.



                        Another way to approach the problem might be using dmidecode: with dmidecode -t 8, you should get a listing of all connectors/ports the hardware manufacturer has described in BIOS DMI data. However, this information may not always be correct or complete: I have a laptop that lists no DMI connector information at all.






                        share|improve this answer


























                          0














                          This is a complicated problem.



                          xrandr will display any and all outputs according to the knowledge of all the GPUs that are under control of the X11 server. But a hardware manufacturer may add built-in converters to e.g. convert a GPU chip's DisplayPort output to DVI, or just leave some of the GPU's outputs unwired. The GPU, and by extension xrandr, has no way to know about changes like that. Also, a listed DisplayPort output might physically be a Mini-DP or a Thunderbolt connection.



                          If you have a laptop with two GPUs and have one of them disabled (either through BIOS or by software like Bumblebee for NVidia Optimus technology), the output information of a disabled GPU will obviously not be available to xrandr.



                          Another way to approach the problem might be using dmidecode: with dmidecode -t 8, you should get a listing of all connectors/ports the hardware manufacturer has described in BIOS DMI data. However, this information may not always be correct or complete: I have a laptop that lists no DMI connector information at all.






                          share|improve this answer
























                            0












                            0








                            0






                            This is a complicated problem.



                            xrandr will display any and all outputs according to the knowledge of all the GPUs that are under control of the X11 server. But a hardware manufacturer may add built-in converters to e.g. convert a GPU chip's DisplayPort output to DVI, or just leave some of the GPU's outputs unwired. The GPU, and by extension xrandr, has no way to know about changes like that. Also, a listed DisplayPort output might physically be a Mini-DP or a Thunderbolt connection.



                            If you have a laptop with two GPUs and have one of them disabled (either through BIOS or by software like Bumblebee for NVidia Optimus technology), the output information of a disabled GPU will obviously not be available to xrandr.



                            Another way to approach the problem might be using dmidecode: with dmidecode -t 8, you should get a listing of all connectors/ports the hardware manufacturer has described in BIOS DMI data. However, this information may not always be correct or complete: I have a laptop that lists no DMI connector information at all.






                            share|improve this answer












                            This is a complicated problem.



                            xrandr will display any and all outputs according to the knowledge of all the GPUs that are under control of the X11 server. But a hardware manufacturer may add built-in converters to e.g. convert a GPU chip's DisplayPort output to DVI, or just leave some of the GPU's outputs unwired. The GPU, and by extension xrandr, has no way to know about changes like that. Also, a listed DisplayPort output might physically be a Mini-DP or a Thunderbolt connection.



                            If you have a laptop with two GPUs and have one of them disabled (either through BIOS or by software like Bumblebee for NVidia Optimus technology), the output information of a disabled GPU will obviously not be available to xrandr.



                            Another way to approach the problem might be using dmidecode: with dmidecode -t 8, you should get a listing of all connectors/ports the hardware manufacturer has described in BIOS DMI data. However, this information may not always be correct or complete: I have a laptop that lists no DMI connector information at all.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Dec 18 at 15:50









                            telcoM

                            15.8k12143




                            15.8k12143






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.





                                Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                Please pay close attention to the following guidance:


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433916%2fbash-list-all-display-output-ports%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Morgemoulin

                                Scott Moir

                                Souastre