xset: unable to open display

43,082

Solution 1

You need to tell xset which display to use:

export DISPLAY=:0
xset q

Solution 2

Try vbetool instead xset:

sudo vbetool dpms off

It's works fine for me.

Share:
43,082

Related videos on Youtube

user287878
Author by

user287878

Updated on September 18, 2022

Comments

  • user287878
    user287878 over 1 year

    For the longest time after about 5 minutes my screen would blank out. Now the screen will go blank after 5 minutes but then 2 seconds after that it will light up white and keep the laptop backlighting on. I didn't change any settings to my knowledge it just happened randomly after powering it on one day and has occurred since then.

    I wish to resort back to blanking the screen out completely since I leave this computer on all the time and it's hard to sleep with a huge white light all the time.

    xset dpms force off just yields me:

    xset:  unable to open display ""
    
  • KeyTrap
    KeyTrap almost 9 years
    > export DISPLAY=:0 > xset q after that I have ' unable to open display ":0" '
  • Nikolay Ruban
    Nikolay Ruban over 8 years
    Had same problem when was trying to access monitor remotely with user other than logged in.
  • yode
    yode almost 7 years
    Then I get xset: unable to open display ":0"
  • KRoy
    KRoy over 5 years
    export DISPLAY=0 instead. It should work
  • bitdancer
    bitdancer over 4 years
    Sorry I got the error "Real mode call failed"
  • Seff
    Seff over 3 years
    Neither of the methods works in systemd foked process.
  • TimNode
    TimNode almost 3 years
    For me a combination of sudo & running the normal command worked. Combination of export DISPLAY=:0 and sudo xset q. Pretty weird.
  • Admin
    Admin almost 2 years
    I got "Failed to initialise LRMI (Linux Real-Mode Interface)."