[SOLVED] Timezones UTC and EDT all mixed up

I have the following settings in rc.conf:
HARDWARECLOCK="localtime"
TIMEZONE="Eastern US"
The clock in the lower right panel does indeed indicate the time in EDT.  However, as a screensaver I use the big analog clock and I also put an analog clock in the Arch login window.  Both of these clocks show the time in UTC, i.e. 4 hours ahead of EDT.  What's worse, the time stamping of all saved files, logs, etc. is also in UTC, and the "date" command shows time in UTC.  I believe this is the result of my at one time having run
# date -u
How do I reverse this so that all clocks and timestamping are synchronized to EDT?
Last edited by RobF (2007-04-23 19:49:12)

"hwclock" gives the time in UTC.
After I ran hwclock, I went into the BIOS.  The date and time in the BIOS was set for UTC time.  I reset that to the EDT time and then did a warm reboot.  That didn't make any difference in Arch.
I do dualboot into Windows XP.  The time there is correct (i.e. shows it in EDT), both in the taskbar and when running "time" from the DOS CLI.
After resetting the BIOS and checking these things in Windows, I did a cold reboot into Arch.  Now, in Arch, the login clock and the screensaver clock show the correct time (in EDT).  The "date" as well as the "hwclock" command also give the correct time (in EDT) but they say that it's UTC!  However, the clock in the bottom panel now runs 4 hrs. behind.  When I right-click on this clock and choose "Adjust Date & Time", the "Configure - KDE Control Module" window that comes up shows the correct time (in EDT) and the entry "New York - America/US - Eastern Time" in the "change timezone" box is highlighted but underneath that box it says "Current local timezone: America/New York (UTC)".
When I highlight another entry in this change timezone box and then go back to the entry "New York - America/US - Eastern Time" and click on Apply, the clock in that box resets to 4 hours earlier.  When I then redial the clock to the correct EDT time (with the up and down buttons) and hit <Enter>, it shows the correct EDT time and the line underneath the change timezone box now reads "Current local timezone: America/New York (EDT)".  Also, the clock in the bottom panel now shows the correct EDT time.
When I now run the "date" command, it gives the time 4 hours ahead and says it's UTC (which is correct).  When I save a file, it's timestamped to this UTC time.  But I don't want to have all files and logs timestamped to UTC!!  hwclock now gives the correct EDT time but says that it's UTC!
It gets worse.  After making all of these changes, I did a cold reboot into Arch.  Now the login clock and screensaver clock are back again to running 4 hrs. ahead (i.e. giving UTC time), and similarly the date and hwclock commands again give the time 4 hrs. ahead and say it's UTC (which is correct).  And the KDE time & date adjust box again says "Current local timezone: America/New York (UTC)".  I.e. any adjustment I make through the KDE Control Center Module doesn't survive a reboot.  It looks as though the "date -u" command overrides everything.  If only I could reset the "date" command to printing EDT time (which I believe is the default that was used before I ran the date  -u command)!  I've looked everywhere but haven't found a way to undo this -u switch and return to the default.
FWIW, I should say that I installed OpenNTPD, and I'm now running the ntp daemon (ntpd) on startup.  I did this after I became aware of this time readout problem but running ntp didn't change anything.
Needless to say, I'm rather confused.

