How to enable monitor from terminal?












24















I accidentally disabled my monitors, so when I log in I land on a blank, back-lit screen. I can open terminals with Ctrl+Alt+F#, so how do I enable the monitor from terminal?



I tried xrandr, but it can't open display. xset does not work either. I found this question which closely resembles my problem. The answer provides a script to be put in /etc/X11/Xreset.d.



Running it does not solve my problem (though it is likely I don't understand how to use it properly). I think I somehow made the new default to be "disable monitors".



Running Ubuntu Studio 13.10. I do not have nVidia drivers. I can't find an xorg.conf file to remove. Thankful for any and all input!



Edit: Output of command xrandr -d :0



Screen 0: minimum 320x200, current 1366 x 768, maximum 32767 x 32767
LVDS1 connected 1366x768+-32768+-32768 (normal left inverted right x axis y axis) 344mm x 192mm
1366x768 60.0*
1360x768 59.8 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)


Still being a CLI beginner I fail to understand from man xrandr how to switch on (there is an off option) or enable displays. Output of xrandr --auto is Can't open display



Edit 2: Output of xrandr -d :0 --auto



Configure crtc 0 failed


Maybe I just have to reinstall X11?



Edit 3: Outputs of suggested commands / which xset commands I tried:



xrandr -d :0 output LVDS1 --auto



    configure crtc 0 failed


xset q and xset dpms force on both return



    unable to open display ''''


No difference for sudo commands.



Edit 4: More futile attempts and the potential discovery of a security issue





  • 4.1 I've tried to reinstall Xorg and X11, then I ran sudo apt-get install --reinstall xserver* which failed with this output:



    (many versions of this:)
    Note, selecting 'xserver-xorg-something' for regex 'xserver*'
    (next:)
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.



    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    xserver-xorg-input-mtrack : Conflicts: xserver-xorg-input-multitouch
    but 1.0~rc2+git20110312-2build4 is to be installed
    E: Unable to correct problems, you have held broken packages.


  • 4.2 Next I logged in as guest and logged in as myself through tty Ctrl+Alt+F# and ran the same xrand commands as above (OP and edits 1-3), with the same output as far as I can see.


  • 4.3 Then I created a new_user with full admin rights and repeated 4.2 via tty.


  • 4.4 SECURITY ISSUE? No, just a need of awareness. Not related to this subject, details at launchpad



It begins looking like a system reinstall is necessary :-(










share|improve this question




















  • 2





    Try xrandr from the Ctrl-Alt-F1 virtual terminal again, but this time add an explicit display argument e.g. xrandr -d :0

    – steeldriver
    Jan 15 '14 at 1:10






  • 1





    xrandr -d :0 --auto ?

    – falconer
    Jan 15 '14 at 19:25











  • What xset commands did you try?

    – Seth
    Jan 15 '14 at 21:07






  • 1





    You need to specify an output device for the --auto directive e.g. xrandr -d :0 --output LVDS1 --auto

    – steeldriver
    Jan 16 '14 at 0:18






  • 1





    I also can't run most xrandr commands from VT. Typically --auto or --off won't work, while --primary works and actually works around another bug. I'm using Gentoo on Lenovo T420s, though.

    – Pavel Šimerda
    Dec 15 '14 at 20:37
















24















I accidentally disabled my monitors, so when I log in I land on a blank, back-lit screen. I can open terminals with Ctrl+Alt+F#, so how do I enable the monitor from terminal?



I tried xrandr, but it can't open display. xset does not work either. I found this question which closely resembles my problem. The answer provides a script to be put in /etc/X11/Xreset.d.



Running it does not solve my problem (though it is likely I don't understand how to use it properly). I think I somehow made the new default to be "disable monitors".



Running Ubuntu Studio 13.10. I do not have nVidia drivers. I can't find an xorg.conf file to remove. Thankful for any and all input!



Edit: Output of command xrandr -d :0



Screen 0: minimum 320x200, current 1366 x 768, maximum 32767 x 32767
LVDS1 connected 1366x768+-32768+-32768 (normal left inverted right x axis y axis) 344mm x 192mm
1366x768 60.0*
1360x768 59.8 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)


Still being a CLI beginner I fail to understand from man xrandr how to switch on (there is an off option) or enable displays. Output of xrandr --auto is Can't open display



Edit 2: Output of xrandr -d :0 --auto



Configure crtc 0 failed


Maybe I just have to reinstall X11?



Edit 3: Outputs of suggested commands / which xset commands I tried:



xrandr -d :0 output LVDS1 --auto



    configure crtc 0 failed


xset q and xset dpms force on both return



    unable to open display ''''


No difference for sudo commands.



Edit 4: More futile attempts and the potential discovery of a security issue





  • 4.1 I've tried to reinstall Xorg and X11, then I ran sudo apt-get install --reinstall xserver* which failed with this output:



    (many versions of this:)
    Note, selecting 'xserver-xorg-something' for regex 'xserver*'
    (next:)
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.



    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    xserver-xorg-input-mtrack : Conflicts: xserver-xorg-input-multitouch
    but 1.0~rc2+git20110312-2build4 is to be installed
    E: Unable to correct problems, you have held broken packages.


  • 4.2 Next I logged in as guest and logged in as myself through tty Ctrl+Alt+F# and ran the same xrand commands as above (OP and edits 1-3), with the same output as far as I can see.


  • 4.3 Then I created a new_user with full admin rights and repeated 4.2 via tty.


  • 4.4 SECURITY ISSUE? No, just a need of awareness. Not related to this subject, details at launchpad



