Turning off display with xset

This is driving me nuts. Currently, my Dell C400's display doesn't shut off when the lid is closed. I put "xset dpms force off" in acpi's handler.sh in the area under button/lid. If I run this command from a terminal, it works fine. But when I close my lid, the display flickers but doesn't turn off.
In the log, it says:
xset: unable to open display ""
I modified the command to be "xset -display :0 dpms force off", and now the log says:
button/lid
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xset: unable to open display ":0"
What on earth am I doing wrong? Both commands work from a terminal..  :?

Wow, talk about an old thread..
And thanks it works perfectly heh. I ended up putting this in my handler.sh:
if grep -q open /proc/acpi/button/lid/LID/state
then
XAUTHORITY=/home/stonecrest/.Xauthority xset -display :0.0 dpms force on
else
XAUTHORITY=/home/stonecrest/.Xauthority xset -display :0.0 dpms force off
fi

Similar Messages

  • 9300 turns off even with full battery

    Hi, I hope somebody can help me... Long story here...
    I bought my 9300 in Istanbul, where I live. I have a Vodafone Turkey simcard and Vodafone Spain simcard. I swithch simcards when I travel, works beautifully, even with email and whatsapp.
    Last year I had an issue whith battery draining in less than 2 hours every morning. After reinstalling software and getting rid of all apps (incl whatsapp) it eventually came back to life and the battery started lasting for 2 days again. I must say I did the upgrade of OS while in Spain (I don't know if it makes a difference...)
    A couple of weeks ago (now I am in Istanbul), same thing happened. It is just that this time the battery doesn't drain, the phone just shuts itself off, normally in the middle of a conversation or trying to send a whatsapp, and with full battery.
    The first few times, taking the battery off and sim and putting it back in did the trick. After a couple of times, however, it is not working anymore. This it what happens:
    BB turns off completely.
    If I try to turn on, it does not even try.
    If I remove battery and simcard, it restarts and is ok in all processes but when it is looking for network signal, it turns off again.
    I remove battery and simcard second time, and it does not go through the software verification, it turns off again.
    After this, the only way to bring it back to life is to plug it in, and then it restarts and with full battery!! I unplug and I can use email for the next 3-4 hours, until some hours later, same problem all again. I carry my charger everywhere!
    I have the latest OS available, and I have got rid of whatsapp, which last year I think it was the beginning of the solving of the problem (whatsapp releases new versions constantly, I think upgrading it did the trick. Or was it just chance?), but it is still not helping so far.
    My husband has the same model, never a problem. We exchanged the batteries, no luck either.
    Any ideas?

    Mucolly wrote:
    Help guyz my phone turns off itself with a full battery of which I deceded to buy new original battery but problem persist and when I charge its working when I unplug my phone goes white on the screen which is switching itself off help guyz.
    Hi and Welcome to the Community!
    There are many things already posted in this thread...have you yet read and attempted any of them?
    You also may want to attempt to boot into Safe Mode:
    KB17877 How to start a BlackBerry smartphone in Safe Mode
    It may take you multiple attempts to get the ESC key sequence (press/release/hold) correct, so be patient. When successfully into Safe Mode, see what happens.
    If the behavior ceases, then think carefully...what happened just before this behavior started? A new app? An update? A Theme? Something else? Think carefully as the smallest change could be causal...and attempt to undo whatever that was.
    But, if the behavior continues, you may need to consider more drastic actions -- e.g., WIPE, OS Reload, BBSAK Wipe/Reload, "bare bones" OS loading, etc.
    Do also keep in mind that, if the problem is at a hardware level, then no amount of self-diagnosis nor internet-distance recommendations will be of any use...only in-hand evaluation by a qualified hardware technician can properly diagnose a hardware problem.
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Msi p45 platinum - freezes after power save turns off displays

    Just put this computer together, everything is stock, no overclocking. Seems to run fine, played a few hours of modern warfare 2 with no issues.
    I noticed It seems to freeze after the monitor gets turned off by the power save mode. I just tested this by setting it to turn off displays after 1 minute of inactivity, waited watched the monitor turn off, then I went to the move the mouse and the screen came back on but the cursor would not move. sometimes the screen will not even come back on.
    I have turned the computer on, left the room while it was booting to eat breakfast or take a shower, came back the screen was still on but the computer was frozen. Window 7 login screen was up, but there were some graphic glitches. this has happened a couple of times.
    If I manually put the computer to sleep it seems to come back properly.
    msi p45 platinum 1.6 bios, optimized defaults loaded
    e5200 intel dual core @2.5 ghz, 200FSB 12.5 multiplier
    4 x 1gb ddr2 (800mhz, nanya brand)
    nvidia gtx 260 (195.63 drivers x64)
    win7 ultimate x64
    enermax 720w powersupply

    I think it might be the video card or power supply. Was building two systems,
    second system has identical motherboard, processor and ram,
    galaxy gts 250 instead of the evga gtx 260.
    antec 430 earthwatts  instead of Enermax EIN720AWT 720W Power Supply
     Installed from same OS disc and same set of drivers. Second system seems to operate the powersave mode for the monitor correctly. Will have to do some testing switching videocards tonight.

  • I have just installed Lion OS and Face Time encounters server problems on sign up. I have sought the firewall problem without success and even temporarily turned off firewall with no success.

    I have just installed Lion OS and Face Time encounters server problems on sign up. I have sought to rectify the firewall problem without success and even temporarily turned off firewall with no success. Any ideas?

    Some folks have discovered that changing their DNS service fixes FaceTime connection issues.
    The ideal way is to configure your modem/router with DNS service, but often settings in System Preferences/Network/Advanced/DNS on your Mac will override the router settings. Try either of these;
    OpenDNS
    208.67.222.222, 208.67.220.220
    Google Public DNS
    8.8.8.8, 8.8.4.4

  • I can't turn off wifi with Control Center

    I can't turn off wifi with Control Center after updated ios 7.0.6

    It's running
    I already checked dmesg and nothing happens. It works with Vista, so...
    With my old laptop (it's the same model) brightness didn't work, and now this. I guess i'll wait for a new update

  • How to turn off display of Sidebar by default in OS 10.8.5 finder?

    How do I turn off display of Sidebar by default in ALL OS 10.8.5 finder windows?

    Set up Simple Finder
    Choose Apple menu > System Preferences, then click Parental Controls.Open Parental Controls preferences
    Click the lock icon to unlock it, then enter an administrator name and password.
    Select a user in the list of users, then click Apps.
    Select Use Simple Finder.
    In the Allowed Apps list, select apps the user can open.
    Select a category, then click the arrow to list the apps in the category. Select the checkbox to allow access to the app.
    To search for an app, enter its name in the search field.
    To turn on Simple Finder, you may have to restart the Mac.

  • Grey screen with message "turn off computer with power button until switch off then press again power button"

    Dear all,
    I'm very hungry with my iMac and my Time Capsule :
    I try for two weeks to restore my iMac without any success...
    I wait 80 hours to finally have the message again and again : "to restart your computer : turn off computer with power button until switch off then press again power button".
    But my iMac do not work !
    Could you help me?

    Hello, that's a kernel panic...
    http://thexlab.com/faqs/kernelpanics.html
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X 10.6 Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.

  • Keyboard shortcut to turn off display

    I just bought BT keyboard. Could you please advise, what is the shortcut to turn off display? there is no break button on it. I suppose, there should be some alternative.

    Try Shift+control and the Eject key in the upper right of your keyboard.

  • How do you turn off apps with the iOS 7 update

    how do you turn off apps with the iOS 7 update

    Double tap the home buttons and swipe upwards on the preview of the App (not the App Icon).

  • Turning off imessage withe no iphone

    How to turn off imessage withe no iphone

    Try changing the password on any iMessage identifier you used (e.g., iCloud ID).

  • I am turned off completely with GarageBand..I did delete it and re installed but now it's claiming not enough memory, which I guess is a push for me to install more memory. I will do it but I will use garage band as my sou d board only while recordinelse'

    II am turned off completely with GarageBand..I did delete it and re installed but now it's claiming not enough memory, which I guess is a push for me to install more memory. I will do it but I will use garage band only  as my sound board only while recording on something else and the. I will delete it.. Real P I A....

    How do I upgrade the ram?
    The 2 places I’ve seen recommended most to buy reliable RAM are below. I have purchased RAM several times from Other World Computing and have always been very satisfied with the product and service. They have on-line instructions on how to replace the RAM. OWC has also tested RAM above what Apple states is the maximum. I now have 6GB installed on a machine supposedly limited to 4 GB.
    Crucial
    Other World Computing
    Do a backup, preferably 2 separate ones on 2 separate drives.
    Revert to a Previous OS X - Yosemite
    Revert to Snow Leopard
    If you do revert, I'd use Setup Assistant to restore your data. This process takes a while, so do it when you won't need the computer for several hours, based on my experience.

  • My Macbook Pro turns off suddenly with no reason

    My Macbook Pro turns off suddenly with no reason. The battery it's ok, the temperature of the mac it's normal, but the pc turns off. What can i do ?

    Xirver,
    if you boot into Safe mode, does your MacBook Pro turn off suddenly then also?

  • Turn off display in XP with bootcamp

    in XP , the energy savings function wont work, its impossible to turn off the screen even via screensaver.
    is this problem known??
    is there a way to do it anyway???
    thanks

    Just an idea for you. There is an entire Apple Discussion forum dedicated to Boot Camp and Windows XP.
    Whereas, not everyone here with an Intel iMac has installed, tried to install or has experience with BC & XP, everyone there has or at least has an interest. You may attract help more quickly there.
    The Forum is at the bottom of the main Apple Discussions page under Windows Compatible Technology.
    Here is a link;
    Forum: Boot Camp Public Beta

  • Turn on display with LIRC

    Hi everyone,
    I've been using this forum stealthily for quite some time, but never posted because the questions I had had already been answered. Obviously, today it's not the case
    I'm in the process of building an HTPC, running Arch and XBMC. Everything works fine, so I'm down to the little details that have been bugging me. One of them is that I can't turn on the monitor with my remote control (WinFast Y04G0004 in case that matters). I've bound this script to the power key with  irexec :
    #!/bin/bash
    MONITORSTAT=`xset -display :0 q|grep -c Monitor\ is\ On`
    if [ "$MONITORSTAT" -eq "1" ]; then
    xset -display :0 dpms force off
    elif [ "$MONITORSTAT" -eq "0" ]; then
    xset -display :0 dpms force on
    fi
    exit
    The display turns off fine (power saving mode, LED turns orange), then if I hit the key again it turns on (exits power saving mode, LED turns green), but it stays black ; I have to hit a key on the keyboard to see X again.
    Thanks in advance for helping me

    You were right, it was the screensaver. I had turned any automatic screensaving off, and I can't see why "xset dpms force off" would turn on the screensaver, so I didn't even think of trying that out. But adding "xset -display :0 s off" to the elif part of the script did the job, thank you

  • Turn off display mirroring once and for all ?

    Hi there,
    I have a 13'' macbook pro, recently upgraded to Snow Leopard. Now every time I connect my external screen (a DELL E198WFP connected with the DVI output) the display starts in "mirroring" mode. I have to manually turn mirroring off every time. According to the documentation, MacOS is supposed to "remember" my settings the next time I connect the screen but it doesn't work. Previously I had a Macbook Air with Leopard and I had not this issue (the screen would start with mirroring turned off when I connect it). Is there any possibility to disable mirroring once and for all, as I never use this feature ? Thanks

    Ok since you upgraded your system you might have a issue with your preference files for the displays. you need to Delete these two files reboot and Zap your PRAM. (Print this out)
    #1. Delete these files:
    /Library/Preferences/com.apple.windowserver and ~/Library/Preferences/ByHost/com.apple.windowserver"
    #2. Turn off Computer
    #3. Reset your PRAM by:
    (From Apples instruction page)
    Resetting PRAM and NVRAM
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

Maybe you are looking for

  • BI 7.0: Issue with Hierarchy for infoObject OPROD_HIER

    Hi Gurus, I have activated the Hierarchy datasource  0PROD_HIER_LPRH_HIER in ECC, tested  with transaction RSA3 (456 node IDs) and replicated to BW. In BW, the datasource has been assigned to the infosource  OPROD_HIER ; when I have created the infop

  • Need help with flash menu

    i have a drop-down flash menu and i would like it to be centered on my page. i use dreamweaver. when i put the code in, it automatically puts the flash menu to the left, and the drop-down submenus are layered (they will fall over any text that is und

  • Activating sm_quality_gate Quality Gate Management service

    HI we have been using ChaRM in SOlution Manager 7.0 EHP1, we are intending to exploit more functions of solution manager , i.e Implementation Project. The question is if we activate service for Quality Gate Management , there will be any impact on ou

  • RS232, Flow-Bus protocol

    Hello evryone, I am starting a new project based on communcating with a digital mass flow instrument, with an RS232 interface Flow-bus protocol(Bronkhorst manufacturer). I have to developpe a program with Labview. According to what I have already che

  • About licensing InCopy among many copy-editors

    Some publishers want to begin using InCopy with external freelance proofreaders and copy-editors. They will buy 3 licenses what they think is ideal. The point is that these people sometimes are hired (for speciality or capacity) and discharged (and s