Similar Messages

  • Podcasts and music all mixed in together

    Dear people. Just bought a new computer and had music copies from old computer to new. My music is now all mixed up, all the podcasts are mixed with the music. When I download music and podocasts -instead of going into podcast directory, it just goes into most recently added. Can you tell me if there is a way of fixing this so when I download pocasts it goes into the podcast directory. Much appreciated.

    See this discussion:
    http://discussions.apple.com/thread.jspa?threadID=9816
    96&tstart=0
    Eureka!
    Thank you so much your instruction to click the
    header of the leftmost column resolved my problem
    immediately .
    Something so simple and yet just what I needed. I'm
    very relieved and grateful - thank you .
    Glad it worked for you... I'll be testing 7.2 shortly myself.

  • Masters and previews all mixed up

    Recently the wife has started organizing our large (over 73 gigs) iPhoto library and complained that many of the photos were displaying as small: thumbnail sized. Investigating, I opened the iPhoto Library and found that the contents of the Masters and Previews were quite jumbled. Using Spotlight I quickly discovered that for any given file there were at least 2 versions of each image, a full size (say 1.2MB or so) and a preview (60KB or so) but my Masters directory contains hundreds if not thousands of the little previews and there are lots of the full size images in Previews.
    It also seems that, among the confused images, all the full size images have the uppercase "JPG" extension and the previews are lowercase.
    I have tried repairing twice to no avail. I haven't rebuilt because I suspect it would compound the problem by making previews of my misplaced previews etc etc. I could easily use the Finder to search/sort by file type and size, save all the originals and start a new library, but I don't want to lose all the metadata, retouching, and so on. I suspect the problem started when migrating to new Macs from our old G5 and iPhoto 6. What's the best way out of this mess?

    Sounds like when you migrated you imported your old library into iPhtoo on your new system
    NEVER import an iPhoto library into iPhoto - it does not wrok and creates a massinve mess
    The only real solution is to go back and do it correctly - drag the bad library to the desktop and then Connect the two Macs together (network, firewire target mode, etc)  or use an external hard drive formatted Mac OS extended (journaled) and drag the iPhoto library intact as a single entity from the old Mac to the pictures folder of the new Mac - launch iPhoto on the new mac and it will open the library and convert it as needed and you will be ready move forward.
    LN

  • Me and my wife both have iPhone for iTunes I use same laptop now our contacts are all mixed up. I want to delete our old synchronize a/c. To start up freshly. How can I do that?

    Me and my wife both have iPhone for iTunes I use same laptop now our contacts are all mixed up. I want to delete our old synchronize a/c. To start up freshly. How can I do that?

    Anyone at all can advise- still not sorted :-(

  • I am totally frustrated by the fact that now i have gone to iCloud and after a few synchs, my contacts are all mixed up with the wrong information.  For instance, my email and phone number comes up under someone else's name (a thousand contacts)

    I am totally frustrated by the fact that now i have gone to iCloud and after a few synchs, my contacts are all mixed up with the wrong information.  For instance, my email and phone number comes up under someone else's name (a thousand contacts).  I dont know how to repair this.  what a nightmare

    An icloud account is designed to be used by just one user.  If you have given your ID or set up your account on someone else's device, then their data will be mingled with your or worse.

  • Please a simple problem but I don't know how to solve it. After installing 16 gb of ram all is good but when I turn on the computer it is a window signaling that all is correct. How is possible to delete once and for all that window? Thank you

    Please a simple problem but I don't know how to solve it. After installing 16 gb of ram all is good but when I turn on the computer it is a window signaling that all is correct. How is possible to delete once and for all that window? Thank you

    Well then maybe you could take a screenshot because the appearance of such a window is news to me.
    Also post your OS X version and what model Mac you have. The more detail, the better. Thanks.
    To take a screenshot hold ⌘ Shift 4 to create a selection crosshair. Click and hold while you drag the crosshair over the area you wish to capture and then release the mouse or trackpad. You will hear a "camera shutter" sound. This will deposit a screenshot on your Desktop.
    If you can't find it on your Desktop look in your Documents or Downloads folder.
    When you post your response, click the "camera" icon above the text field:
    This will display a dialog box which enables you to choose the screenshot file (remember it's on your Desktop) and click the Insert Image button.
    ⌘ Shift 4 and then pressing the space bar captures the frontmost window.
    ⌘ Shift 3 captures the entire screen.
    Drag the screenshot to the Trash after you post your reply.

  • I am trying to cut and paste from a program, IEP DIRECT, and normally on my PC I have no problems; however, when using my MAC the formatting gets all mixed up

    i am trying to cut and paste from a program, IEP DIRECT, and normally on my PC I have no problems; however, when using my MAC the formatting gets all mixed up

    If you refer to this
    https://www.iepdirect.com/iepdotnet/hub/index.html
    then they have an issue with mac version.
    At a first glance, their website is optimized for Windows only, it displays badly in Safari, perhaps it would be better in Firefox or other browser.

  • Sync yahoo contact and got address all mixed up

    I just sync my yahoo contact to my iPhone and saw that I have lots of friends named AAA. Also, some addresses and phone numbers are all mixed up. It feels like someone just grabbed the addresses and swapped them. Can anyone tell me what's going on? What can I do to avoid this happening again? Much thanks.

    When the iphone is connected to the computer and itunes is open, click on edit at the top of itunes and choose preferences.
    When the preferences window opens, click on the iphone or syncing tab.
    Near the bottom there is a button to reset sync history.
    Click ok on the preferences window.
    Now go to the info tab in the iphone settings and scroll to the bottom.
    There is a check box in the advanced section to replace all contact data on the iphone.
    Check this box and click apply.
    This will replace any contact data on the iphone with a new copy.
    Hope this helps.

  • I want to ask company when user update to ios7 it stuck all of device and not clearly about apple id to active how to solve it or just keep all of device into recycle because can not use?

    i want to ask company when user update to ios7 it stuck all of device and not clearly about apple id to active how to solve it or just keep all of device into recycle because can not use?

    You need to enter the Apple ID and password that was used to set up/activate the phone. There is no way around this.

  • TS4062 we have 2 different iphones. When we are synching, the contacts and ical interfere and we end up by having all our contacts and ical info mixed together.

    we have 2 different iphones 4 and iphone 4s. Why when we are synching, the contacts and ical interfere and we end up by having all our contacts and ical info mixed together?

    Well are you syncing them with the same acount?  Are you syncing them to the same source?  If you are both syncing the iCal on the same computer then you are going to end up sharing all the entries.  You need two differnt AppleId's and user ID on the comuter you are syncing to if you want everything to stay seperate.

  • I just got an iphone 4 yesterday. I got everything all set up and working great. When I woke up last this morning, my ipod has no sound and the albums covers are all mixed up. I've checked all my settings and volume control. My text sound won't work eithe

    I just got an iphone 4 yesterday. I got everything all set up and working great. When I woke up last this morning, my ipod has no sound and the albums covers are all mixed up. I've checked all my settings and volume control. My text sound won't work either. However, my ringtone works just fine.

    Have you taken the steps recommended in the User Guide:  restart, reset, restore?

  • I will give $100 to the person who can solve this problem once and for all.

    I'm not even kidding, dude. We can do PayPay, I'll mail you a check, whatever you want. That is how frustrating this is, that is how badly I want it fixed, and that is how much overtime I've worked lately thanks to being shorthanded at my place of biz-nass. I'm an hombre of my word, so if you actually come up with a solution that works, the cheddar will be yours. Okay let's hit it.
    It's the skipping thing. First 10-12 seconds of a song - every song - will play fine, then iTunes skips, stutters, and basically does the god **** hokey pokey and shakes it all about. It happens most notably with songs that I double-click to play, but I'm pretty much noticing it on any song now after a transition is made. I've been using iTunes for ages and this didn't happen until the upgrade to 7.3. I have poured over these forums for nearly a week, tried every solution offered (even offered one of my own that actually worked for maybe four days before the whole thing started up again) and NOTHING. To save us all some time, here's what I've tried:
    - Downgrading. I'll admit I didn't do this correctly at first. I didn't remove everything according to the support guidelines, but I went down to version 6.05 and that did nothing to quell the skipping. I upgraded back up to 7.3 because hey, why not, and attempted the remaining trial fixes. I have since removed both iTunes and Quicktime, step my step according the the guidelines, and not only have I downgraded to my current running version of 7.2, I put both of the programs on my F drive (as opposed to the default C drive), my gigantic bonus internal drive where I typically keep nothing but my giganto music library. I thought putting the app on the same drive as the music might fix things. I thought wrong. Dead wrong. Dead diddly dum iddly wrong.
    - Quicktime settings. My settings for Quicktime have always been in safe mode with the output size at 16 bits. So when I saw this "fix" I just rolled my eyes. I used to have that dealio back in the dizzle when iTunes would just get all static-y and skip when I'd open other programs or even just minimize it, so that fix worked for that, but it's nothing compared to this. In simpler terms, that fix is like Superman, and this skipping? The kryptonite. Actually that's probably not a great metaphor, but we've got a ways to go and this is going to get mucho boring if I don't throw some chuckles out there. Ready for fix three? Giddy up!
    - Turn off cross-fade? It's never been on. I never really got the appeal of that, and also I think it resulted in some minor skipping back in the d. I also attempted similar fixes like turning off the equalizer, messing with the volume, closing last.fm, REMOVING an old album art retrieval program from back before iTunes got its **** together with album art, ANYTHING that might interfere with playback was turned off, removed, b-slapped, and sent crying home to its moms. Nada.
    - Recreating my library. This was the fix I offered someone else, because it actually did the trick for a few days. After an entire night spent reimporting 73 gigs worth of music, it played fine, but I did lose a ton of album art, playcounts, etc, so you can imagine how ****** I was when this wound up not being a permanent fix. I was beyond ******. I was livid. But I was taught in the dojos of my youth to channel my anger into productivity, and instead of sculpting a lovely bonsai tree, I set out to fix this pup once and for all.
    - That darn anti-virus! This was the final fix I tried, even though I wasn't using any of the culprit programs listed in the forums as causes of the skipping, and even those offering this as a solution confessed it was pretty hit or miss. But having tried everything else, having resorted to playing my music on MediaMonkey of all things, I figured I'd give it a shot. I used (reason for the past-tense forthcoming) AVG Anti-Virus, Lavasoft AdAware and something called Spyware Doctor that I think just came bundled with XP. I removed all of them. I had just done a virus scan recently to see if that's what was causing this, so I figured I'd be okay until I could redownload them after this fix wound up not working. And it didn't work, so there's that.
    There may be a couple of fixes I've tried that I'm forgetting now, since I'm delirious after spending practically every night for the past week trying to fix this problem, while my girlf, Heather, sits and laughs at me while watching Clark and Michael on her MacBook. In fact, she's laughing at the $100 offer as I type this, but I assure you, if you offer a solution that works, the money is as good as yours. If you come up with a workable solution, I'll have to test and make sure it isn't temporary like the recreating my library thing, but I won't leave you hanging once I'm satisfied that it's fixed for good. I know it's unorthodox, perhaps illegal in some states, but I'm desperate here, peeps. The ball is in your court, and I beg you not to give up the rock.
    Gateway E-2000 Windows XP

    I think the problem lays with Last.fm. I had the same exact problem as you. In your processes screen, end the task "lastfmhelper.exe" Last.fm still scrobbles. The tracks don't skip, although I notice there is still a bit of a lag in the first part of the song - but if you can deal with that, no skipping. I think you will have to end that task everytime you boot up your computer, or uninstall last.fm completely until they fix it; it is a bug in their software, as opposed to iTunes.

  • Using bulk collect and for all to solve a problem

    Hi All
    I have a following problem.
    Please forgive me if its a stupid question :-) im learning.
    1: Data in a staging table xx_staging_table
    2: two Target table t1, t2 where some columns from xx_staging_table are inserted into
    Some of the columns from the staging table data are checked for valid entries and then some columns from that row will be loaded into the two target tables.
    The two target tables use different set of columns from the staging table
    When I had a thousand records there was no problem with a direct insert but it seems we will now have half a million records.
    This has slowed down the process considerably.
    My question is
    Can I use the bulk collect and for all functionality to get specific columns from a staging table, then validate the row using those columns
    and then use a bulk insert to load the data into a specific table.?
    So code would be like
    get_staging_data cursor will have all the columns i need from the staging table
    cursor get_staging_data
    is select * from xx_staging_table (about 500000) records
    Use bulk collect to load about 10000 or so records into a plsql table
    and then do a bulk insert like this
    CREATE TABLE t1 AS SELECT * FROM all_objects WHERE 1 = 2;
    CREATE OR REPLACE PROCEDURE test_proc (p_array_size IN PLS_INTEGER DEFAULT 100)
    IS
    TYPE ARRAY IS TABLE OF all_objects%ROWTYPE;
    l_data ARRAY;
    CURSOR c IS SELECT * FROM all_objects;
    BEGIN
    OPEN c;
    LOOP
    FETCH c BULK COLLECT INTO l_data LIMIT p_array_size;
    FORALL i IN 1..l_data.COUNT
    INSERT INTO t1 VALUES l_data(i);
    EXIT WHEN c%NOTFOUND;
    END LOOP;
    CLOSE c;
    END test_proc;
    In the above example t1 and the cursor have the same number of columns
    In my case the columns in the cursor loop are a small subset of the columns of table t1
    so can i use a forall to load that subset into the table t1? How does that work?
    Thanks
    J

    user7348303 wrote:
    checking if the value is valid and theres also some conditional processing rules ( such as if the value is a certain value no inserts are needed)
    which are a little more complex than I can put in a simpleWell, if the processing is too complex (and conditional) to be done in SQL, then doing that in PL/SQL is justified... but will be slower as you are now introducing an additional layer. Data now needs to travel between the SQL layer and PL/SQL layer. This is slower.
    PL/SQL is inherently serialised - and this also effects performance and scalability. PL/SQL cannot be parallelised by Oracle in an automated fashion. SQL processes can.
    To put in in simple terms. You create PL/SQL procedure Foo that processes SQL cursor and you execute that proc. Oracle cannot run multiple parallel copies of Foo. It perhaps can parallelise that SQL cursor that Foo uses - but not Foo itself.
    However, if Foo is called by the SQL engine it can run in parallel - as the SQL process calling Foo is running in parallel. So if you make Foo a pipeline table function (written in PL/SQL), and you design and code it as a thread-safe/parallel enabled function, it can be callled and used and executed in parallel, by the SQL engine.
    So moving your PL/SQL code into a parallel enabled pipeline function written in PL/SQL, and using that function via parallel SQL, can increase performance over running that same basic PL/SQL processing as a serialised process.
    This is of course assuming that the processing that needs to be done using PL/SQL code, can be designed and coded for parallel processing in this fashion.

  • How to Get the current month at timezone UTC-10

    Hi All,
       can you please let me know How to Get the current month at timezone UTC-10.
    Function module ? which date and time needs to pass.

    Hi,
    Try with following code.
    DATA zdate TYPE  D.
    DATA ztime TYPE  T.
                      CALL FUNCTION 'ISU_DATE_TIME_CONVERT_TIMEZONE'
                        EXPORTING
                          x_date_utc          = sy-datum
                          x_time_utc          = sy-uzeit
                          x_timezone          = 'UTC-10'
                       IMPORTING
                         Y_DATE_LCL          = zdate
                         Y_TIME_LCL          = ztime
                       EXCEPTIONS
                         GENERAL_FAULT       = 1
                         OTHERS              = 2.
                      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                      ENDIF.
    WRITE : zdate, / ztime.
    Thank you,
    Sekhar.

  • Thinkpad keys once and for all

    There are lots of people out there having problems to get thinkpad keys to work. I would like to solve this issue and potencially write a wiki page about that.
    Here is the information I got till today:
    1. the ibm-acpi module is renamed to thinkpad-acpi module
    2. both modules create a proc interface under /proc/acpi/ibm/ which sometimes needs to be chrooted 666 to be able to control thinkpad functions from bash.
    3. doing echo enable,0x0000 > /proc/acpi/ibm/hotkey sends key events to the thinkpad firmware (nvram module has to be loaded). Mostly this doesn't work thou...
    4. doing echo enable,0xfffffffff > /proc/acpi/ibm/hotkey sends key events to acpid. This has to be started and does things according to the /etc/acpi/handler.sh script. This seems to work for me (T41). Here's my script:
    #!/bin/sh
    # Default acpi script that takes an entry for all actions
    set $*
    ev_type=`echo "$1" | cut -d/ -f1`
    # We have to take special care for events send by ibm/hotkey:
    if [ "$ev_type" = "ibm" ]; then
    ev_type=`echo "$1" | cut -d/ -f1`
    event=`echo "$1" | cut -d/ -f2`
    key="$2"\ "$3"\ "$4"
    else
    # Take care about the way events are reported
    ev_type=`echo "$1" | cut -d/ -f1`
    if [ "$ev_type" = "$1" ]; then
    event="$2";
    else
    event=`echo "$1" | cut -d/ -f2`
    fi
    fi
    case "$ev_type" in
    button)
    case "$event" in
    power)
    logger "acpid: power button pressed; starting shutdown"
    # logger "acpid: received a shutdown request"
    /sbin/init 0
    break
    sleep)
    logger "acpid: sleep button pressed; initiating hibernate-ram"
    # logger "acpid: received hibernate request"
    /usr/sbin/pm-suspend
    lid)
    logger "acpid: lid event"
    logger "acpid: action $2 is not defined"
    esac
    # BEGIN customization for ibm/hotkey:
    ibm)
    case "$event" in
    hotkey)
    case "$key" in
    "HKEY 00000080 00001002")
    logger "acpid: lock button (Fn+F2) pressed"
    "HKEY 00000080 00001003")
    logger "acpid: blank screen (Fn+F3) pressed; switching display off"
    xset dpms force off
    "HKEY 00000080 00001004")
    logger "acpid: sleep button (Fn+F4) pressed; initiating hibernate-ram"
    /usr/sbin/pm-suspend
    "HKEY 00000080 00001005")
    logger "acpid: bluetooth button (Fn+F5) pressed; toggling bluetooth"
    # echo 3 > /proc/acpi/ibm/beep
    if grep -q enabled /proc/acpi/ibm/bluetooth ; then
    echo disable > /proc/acpi/ibm/bluetooth
    elif grep -q disabled /proc/acpi/ibm/bluetooth ; then
    echo enable > /proc/acpi/ibm/bluetooth
    fi
    "HKEY 00000080 00001007")
    logger "acpid: screen toggle button (Fn+F7) pressed"
    "HKEY 00000080 0000100c")
    logger "acpid: hibernate button (Fn+F12) pressed; initiating hibernate"
    /usr/sbin/pm-hibernate
    "HKEY 00000080 00005001")
    # This is the lid CLOSE event
    # as of now it is already handled above
    "HKEY 00000080 00005002")
    # This is the lid OPEN event
    # as of now it is already handled above
    logger "acpid: $ev_type/$event $key is not defined"
    esac
    dock)
    case "$key" in
    "GDCK 00000003 00000001")
    logger "acpid: Dock eject request"
    "GDCK 00000003 00000002")
    logger "acpid: laptop was undocked"
    "GDCK 00000000 00000003")
    logger "acpid: laptop was docked"
    logger "acpid: $ev_typ $event event $key is not defined"
    esac
    bay)
    case "$key" in
    "MSTR 00000003 00000000")
    logger "acpid: got ultrabay eject request"
    "MSTR 00000001 00000000")
    logger "acpid: ultrabay eject lever inserted"
    esac
    esac
    logger "ACPI group $1 / action $2 is not defined"
    esac
    I have found it here http://priyadi.net/archives/2004/12/20/ … kpad-t41p/.
    5. Allthou thinkpad-acpi should in time be able to handle all keys, as of today, one still needs tpb for some of them. KDE has a module in the control center that has similar functionality and doesn't depend on tpb. I have not yet tried to get all working.
    Any other contribution would be welcome. The handler.sh script can probably be adapted or somehow rewritten, some of this info may be wrong...
    Last edited by jarda-wien (2008-03-28 16:17:24)

    Sorry, no solution, but I noticed the same behaviour on my X61s.
    Here's my handler.sh. It's pretty much the same, but it also takes care of turning on an external VGA display (if connected), adjusting the brightness per custom script, changing the cpu frequency scaling governor on AC plug/unplug and suspending to RAM on LID close. It could be improved at certain points I guess.
    #!/bin/sh
    # Default acpi script that takes an entry for all actions
    # NOTE: This is a 2.6-centric script. If you use 2.4.x, you'll have to
    # modify it to not use /sys
    set $*
    case "$1" in
    ibm/hotkey)
    case "$2" in
    HKEY)
    case "$4" in
    00001002) # Lock screen
    xscreensaver-command -lock
    #00001003) # Battery icon
    00001004) # Suspend to RAM
    hibernate -F /etc/hibernate/ususpend-ram.conf
    00001005) # Switch Bluetooth
    if [ "$(grep "status.*enabled" /proc/acpi/ibm/bluetooth)" ]; then
    echo "disable" > /proc/acpi/ibm/bluetooth
    else
    echo "enable" > /proc/acpi/ibm/bluetooth
    fi
    00001007) # Toggle external display
    if [ "$(xrandr -q | grep "VGA connected")" ]; then
    if [ "$(xrandr -q | grep "VGA connected [0-9]")" ]; then
    xrandr --output VGA --off
    else
    xrandr --output VGA --auto
    fi
    else
    xrandr --output VGA --off
    fi
    #00001008) # Toggle Trackpoint/Touchpad
    #00001009) # Eject from dock
    0000100c) # Hibernate
    hibernate -F /etc/hibernate/ususpend-disk.conf
    #00001014) # Toggle zoom
    #00001018) # ThinkVantage button
    esac
    esac
    button/lid)
    case "$2" in
    LID)
    case "$3" in
    00000080) # Lid opened/closed
    grep open /proc/acpi/button/lid/LID/state || hibernate -F /etc/hibernate/ususpend-ram.conf
    esac
    esac
    ac_adapter)
    case "$2" in
    AC)
    case "$4" in
    00000001) # AC plugged
    echo -n performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    00000000) # AC unplugged
    echo -n ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    esac
    esac
    video)
    case "$2" in
    LCD0)
    case "$3" in
    00000086) # Brightness up
    brightness +
    00000087) # Brightness down
    brightness -
    esac
    esac
    esac
    Here's my brightness script too:
    #!/bin/bash
    # This script adjusts the display brightness on my ThinkPad X61s.
    # Usage: brightness +/-
    [ "$UID" != 0 ] && echo "err, you need to be root" && exit 1
    ctrl_file=/sys/class/backlight/acpi_video1/brightness
    max_file=/sys/class/backlight/acpi_video1/max_brightness
    brightness=$(cat $ctrl_file)
    max=$(cat $max_file)
    min=20
    if [ "$1" = "+" ]; then
    if [ $brightness -ge $max ]; then
    brightness=$max
    else
    brightness=$(($brightness+$max/10))
    [ $brightness -gt $max ] && brightness=$max
    fi
    elif [ "$1" = "-" ]; then
    if [ $brightness -le $min ]; then
    brightness=$min
    else
    brightness=$(($brightness-$max/10))
    [ $brightness -lt $min ] && brightness=$min
    fi
    else
    echo $brightness && exit 0
    fi
    echo $brightness > $ctrl_file
    Of course this could be incorporated within the handler.sh itself as well.