It begins looking like a system reinstall is necessary :-(










share|improve this question




















  • 2





    Try xrandr from the Ctrl-Alt-F1 virtual terminal again, but this time add an explicit display argument e.g. xrandr -d :0

    – steeldriver
    Jan 15 '14 at 1:10






  • 1





    xrandr -d :0 --auto ?

    – falconer
    Jan 15 '14 at 19:25











  • What xset commands did you try?

    – Seth
    Jan 15 '14 at 21:07






  • 1





    You need to specify an output device for the --auto directive e.g. xrandr -d :0 --output LVDS1 --auto

    – steeldriver
    Jan 16 '14 at 0:18






  • 1





    I also can't run most xrandr commands from VT. Typically --auto or --off won't work, while --primary works and actually works around another bug. I'm using Gentoo on Lenovo T420s, though.

    – Pavel Šimerda
    Dec 15 '14 at 20:37














24












24








24


8






I accidentally disabled my monitors, so when I log in I land on a blank, back-lit screen. I can open terminals with Ctrl+Alt+F#, so how do I enable the monitor from terminal?



I tried xrandr, but it can't open display. xset does not work either. I found this question which closely resembles my problem. The answer provides a script to be put in /etc/X11/Xreset.d.



Running it does not solve my problem (though it is likely I don't understand how to use it properly). I think I somehow made the new default to be "disable monitors".



Running Ubuntu Studio 13.10. I do not have nVidia drivers. I can't find an xorg.conf file to remove. Thankful for any and all input!



Edit: Output of command xrandr -d :0



Screen 0: minimum 320x200, current 1366 x 768, maximum 32767 x 32767
LVDS1 connected 1366x768+-32768+-32768 (normal left inverted right x axis y axis) 344mm x 192mm
1366x768 60.0*
1360x768 59.8 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)


Still being a CLI beginner I fail to understand from man xrandr how to switch on (there is an off option) or enable displays. Output of xrandr --auto is Can't open display



Edit 2: Output of xrandr -d :0 --auto



Configure crtc 0 failed


Maybe I just have to reinstall X11?



Edit 3: Outputs of suggested commands / which xset commands I tried:



xrandr -d :0 output LVDS1 --auto



    configure crtc 0 failed


xset q and xset dpms force on both return



    unable to open display ''''


No difference for sudo commands.



Edit 4: More futile attempts and the potential discovery of a security issue





  • 4.1 I've tried to reinstall Xorg and X11, then I ran sudo apt-get install --reinstall xserver* which failed with this output:



    (many versions of this:)
    Note, selecting 'xserver-xorg-something' for regex 'xserver*'
    (next:)
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.



    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    xserver-xorg-input-mtrack : Conflicts: xserver-xorg-input-multitouch
    but 1.0~rc2+git20110312-2build4 is to be installed
    E: Unable to correct problems, you have held broken packages.


  • 4.2 Next I logged in as guest and logged in as myself through tty Ctrl+Alt+F# and ran the same xrand commands as above (OP and edits 1-3), with the same output as far as I can see.


  • 4.3 Then I created a new_user with full admin rights and repeated 4.2 via tty.


  • 4.4 SECURITY ISSUE? No, just a need of awareness. Not related to this subject, details at launchpad



It begins looking like a system reinstall is necessary :-(










share|improve this question
















I accidentally disabled my monitors, so when I log in I land on a blank, back-lit screen. I can open terminals with Ctrl+Alt+F#, so how do I enable the monitor from terminal?



I tried xrandr, but it can't open display. xset does not work either. I found this question which closely resembles my problem. The answer provides a script to be put in /etc/X11/Xreset.d.



Running it does not solve my problem (though it is likely I don't understand how to use it properly). I think I somehow made the new default to be "disable monitors".



Running Ubuntu Studio 13.10. I do not have nVidia drivers. I can't find an xorg.conf file to remove. Thankful for any and all input!



Edit: Output of command xrandr -d :0



Screen 0: minimum 320x200, current 1366 x 768, maximum 32767 x 32767
LVDS1 connected 1366x768+-32768+-32768 (normal left inverted right x axis y axis) 344mm x 192mm
1366x768 60.0*
1360x768 59.8 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)


Still being a CLI beginner I fail to understand from man xrandr how to switch on (there is an off option) or enable displays. Output of xrandr --auto is Can't open display



Edit 2: Output of xrandr -d :0 --auto



Configure crtc 0 failed


Maybe I just have to reinstall X11?



Edit 3: Outputs of suggested commands / which xset commands I tried:



xrandr -d :0 output LVDS1 --auto



    configure crtc 0 failed


xset q and xset dpms force on both return



    unable to open display ''''


No difference for sudo commands.



Edit 4: More futile attempts and the potential discovery of a security issue





  • 4.1 I've tried to reinstall Xorg and X11, then I ran sudo apt-get install --reinstall xserver* which failed with this output:



    (many versions of this:)
    Note, selecting 'xserver-xorg-something' for regex 'xserver*'
    (next:)
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.



    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    xserver-xorg-input-mtrack : Conflicts: xserver-xorg-input-multitouch
    but 1.0~rc2+git20110312-2build4 is to be installed
    E: Unable to correct problems, you have held broken packages.


  • 4.2 Next I logged in as guest and logged in as myself through tty Ctrl+Alt+F# and ran the same xrand commands as above (OP and edits 1-3), with the same output as far as I can see.


  • 4.3 Then I created a new_user with full admin rights and repeated 4.2 via tty.


  • 4.4 SECURITY ISSUE? No, just a need of awareness. Not related to this subject, details at launchpad



It begins looking like a system reinstall is necessary :-(







command-line multiple-monitors display






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 '17 at 12:24









Community

1




1










asked Jan 15 '14 at 1:04









Al FAl F

4021411




4021411








  • 2





    Try xrandr from the Ctrl-Alt-F1 virtual terminal again, but this time add an explicit display argument e.g. xrandr -d :0

    – steeldriver
    Jan 15 '14 at 1:10






  • 1





    xrandr -d :0 --auto ?

    – falconer
    Jan 15 '14 at 19:25











  • What xset commands did you try?

    – Seth
    Jan 15 '14 at 21:07






  • 1





    You need to specify an output device for the --auto directive e.g. xrandr -d :0 --output LVDS1 --auto

    – steeldriver
    Jan 16 '14 at 0:18






  • 1





    I also can't run most xrandr commands from VT. Typically --auto or --off won't work, while --primary works and actually works around another bug. I'm using Gentoo on Lenovo T420s, though.

    – Pavel Šimerda
    Dec 15 '14 at 20:37














  • 2





    Try xrandr from the Ctrl-Alt-F1 virtual terminal again, but this time add an explicit display argument e.g. xrandr -d :0

    – steeldriver
    Jan 15 '14 at 1:10






  • 1





    xrandr -d :0 --auto ?

    – falconer
    Jan 15 '14 at 19:25











  • What xset commands did you try?

    – Seth
    Jan 15 '14 at 21:07






  • 1





    You need to specify an output device for the --auto directive e.g. xrandr -d :0 --output LVDS1 --auto

    – steeldriver
    Jan 16 '14 at 0:18






  • 1





    I also can't run most xrandr commands from VT. Typically --auto or --off won't work, while --primary works and actually works around another bug. I'm using Gentoo on Lenovo T420s, though.

    – Pavel Šimerda
    Dec 15 '14 at 20:37








2




2





Try xrandr from the Ctrl-Alt-F1 virtual terminal again, but this time add an explicit display argument e.g. xrandr -d :0

– steeldriver
Jan 15 '14 at 1:10





Try xrandr from the Ctrl-Alt-F1 virtual terminal again, but this time add an explicit display argument e.g. xrandr -d :0

– steeldriver
Jan 15 '14 at 1:10




1




1





xrandr -d :0 --auto ?

– falconer
Jan 15 '14 at 19:25





xrandr -d :0 --auto ?

– falconer
Jan 15 '14 at 19:25













What xset commands did you try?

– Seth
Jan 15 '14 at 21:07





What xset commands did you try?

– Seth
Jan 15 '14 at 21:07




1




1





You need to specify an output device for the --auto directive e.g. xrandr -d :0 --output LVDS1 --auto

– steeldriver
Jan 16 '14 at 0:18





You need to specify an output device for the --auto directive e.g. xrandr -d :0 --output LVDS1 --auto

– steeldriver
Jan 16 '14 at 0:18




1




1





I also can't run most xrandr commands from VT. Typically --auto or --off won't work, while --primary works and actually works around another bug. I'm using Gentoo on Lenovo T420s, though.

– Pavel Šimerda
Dec 15 '14 at 20:37





I also can't run most xrandr commands from VT. Typically --auto or --off won't work, while --primary works and actually works around another bug. I'm using Gentoo on Lenovo T420s, though.

– Pavel Šimerda
Dec 15 '14 at 20:37










6 Answers
6






active

oldest

votes


















9














After running this command switch immediately to the tty where the screen is black, and after 5 seconds the screen should show up.



sleep 5 && xrandr -d :0 --output LVDS --auto


The xrandr command will turn on your main screen. It only seems to work if you're currently on the tty where your display manager is run, hence the sleep to give you some time to be able to switch.






share|improve this answer


























  • Brilliant in its simplicity. Solved my problem.

    – billyjmc
    Oct 30 '16 at 5:02











  • What it does? Waits for 5 secs and then what?

    – zygimantus
    Mar 22 '17 at 21:30






  • 1





    Then it runs xrandr (required command), while you switch back to graphical virtual console tty7 (:0 display), that you want to turn on again. That worked for me.

    – Martin Marčan
    Apr 16 '17 at 12:10






  • 1





    This guy saved me. 1. Login to TTY by using ctrl-alt-F1 2. Run his sleep ... command 3. ctrl-alt-F7 to return to my blank screen before the 5 seconds are up 4. the screen appears after 5 seconds!

    – Tron
    Jun 6 '17 at 23:49













  • Somewhat similar approach (on MX Linux 17) via ssh: ssh to the computer (I had to sudo apt install openssh-server before in VT1), ctrl-alt-F7 (on the computer itself, to be on the graphical console which happens to be VT7 in my case). Then, in the ssh session: export DISPLAY=:0.0, xrandr -display :0.0 --output eDP-1 --auto.

    – bli
    Mar 13 '18 at 17:15



















8
















  1. Figure out that the offending settings are stored in a file called displays.xml.



    I won't detail here how I guessed it, though the comment about deleting monitors.xml proved helpful. It also involved manual comparing of several .config subdirectories.



    Of course, what I should have done was ask my search engine "where does xubuntu store display settings" and find this thread at ubuntuforums...



  2. Log in to your blank display and use CTRL+ALT+F# to enter command line.


  3. sudo find . -type f -name "*displays*"


  4. mv ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml.bak


  5. sudo reboot



I hope this quest may help somebody.






share|improve this answer
























  • This doesn't answer how to get around the xrandr from VT issue, does it?

    – Pavel Šimerda
    Dec 15 '14 at 20:45



















6














You should be able to open (and set properties for) a display via the virtual terminal console provided you know the display number for the running X session. That's usually :0 for the primary physical display but that's not always the case. For example, to query display :0



xrandr -d :0 -q


To re-enable a display that's been turned off, it's usually sufficient to use the --auto e.g. to turn the LVDS1 output device on display :0 back on



xrandr -d :0 --output LVDS1 --auto 





share|improve this answer
























  • Output of this command is the same as in edit #2 in my question. See edit #3

    – Al F
    Jan 18 '14 at 9:44






  • 2





    Perhaps we should take a step back - how exactly did you "accidentally disable" your monitors?

    – steeldriver
    Jan 18 '14 at 11:45






  • 2





    I had connected a projector. When finished watching I opened display settings, chose the projector entry and clicked "do not use this" (don't remember exact wording). I'm not sure if I accidentally clicked on both, anyway my screen went blank. Can't remember for sure now if I used tty login to reboot (I think I did) or if I did a hard reboot by power button.

    – Al F
    Jan 18 '14 at 15:12








  • 3





    Have you tried moving or renaming your ~/.config/monitors.xml file (e.g. mv ~/.config/monitors.xml ~/.config/monitors.xml.bak)? BTW does logging into to a different account or guest account work?

    – steeldriver
    Jan 18 '14 at 15:18













  • I don't find a ~/.config/monitors.xml file on my system.

    – Al F
    Jan 18 '14 at 15:20



















1














I would extend the answer of Martin Marčan by replacing the sleep with a command that switches to the black console:



chvt 7 && xrandr -d :0 --output LVDS --auto


where 7 is the number of the console used for X11 (usually 7 or 8) and LVDS is the name of the output you want to reconfigure. You can retrieve the list of outputs first with



xrandr -d :0





share|improve this answer































    0














    Try this:



    xrandr --output "nameYourVGA" --mode "yourResolution"


    For example:



    xrandr --output VGA1 --mode 1366x768


    See if that works.






    share|improve this answer

































      0














      I solved this problem in Lubuntu 18.04 like this:



      If you boot into a screen, which is turned of, open a terminal blindly with CTR-ALT-T. Since you cannot see the terminal and what you write, type very carefully



      xrandr --output "nameYourScreen" --auto


      Hit Enter. Voila.



      (BTW: In my case, entering such code in tty1 or any virtual terminal did not work. I tried various things, people mention above, but when switching back to the running session or after reboot, nothing changed. Maybe the problem is that xrandr can execute this command properly for some hardware only within a running x-session ?)






      share|improve this answer


























        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "89"
        };
        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%2faskubuntu.com%2fquestions%2f405645%2fhow-to-enable-monitor-from-terminal%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        6 Answers
        6






        active

        oldest

        votes








        6 Answers
        6






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        9














        After running this command switch immediately to the tty where the screen is black, and after 5 seconds the screen should show up.



        sleep 5 && xrandr -d :0 --output LVDS --auto


        The xrandr command will turn on your main screen. It only seems to work if you're currently on the tty where your display manager is run, hence the sleep to give you some time to be able to switch.






        share|improve this answer


























        • Brilliant in its simplicity. Solved my problem.

          – billyjmc
          Oct 30 '16 at 5:02











        • What it does? Waits for 5 secs and then what?

          – zygimantus
          Mar 22 '17 at 21:30






        • 1





          Then it runs xrandr (required command), while you switch back to graphical virtual console tty7 (:0 display), that you want to turn on again. That worked for me.

          – Martin Marčan
          Apr 16 '17 at 12:10






        • 1





          This guy saved me. 1. Login to TTY by using ctrl-alt-F1 2. Run his sleep ... command 3. ctrl-alt-F7 to return to my blank screen before the 5 seconds are up 4. the screen appears after 5 seconds!

          – Tron
          Jun 6 '17 at 23:49













        • Somewhat similar approach (on MX Linux 17) via ssh: ssh to the computer (I had to sudo apt install openssh-server before in VT1), ctrl-alt-F7 (on the computer itself, to be on the graphical console which happens to be VT7 in my case). Then, in the ssh session: export DISPLAY=:0.0, xrandr -display :0.0 --output eDP-1 --auto.

          – bli
          Mar 13 '18 at 17:15
















        9














        After running this command switch immediately to the tty where the screen is black, and after 5 seconds the screen should show up.



        sleep 5 && xrandr -d :0 --output LVDS --auto


        The xrandr command will turn on your main screen. It only seems to work if you're currently on the tty where your display manager is run, hence the sleep to give you some time to be able to switch.






        share|improve this answer


























        • Brilliant in its simplicity. Solved my problem.

          – billyjmc
          Oct 30 '16 at 5:02











        • What it does? Waits for 5 secs and then what?

          – zygimantus
          Mar 22 '17 at 21:30






        • 1





          Then it runs xrandr (required command), while you switch back to graphical virtual console tty7 (:0 display), that you want to turn on again. That worked for me.

          – Martin Marčan
          Apr 16 '17 at 12:10






        • 1





          This guy saved me. 1. Login to TTY by using ctrl-alt-F1 2. Run his sleep ... command 3. ctrl-alt-F7 to return to my blank screen before the 5 seconds are up 4. the screen appears after 5 seconds!

          – Tron
          Jun 6 '17 at 23:49













        • Somewhat similar approach (on MX Linux 17) via ssh: ssh to the computer (I had to sudo apt install openssh-server before in VT1), ctrl-alt-F7 (on the computer itself, to be on the graphical console which happens to be VT7 in my case). Then, in the ssh session: export DISPLAY=:0.0, xrandr -display :0.0 --output eDP-1 --auto.

          – bli
          Mar 13 '18 at 17:15














        9












        9








        9







        After running this command switch immediately to the tty where the screen is black, and after 5 seconds the screen should show up.



        sleep 5 && xrandr -d :0 --output LVDS --auto


        The xrandr command will turn on your main screen. It only seems to work if you're currently on the tty where your display manager is run, hence the sleep to give you some time to be able to switch.






        share|improve this answer















        After running this command switch immediately to the tty where the screen is black, and after 5 seconds the screen should show up.



        sleep 5 && xrandr -d :0 --output LVDS --auto


        The xrandr command will turn on your main screen. It only seems to work if you're currently on the tty where your display manager is run, hence the sleep to give you some time to be able to switch.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jul 9 '18 at 14:38









        TrakJohnson

        1034




        1034










        answered Oct 19 '16 at 20:16









        Martin MarčanMartin Marčan

        9111




        9111













        • Brilliant in its simplicity. Solved my problem.

          – billyjmc
          Oct 30 '16 at 5:02











        • What it does? Waits for 5 secs and then what?

          – zygimantus
          Mar 22 '17 at 21:30






        • 1





          Then it runs xrandr (required command), while you switch back to graphical virtual console tty7 (:0 display), that you want to turn on again. That worked for me.

          – Martin Marčan
          Apr 16 '17 at 12:10






        • 1





          This guy saved me. 1. Login to TTY by using ctrl-alt-F1 2. Run his sleep ... command 3. ctrl-alt-F7 to return to my blank screen before the 5 seconds are up 4. the screen appears after 5 seconds!

          – Tron
          Jun 6 '17 at 23:49













        • Somewhat similar approach (on MX Linux 17) via ssh: ssh to the computer (I had to sudo apt install openssh-server before in VT1), ctrl-alt-F7 (on the computer itself, to be on the graphical console which happens to be VT7 in my case). Then, in the ssh session: export DISPLAY=:0.0, xrandr -display :0.0 --output eDP-1 --auto.

          – bli
          Mar 13 '18 at 17:15



















        • Brilliant in its simplicity. Solved my problem.

          – billyjmc
          Oct 30 '16 at 5:02











        • What it does? Waits for 5 secs and then what?

          – zygimantus
          Mar 22 '17 at 21:30






        • 1





          Then it runs xrandr (required command), while you switch back to graphical virtual console tty7 (:0 display), that you want to turn on again. That worked for me.

          – Martin Marčan
          Apr 16 '17 at 12:10






        • 1





          This guy saved me. 1. Login to TTY by using ctrl-alt-F1 2. Run his sleep ... command 3. ctrl-alt-F7 to return to my blank screen before the 5 seconds are up 4. the screen appears after 5 seconds!

          – Tron
          Jun 6 '17 at 23:49













        • Somewhat similar approach (on MX Linux 17) via ssh: ssh to the computer (I had to sudo apt install openssh-server before in VT1), ctrl-alt-F7 (on the computer itself, to be on the graphical console which happens to be VT7 in my case). Then, in the ssh session: export DISPLAY=:0.0, xrandr -display :0.0 --output eDP-1 --auto.

          – bli
          Mar 13 '18 at 17:15

















        Brilliant in its simplicity. Solved my problem.

        – billyjmc
        Oct 30 '16 at 5:02





        Brilliant in its simplicity. Solved my problem.

        – billyjmc
        Oct 30 '16 at 5:02













        What it does? Waits for 5 secs and then what?

        – zygimantus
        Mar 22 '17 at 21:30





        What it does? Waits for 5 secs and then what?

        – zygimantus
        Mar 22 '17 at 21:30




        1




        1





        Then it runs xrandr (required command), while you switch back to graphical virtual console tty7 (:0 display), that you want to turn on again. That worked for me.

        – Martin Marčan
        Apr 16 '17 at 12:10





        Then it runs xrandr (required command), while you switch back to graphical virtual console tty7 (:0 display), that you want to turn on again. That worked for me.

        – Martin Marčan
        Apr 16 '17 at 12:10




        1




        1





        This guy saved me. 1. Login to TTY by using ctrl-alt-F1 2. Run his sleep ... command 3. ctrl-alt-F7 to return to my blank screen before the 5 seconds are up 4. the screen appears after 5 seconds!

        – Tron
        Jun 6 '17 at 23:49







        This guy saved me. 1. Login to TTY by using ctrl-alt-F1 2. Run his sleep ... command 3. ctrl-alt-F7 to return to my blank screen before the 5 seconds are up 4. the screen appears after 5 seconds!

        – Tron
        Jun 6 '17 at 23:49















        Somewhat similar approach (on MX Linux 17) via ssh: ssh to the computer (I had to sudo apt install openssh-server before in VT1), ctrl-alt-F7 (on the computer itself, to be on the graphical console which happens to be VT7 in my case). Then, in the ssh session: export DISPLAY=:0.0, xrandr -display :0.0 --output eDP-1 --auto.

        – bli
        Mar 13 '18 at 17:15





        Somewhat similar approach (on MX Linux 17) via ssh: ssh to the computer (I had to sudo apt install openssh-server before in VT1), ctrl-alt-F7 (on the computer itself, to be on the graphical console which happens to be VT7 in my case). Then, in the ssh session: export DISPLAY=:0.0, xrandr -display :0.0 --output eDP-1 --auto.

        – bli
        Mar 13 '18 at 17:15













        8
















        1. Figure out that the offending settings are stored in a file called displays.xml.



          I won't detail here how I guessed it, though the comment about deleting monitors.xml proved helpful. It also involved manual comparing of several .config subdirectories.



          Of course, what I should have done was ask my search engine "where does xubuntu store display settings" and find this thread at ubuntuforums...



        2. Log in to your blank display and use CTRL+ALT+F# to enter command line.


        3. sudo find . -type f -name "*displays*"


        4. mv ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml.bak


        5. sudo reboot



        I hope this quest may help somebody.






        share|improve this answer
























        • This doesn't answer how to get around the xrandr from VT issue, does it?

          – Pavel Šimerda
          Dec 15 '14 at 20:45
















        8
















        1. Figure out that the offending settings are stored in a file called displays.xml.



          I won't detail here how I guessed it, though the comment about deleting monitors.xml proved helpful. It also involved manual comparing of several .config subdirectories.



          Of course, what I should have done was ask my search engine "where does xubuntu store display settings" and find this thread at ubuntuforums...



        2. Log in to your blank display and use CTRL+ALT+F# to enter command line.


        3. sudo find . -type f -name "*displays*"


        4. mv ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml.bak


        5. sudo reboot



        I hope this quest may help somebody.






        share|improve this answer
























        • This doesn't answer how to get around the xrandr from VT issue, does it?

          – Pavel Šimerda
          Dec 15 '14 at 20:45














        8












        8








        8









        1. Figure out that the offending settings are stored in a file called displays.xml.



          I won't detail here how I guessed it, though the comment about deleting monitors.xml proved helpful. It also involved manual comparing of several .config subdirectories.



          Of course, what I should have done was ask my search engine "where does xubuntu store display settings" and find this thread at ubuntuforums...



        2. Log in to your blank display and use CTRL+ALT+F# to enter command line.


        3. sudo find . -type f -name "*displays*"


        4. mv ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml.bak


        5. sudo reboot



        I hope this quest may help somebody.






        share|improve this answer















        1. Figure out that the offending settings are stored in a file called displays.xml.



          I won't detail here how I guessed it, though the comment about deleting monitors.xml proved helpful. It also involved manual comparing of several .config subdirectories.



          Of course, what I should have done was ask my search engine "where does xubuntu store display settings" and find this thread at ubuntuforums...



        2. Log in to your blank display and use CTRL+ALT+F# to enter command line.


        3. sudo find . -type f -name "*displays*"


        4. mv ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml.bak


        5. sudo reboot



        I hope this quest may help somebody.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 25 '14 at 19:25









        Al FAl F

        4021411




        4021411













        • This doesn't answer how to get around the xrandr from VT issue, does it?

          – Pavel Šimerda
          Dec 15 '14 at 20:45



















        • This doesn't answer how to get around the xrandr from VT issue, does it?

          – Pavel Šimerda
          Dec 15 '14 at 20:45

















        This doesn't answer how to get around the xrandr from VT issue, does it?

        – Pavel Šimerda
        Dec 15 '14 at 20:45





        This doesn't answer how to get around the xrandr from VT issue, does it?

        – Pavel Šimerda
        Dec 15 '14 at 20:45











        6














        You should be able to open (and set properties for) a display via the virtual terminal console provided you know the display number for the running X session. That's usually :0 for the primary physical display but that's not always the case. For example, to query display :0



        xrandr -d :0 -q


        To re-enable a display that's been turned off, it's usually sufficient to use the --auto e.g. to turn the LVDS1 output device on display :0 back on



        xrandr -d :0 --output LVDS1 --auto 





        share|improve this answer
























        • Output of this command is the same as in edit #2 in my question. See edit #3

          – Al F
          Jan 18 '14 at 9:44






        • 2





          Perhaps we should take a step back - how exactly did you "accidentally disable" your monitors?

          – steeldriver
          Jan 18 '14 at 11:45






        • 2





          I had connected a projector. When finished watching I opened display settings, chose the projector entry and clicked "do not use this" (don't remember exact wording). I'm not sure if I accidentally clicked on both, anyway my screen went blank. Can't remember for sure now if I used tty login to reboot (I think I did) or if I did a hard reboot by power button.

          – Al F
          Jan 18 '14 at 15:12








        • 3





          Have you tried moving or renaming your ~/.config/monitors.xml file (e.g. mv ~/.config/monitors.xml ~/.config/monitors.xml.bak)? BTW does logging into to a different account or guest account work?

          – steeldriver
          Jan 18 '14 at 15:18













        • I don't find a ~/.config/monitors.xml file on my system.

          – Al F
          Jan 18 '14 at 15:20
















        6














        You should be able to open (and set properties for) a display via the virtual terminal console provided you know the display number for the running X session. That's usually :0 for the primary physical display but that's not always the case. For example, to query display :0



        xrandr -d :0 -q


        To re-enable a display that's been turned off, it's usually sufficient to use the --auto e.g. to turn the LVDS1 output device on display :0 back on



        xrandr -d :0 --output LVDS1 --auto 





        share|improve this answer
























        • Output of this command is the same as in edit #2 in my question. See edit #3

          – Al F
          Jan 18 '14 at 9:44






        • 2





          Perhaps we should take a step back - how exactly did you "accidentally disable" your monitors?

          – steeldriver
          Jan 18 '14 at 11:45






        • 2





          I had connected a projector. When finished watching I opened display settings, chose the projector entry and clicked "do not use this" (don't remember exact wording). I'm not sure if I accidentally clicked on both, anyway my screen went blank. Can't remember for sure now if I used tty login to reboot (I think I did) or if I did a hard reboot by power button.

          – Al F
          Jan 18 '14 at 15:12








        • 3





          Have you tried moving or renaming your ~/.config/monitors.xml file (e.g. mv ~/.config/monitors.xml ~/.config/monitors.xml.bak)? BTW does logging into to a different account or guest account work?

          – steeldriver
          Jan 18 '14 at 15:18













        • I don't find a ~/.config/monitors.xml file on my system.

          – Al F
          Jan 18 '14 at 15:20














        6












        6








        6







        You should be able to open (and set properties for) a display via the virtual terminal console provided you know the display number for the running X session. That's usually :0 for the primary physical display but that's not always the case. For example, to query display :0



        xrandr -d :0 -q


        To re-enable a display that's been turned off, it's usually sufficient to use the --auto e.g. to turn the LVDS1 output device on display :0 back on



        xrandr -d :0 --output LVDS1 --auto 





        share|improve this answer













        You should be able to open (and set properties for) a display via the virtual terminal console provided you know the display number for the running X session. That's usually :0 for the primary physical display but that's not always the case. For example, to query display :0



        xrandr -d :0 -q


        To re-enable a display that's been turned off, it's usually sufficient to use the --auto e.g. to turn the LVDS1 output device on display :0 back on



        xrandr -d :0 --output LVDS1 --auto 






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 16 '14 at 0:17









        steeldriversteeldriver

        70.5k11114187




        70.5k11114187













        • Output of this command is the same as in edit #2 in my question. See edit #3

          – Al F
          Jan 18 '14 at 9:44






        • 2





          Perhaps we should take a step back - how exactly did you "accidentally disable" your monitors?

          – steeldriver
          Jan 18 '14 at 11:45






        • 2





          I had connected a projector. When finished watching I opened display settings, chose the projector entry and clicked "do not use this" (don't remember exact wording). I'm not sure if I accidentally clicked on both, anyway my screen went blank. Can't remember for sure now if I used tty login to reboot (I think I did) or if I did a hard reboot by power button.

          – Al F
          Jan 18 '14 at 15:12








        • 3





          Have you tried moving or renaming your ~/.config/monitors.xml file (e.g. mv ~/.config/monitors.xml ~/.config/monitors.xml.bak)? BTW does logging into to a different account or guest account work?

          – steeldriver
          Jan 18 '14 at 15:18













        • I don't find a ~/.config/monitors.xml file on my system.

          – Al F
          Jan 18 '14 at 15:20



















        • Output of this command is the same as in edit #2 in my question. See edit #3

          – Al F
          Jan 18 '14 at 9:44






        • 2





          Perhaps we should take a step back - how exactly did you "accidentally disable" your monitors?

          – steeldriver
          Jan 18 '14 at 11:45






        • 2





          I had connected a projector. When finished watching I opened display settings, chose the projector entry and clicked "do not use this" (don't remember exact wording). I'm not sure if I accidentally clicked on both, anyway my screen went blank. Can't remember for sure now if I used tty login to reboot (I think I did) or if I did a hard reboot by power button.

          – Al F
          Jan 18 '14 at 15:12








        • 3





          Have you tried moving or renaming your ~/.config/monitors.xml file (e.g. mv ~/.config/monitors.xml ~/.config/monitors.xml.bak)? BTW does logging into to a different account or guest account work?

          – steeldriver
          Jan 18 '14 at 15:18













        • I don't find a ~/.config/monitors.xml file on my system.

          – Al F
          Jan 18 '14 at 15:20

















        Output of this command is the same as in edit #2 in my question. See edit #3

        – Al F
        Jan 18 '14 at 9:44





        Output of this command is the same as in edit #2 in my question. See edit #3

        – Al F
        Jan 18 '14 at 9:44




        2




        2





        Perhaps we should take a step back - how exactly did you "accidentally disable" your monitors?

        – steeldriver
        Jan 18 '14 at 11:45





        Perhaps we should take a step back - how exactly did you "accidentally disable" your monitors?

        – steeldriver
        Jan 18 '14 at 11:45




        2




        2





        I had connected a projector. When finished watching I opened display settings, chose the projector entry and clicked "do not use this" (don't remember exact wording). I'm not sure if I accidentally clicked on both, anyway my screen went blank. Can't remember for sure now if I used tty login to reboot (I think I did) or if I did a hard reboot by power button.

        – Al F
        Jan 18 '14 at 15:12







        I had connected a projector. When finished watching I opened display settings, chose the projector entry and clicked "do not use this" (don't remember exact wording). I'm not sure if I accidentally clicked on both, anyway my screen went blank. Can't remember for sure now if I used tty login to reboot (I think I did) or if I did a hard reboot by power button.

        – Al F
        Jan 18 '14 at 15:12






        3




        3





        Have you tried moving or renaming your ~/.config/monitors.xml file (e.g. mv ~/.config/monitors.xml ~/.config/monitors.xml.bak)? BTW does logging into to a different account or guest account work?

        – steeldriver
        Jan 18 '14 at 15:18







        Have you tried moving or renaming your ~/.config/monitors.xml file (e.g. mv ~/.config/monitors.xml ~/.config/monitors.xml.bak)? BTW does logging into to a different account or guest account work?

        – steeldriver
        Jan 18 '14 at 15:18















        I don't find a ~/.config/monitors.xml file on my system.

        – Al F
        Jan 18 '14 at 15:20





        I don't find a ~/.config/monitors.xml file on my system.

        – Al F
        Jan 18 '14 at 15:20











        1














        I would extend the answer of Martin Marčan by replacing the sleep with a command that switches to the black console:



        chvt 7 && xrandr -d :0 --output LVDS --auto


        where 7 is the number of the console used for X11 (usually 7 or 8) and LVDS is the name of the output you want to reconfigure. You can retrieve the list of outputs first with



        xrandr -d :0





        share|improve this answer




























          1














          I would extend the answer of Martin Marčan by replacing the sleep with a command that switches to the black console:



          chvt 7 && xrandr -d :0 --output LVDS --auto


          where 7 is the number of the console used for X11 (usually 7 or 8) and LVDS is the name of the output you want to reconfigure. You can retrieve the list of outputs first with



          xrandr -d :0





          share|improve this answer


























            1












            1








            1







            I would extend the answer of Martin Marčan by replacing the sleep with a command that switches to the black console:



            chvt 7 && xrandr -d :0 --output LVDS --auto


            where 7 is the number of the console used for X11 (usually 7 or 8) and LVDS is the name of the output you want to reconfigure. You can retrieve the list of outputs first with



            xrandr -d :0





            share|improve this answer













            I would extend the answer of Martin Marčan by replacing the sleep with a command that switches to the black console:



            chvt 7 && xrandr -d :0 --output LVDS --auto


            where 7 is the number of the console used for X11 (usually 7 or 8) and LVDS is the name of the output you want to reconfigure. You can retrieve the list of outputs first with



            xrandr -d :0






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Feb 21 at 16:35









            cyberbraincyberbrain

            113




            113























                0














                Try this:



                xrandr --output "nameYourVGA" --mode "yourResolution"


                For example:



                xrandr --output VGA1 --mode 1366x768


                See if that works.






                share|improve this answer






























                  0














                  Try this:



                  xrandr --output "nameYourVGA" --mode "yourResolution"


                  For example:



                  xrandr --output VGA1 --mode 1366x768


                  See if that works.






                  share|improve this answer




























                    0












                    0








                    0







                    Try this:



                    xrandr --output "nameYourVGA" --mode "yourResolution"


                    For example:



                    xrandr --output VGA1 --mode 1366x768


                    See if that works.






                    share|improve this answer















                    Try this:



                    xrandr --output "nameYourVGA" --mode "yourResolution"


                    For example:



                    xrandr --output VGA1 --mode 1366x768


                    See if that works.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Apr 23 '15 at 5:51









                    Carl H

                    3,39141834




                    3,39141834










                    answered Apr 23 '15 at 0:09









                    Cosmo JoséCosmo José

                    1




                    1























                        0














                        I solved this problem in Lubuntu 18.04 like this:



                        If you boot into a screen, which is turned of, open a terminal blindly with CTR-ALT-T. Since you cannot see the terminal and what you write, type very carefully



                        xrandr --output "nameYourScreen" --auto


                        Hit Enter. Voila.



                        (BTW: In my case, entering such code in tty1 or any virtual terminal did not work. I tried various things, people mention above, but when switching back to the running session or after reboot, nothing changed. Maybe the problem is that xrandr can execute this command properly for some hardware only within a running x-session ?)






                        share|improve this answer






























                          0














                          I solved this problem in Lubuntu 18.04 like this:



                          If you boot into a screen, which is turned of, open a terminal blindly with CTR-ALT-T. Since you cannot see the terminal and what you write, type very carefully



                          xrandr --output "nameYourScreen" --auto


                          Hit Enter. Voila.



                          (BTW: In my case, entering such code in tty1 or any virtual terminal did not work. I tried various things, people mention above, but when switching back to the running session or after reboot, nothing changed. Maybe the problem is that xrandr can execute this command properly for some hardware only within a running x-session ?)






                          share|improve this answer




























                            0












                            0








                            0







                            I solved this problem in Lubuntu 18.04 like this:



                            If you boot into a screen, which is turned of, open a terminal blindly with CTR-ALT-T. Since you cannot see the terminal and what you write, type very carefully



                            xrandr --output "nameYourScreen" --auto


                            Hit Enter. Voila.



                            (BTW: In my case, entering such code in tty1 or any virtual terminal did not work. I tried various things, people mention above, but when switching back to the running session or after reboot, nothing changed. Maybe the problem is that xrandr can execute this command properly for some hardware only within a running x-session ?)






                            share|improve this answer















                            I solved this problem in Lubuntu 18.04 like this:



                            If you boot into a screen, which is turned of, open a terminal blindly with CTR-ALT-T. Since you cannot see the terminal and what you write, type very carefully



                            xrandr --output "nameYourScreen" --auto


                            Hit Enter. Voila.



                            (BTW: In my case, entering such code in tty1 or any virtual terminal did not work. I tried various things, people mention above, but when switching back to the running session or after reboot, nothing changed. Maybe the problem is that xrandr can execute this command properly for some hardware only within a running x-session ?)







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Jun 17 '18 at 10:44









                            Thomas

                            3,89281527




                            3,89281527










                            answered Jun 17 '18 at 9:37









                            sverrissverris

                            1




                            1






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Ask Ubuntu!


                                • 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%2faskubuntu.com%2fquestions%2f405645%2fhow-to-enable-monitor-from-terminal%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

                                How to make a Squid Proxy server?

                                Is this a new Fibonacci Identity?

                                Touch on Surface Book