Directly access the VGA pins on linux












1















My motherboard has a VGA output port, just like this one.



Let's say I want to directly access the state of each of the pins on this connector, so that I could control some electronic device, is there any way I can do this?



I'm on Linux, and my first thought was to have a look in /sys/class/, since I know from there I can control certain LEDs on my keyboard, and such. Interestingly, I found a folder called gpio, but I can't any information about how to use that (since I'm not on a raspberry Pi, or anything, I don't have GPIO pins to my knowledge.)



So, is there any way to control the state of individual VGA pins?










share|improve this question























  • VGA is not a GPIO port. It’s not even a digital output.

    – Daniel B
    Feb 17 at 14:05











  • @DanielB I know it's not a GPIO port.

    – Jacob Garby
    Feb 17 at 14:32






  • 1





    electronics.stackexchange.com/questions/61290/…

    – xenoid
    Feb 17 at 17:02











  • @xenoid Thanks! Those answers look good, but if I need to use something like that I'll just try to make the adapter myself :)

    – Jacob Garby
    Feb 17 at 17:34
















1















My motherboard has a VGA output port, just like this one.



Let's say I want to directly access the state of each of the pins on this connector, so that I could control some electronic device, is there any way I can do this?



I'm on Linux, and my first thought was to have a look in /sys/class/, since I know from there I can control certain LEDs on my keyboard, and such. Interestingly, I found a folder called gpio, but I can't any information about how to use that (since I'm not on a raspberry Pi, or anything, I don't have GPIO pins to my knowledge.)



So, is there any way to control the state of individual VGA pins?










share|improve this question























  • VGA is not a GPIO port. It’s not even a digital output.

    – Daniel B
    Feb 17 at 14:05











  • @DanielB I know it's not a GPIO port.

    – Jacob Garby
    Feb 17 at 14:32






  • 1





    electronics.stackexchange.com/questions/61290/…

    – xenoid
    Feb 17 at 17:02











  • @xenoid Thanks! Those answers look good, but if I need to use something like that I'll just try to make the adapter myself :)

    – Jacob Garby
    Feb 17 at 17:34














1












1








1








My motherboard has a VGA output port, just like this one.



Let's say I want to directly access the state of each of the pins on this connector, so that I could control some electronic device, is there any way I can do this?



I'm on Linux, and my first thought was to have a look in /sys/class/, since I know from there I can control certain LEDs on my keyboard, and such. Interestingly, I found a folder called gpio, but I can't any information about how to use that (since I'm not on a raspberry Pi, or anything, I don't have GPIO pins to my knowledge.)



So, is there any way to control the state of individual VGA pins?










share|improve this question














My motherboard has a VGA output port, just like this one.



Let's say I want to directly access the state of each of the pins on this connector, so that I could control some electronic device, is there any way I can do this?



I'm on Linux, and my first thought was to have a look in /sys/class/, since I know from there I can control certain LEDs on my keyboard, and such. Interestingly, I found a folder called gpio, but I can't any information about how to use that (since I'm not on a raspberry Pi, or anything, I don't have GPIO pins to my knowledge.)



So, is there any way to control the state of individual VGA pins?







linux vga






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 17 at 13:55









Jacob GarbyJacob Garby

1083




1083













  • VGA is not a GPIO port. It’s not even a digital output.

    – Daniel B
    Feb 17 at 14:05











  • @DanielB I know it's not a GPIO port.

    – Jacob Garby
    Feb 17 at 14:32






  • 1





    electronics.stackexchange.com/questions/61290/…

    – xenoid
    Feb 17 at 17:02











  • @xenoid Thanks! Those answers look good, but if I need to use something like that I'll just try to make the adapter myself :)

    – Jacob Garby
    Feb 17 at 17:34



















  • VGA is not a GPIO port. It’s not even a digital output.

    – Daniel B
    Feb 17 at 14:05











  • @DanielB I know it's not a GPIO port.

    – Jacob Garby
    Feb 17 at 14:32






  • 1





    electronics.stackexchange.com/questions/61290/…

    – xenoid
    Feb 17 at 17:02











  • @xenoid Thanks! Those answers look good, but if I need to use something like that I'll just try to make the adapter myself :)

    – Jacob Garby
    Feb 17 at 17:34

















VGA is not a GPIO port. It’s not even a digital output.

– Daniel B
Feb 17 at 14:05