Maybe you are looking for

  • DVD copyright protection issues ( G3Ti200 Pro-TD(MS-8851)

    Maybe some of you have already experienced this. But I just installed an internal DVD player in my PC with "Power DVD" software. I was quite happy playing several different DVD's until recently when an error message came up stating: "The TV Out port

  • Payment System

    Hi 1.i ve created outgoing excise invoice.But on selecting that Vendor in outgoing payment form it does not show that invoice for payment.but if i make A/P invoice for that Goods receipt it shows. Does it mean that for every transaction A/P and A/R i

  • How To : FCP preview editing result realtime on HDTV?

    Hi, I have a used 19" HD Ready TV from Samsung.I wish to use it as my Editing Monitor.BTW ,i shoot in Panny SD100. And edit on MacBook Pro. Question: How s'ld i connect the 19' monitor (HDMI? AV? RCA?) with my editing software through MacBook Pro? Th

  • Convert Flash to dvd format

    Hello. Does any body know how to convert a flash movie into dvd-format? Is there a program that can do it? Thank you

  • Why can't Apple & At&t get their info straight?!?!?

    So I got the 16GB model of the iPhone 3Gs directly through at&t via the online store. I decided that I wanted to upgrade to the 32GB model. Within the past two days I've gotten ALL these answers by both parties 1)Apple says I can't exchange the phone