Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running Ubuntu 9.04 on a Compaq Presario V5000 (piece of crap) and when I try to resume from standby, it's forgetting to turn my screen back on. I found a bash script somewhere a long time ago that actually fixed this problem, but I can't remember where.

So I was wondering if you guys could point me in the right direction or maybe show me how to write a quick bash script to do this.

Update: I have tried the following script:

#!/bin/sh

grep -q open /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
    # lid is open; turn on the screen
    radeontool light on
fi

Which I placed in a folder called: /etc/acpi/local/ and titled the script lid.sh.pre, but it doesn't seem to get called after standby. If I just type:

lucas@ubuntu:~$ radeontool light off
lucas@ubuntu:~$ radeontool light on

It will turn my screen off, then back on. So I'm thinking that maybe my script isn't getting called.

share|improve this question
    
have you tried moving the script to /etc/acpi/resume.d/50-turn-on-backlight.sh as Ryan suggested in his edit? –  quack quixote Dec 5 '09 at 19:05
    
Yes and it still didn't work. –  Lucas McCoy Dec 11 '09 at 17:19
    
Made sure the script is executable? (chmod +x) –  Ryan Thompson Dec 14 '09 at 23:00
    
Also, are you sure the computer is successfully resuming at all? Maybe the screen fails to come on because the computer isn't even resuming correctly. –  Ryan Thompson Dec 14 '09 at 23:01
    
@Ryan: I made sure it was executable. Your second comment may actually be the problem. It doesn't look like the hard disk are spinning or anything. Do you know any remedies? –  Lucas McCoy Dec 16 '09 at 1:06

1 Answer 1

Could you possibly be looking for this thread of mine from several years ago?

http://ubuntuforums.org/showthread.php?t=358432

If not, a minor modification of that script will probably suffice. If you can't figure out the necessary adjustments, I'll edit my answer with more details.

EDIT: Ok, so you have a slightly different problem. You need this script to run on resume, not when the lid opens. To do that, instead of putting the script in /etc/acpi/lid.sh.pre, you should put it in /etc/acpi/resume.d/50-turn-on-backlight.sh and make sure it's executable. If you ever need a script to run on resume, put it in there and prefix it with a number, as shown. (The number simply determines the order in which the scripts are executed. That doesn't matter here, so we choose the default of 50.)

share|improve this answer
1  
+1 good post, ryan –  quack quixote Oct 20 '09 at 5:01
    
I've tried what the post says, but it's not working. Read my updated question. –  Lucas McCoy Oct 20 '09 at 16:23
    
I've updated. You want the script to run when the computer resumes, not when the lid opens, so it goes in a different place. –  Ryan Thompson Oct 21 '09 at 5:34
    
I tried what your update says and it is still not working. –  Lucas McCoy Dec 11 '09 at 17:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.