VGA is not a GPIO port. It’s not even a digital output.

– Daniel B
Feb 17 at 14:05













@DanielB I know it's not a GPIO port.

– Jacob Garby
Feb 17 at 14:32





@DanielB I know it's not a GPIO port.

– Jacob Garby
Feb 17 at 14:32




1




1





electronics.stackexchange.com/questions/61290/…

– xenoid
Feb 17 at 17:02





electronics.stackexchange.com/questions/61290/…

– xenoid
Feb 17 at 17:02













@xenoid Thanks! Those answers look good, but if I need to use something like that I'll just try to make the adapter myself :)

– Jacob Garby
Feb 17 at 17:34





@xenoid Thanks! Those answers look good, but if I need to use something like that I'll just try to make the adapter myself :)

– Jacob Garby
Feb 17 at 17:34










1 Answer
1






active

oldest

votes


















2














You can directly control the state of exactly two pins, namely the clock and data pins for the I2C bus used for EDID. See pinout.



However, unless you use an electronic device which itself is controlled by I2C (there are plenty, for example I2C expanders like the MCP23008 or MCP23017, which give you 8 resp. 16 signals you can then control directly via the I2C bus), you'll have to modify your existing video driver to give you an API where you can directly set the state.



You can indirectly control the red, green, blue and the two sync pins in a repeating, time-dependent way, by programming your VGA controller with the timing and writing bit patterns in the frame buffer. This may or may not be useful, depending on what you want to do with it.






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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%2fsuperuser.com%2fquestions%2f1406727%2fdirectly-access-the-vga-pins-on-linux%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    You can directly control the state of exactly two pins, namely the clock and data pins for the I2C bus used for EDID. See pinout.



    However, unless you use an electronic device which itself is controlled by I2C (there are plenty, for example I2C expanders like the MCP23008 or MCP23017, which give you 8 resp. 16 signals you can then control directly via the I2C bus), you'll have to modify your existing video driver to give you an API where you can directly set the state.



    You can indirectly control the red, green, blue and the two sync pins in a repeating, time-dependent way, by programming your VGA controller with the timing and writing bit patterns in the frame buffer. This may or may not be useful, depending on what you want to do with it.






    share|improve this answer




























      2














      You can directly control the state of exactly two pins, namely the clock and data pins for the I2C bus used for EDID. See pinout.



      However, unless you use an electronic device which itself is controlled by I2C (there are plenty, for example I2C expanders like the MCP23008 or MCP23017, which give you 8 resp. 16 signals you can then control directly via the I2C bus), you'll have to modify your existing video driver to give you an API where you can directly set the state.



      You can indirectly control the red, green, blue and the two sync pins in a repeating, time-dependent way, by programming your VGA controller with the timing and writing bit patterns in the frame buffer. This may or may not be useful, depending on what you want to do with it.






      share|improve this answer


























        2












        2








        2







        You can directly control the state of exactly two pins, namely the clock and data pins for the I2C bus used for EDID. See pinout.



        However, unless you use an electronic device which itself is controlled by I2C (there are plenty, for example I2C expanders like the MCP23008 or MCP23017, which give you 8 resp. 16 signals you can then control directly via the I2C bus), you'll have to modify your existing video driver to give you an API where you can directly set the state.



        You can indirectly control the red, green, blue and the two sync pins in a repeating, time-dependent way, by programming your VGA controller with the timing and writing bit patterns in the frame buffer. This may or may not be useful, depending on what you want to do with it.






        share|improve this answer













        You can directly control the state of exactly two pins, namely the clock and data pins for the I2C bus used for EDID. See pinout.



        However, unless you use an electronic device which itself is controlled by I2C (there are plenty, for example I2C expanders like the MCP23008 or MCP23017, which give you 8 resp. 16 signals you can then control directly via the I2C bus), you'll have to modify your existing video driver to give you an API where you can directly set the state.



        You can indirectly control the red, green, blue and the two sync pins in a repeating, time-dependent way, by programming your VGA controller with the timing and writing bit patterns in the frame buffer. This may or may not be useful, depending on what you want to do with it.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 17 at 17:55









        dirktdirkt

        9,47431222




        9,47431222






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • 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%2fsuperuser.com%2fquestions%2f1406727%2fdirectly-access-the-vga-pins-on-linux%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

            flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

            Mangá

            Eduardo VII do Reino Unido