Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

Solution: Using ThinkVantage button to turn off monitor.

Forum for scripts, utilities like TPFanControl, IBM-ECW, 2-finger scrolling, etc.
Post Reply
Message
Author
yak
ThinkPadder
ThinkPadder
Posts: 1256
Joined: Thu Dec 06, 2007 3:17 pm
Location: NRW, Germany

Solution: Using ThinkVantage button to turn off monitor.

#1 Post by yak » Sun Sep 06, 2009 9:23 pm

Since the Productivity Center will be discontinued in Windows 7, I was looking for a different things I could launch using the ThinkVantage button. This should be something started pretty frequently. Since I like to leave my laptop working I often use the Fn+F3 shortcut to turn the monitor off (I have it set to do it immediately instead of showing the power schemes OSD). And because using a key combination will never be as easy as using one button, I decided to assign the same function to the big blue key.

So, the tool started by the ThinkVantage button is set in Windows registry:

HKEY_LOCAL_MACHINE\SOFTWARE\IBM\TPHOTKEY\8001

This of course requires the Hotkey Features to be installed. However, the 8001 key won't exist if Productivity Center wasn't installed. In that case it has to be created manually. The key should contain one string value named "File", which is set to the path of the program to start when ThinkVantage is pressed.

To make it do the same thing as Fn+F3, the File has to be set to:

C:\PROGRA~1\ThinkPad\UTILIT~1\PwmOSDV.exe

This exe is installed with the Power Manager so it has to be installed for this to work. Note also that I was testing this on Windows 7 so the V in the filename probably stands for Vista, on XP it may simply be PwmOSD.exe, I'm not sure.

There is one problem with this solution. If the Fn+F3 is set in Power Manager to pop up the power schemes list, the ThinkVantage will do the same. And since I could now easily turn the screen off using the ThinkVantage button, I wanted the Fn+F3 to pop up the schemes list.

To solve this, I started looking for a small tool that would just shut the monitor down. Such a tool could then easily be assigned to the ThinkVantage button. I found one called MonOff.

This worked but I wasn't 100% satisfied as this is a command line tool (for unknown reason as it doesn't have any arguments nor does it print anything to the console) which means it opens a black command line window each time it is started.

Because turning the screen off in C/C++ is dead easy, I rolled my own:
MonitorOff.exe

This does the same but without opening any windows. Simply save it anywhere and put the path to it into the File value of the 8001 registry key.

Now lets see what Lenovo comes up with for this key in Windows 7... until then at least I'm going to prolong my screen's life using it :).
Last edited by yak on Wed Nov 24, 2010 4:40 pm, edited 1 time in total.
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10

yak
ThinkPadder
ThinkPadder
Posts: 1256
Joined: Thu Dec 06, 2007 3:17 pm
Location: NRW, Germany

Re: Solution: Using ThinkVantage button to turn off monitor.

#2 Post by yak » Sun Sep 06, 2009 10:55 pm

Updated the MonitorOff.exe linked in the first post.

The new one turns off the ThinkLight together with the LCD. The added ThinkLight code is based on my findings from the ThinkLight mail notification thread:
http://forum.thinkpads.com/viewtopic.php?f=27&t=70226
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10

loyukfai
ThinkPadder
ThinkPadder
Posts: 1088
Joined: Tue Aug 08, 2006 2:08 pm
Location: Hong Kong

Re: Solution: Using ThinkVantage button to turn off monitor.

#3 Post by loyukfai » Mon Sep 07, 2009 12:30 am

This is useful! BTW, does it work on earlier models with the Access IBM button as well?

Cheers.

yak
ThinkPadder
ThinkPadder
Posts: 1256
Joined: Thu Dec 06, 2007 3:17 pm
Location: NRW, Germany

Re: Solution: Using ThinkVantage button to turn off monitor.

#4 Post by yak » Mon Sep 07, 2009 5:34 am

loyukfai wrote:BTW, does it work on earlier models with the Access IBM button as well?
Yes, it should.

The button registry key is documented in ThinkWiki:
http://www.thinkwiki.org/wiki/ThinkPad_ ... 0_or_XP.29

It says it is the same for all three buttons: the old "ThinkPad" button, later "Access IBM" and the latest "ThinkVantage".

As for the MonitorOff.exe tool, the display shutdown code is pretty generic and should work everywhere. My ThinkLight code has been tested on XP, Vista and Windows 7 and works on all these three.
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10

Platypus
Posts: 1
Joined: Sat Feb 16, 2013 8:03 pm
Location: Montreal, Canada

Re: Solution: Using ThinkVantage button to turn off monitor.

#5 Post by Platypus » Sun Feb 17, 2013 1:40 pm

Thank you yak for your MonitorOff.exe program! It works perfectly on my Thinkpad w530 running Windows 7. I had been looking for a way to turn off the laptop screen with a single button for a while.

veganpete123
Posts: 2
Joined: Sun Mar 13, 2016 8:14 am
Location: leics, uk

Re: Solution: Using ThinkVantage button to turn off monitor.

#6 Post by veganpete123 » Sun Mar 13, 2016 8:19 am

Doesn't seem to work, for me :(

Can someone check please that I'm doing this correctly?

Thank you :D

Image

*edit - also tried enclosing the file path, just in case the spaces were problematic. Still no joy. Thank you.

RealBlackStuff
Admin Emeritus
Admin Emeritus
Posts: 23822
Joined: Mon Sep 18, 2006 5:17 am
Location: Loch Garman, Éire

Re: Solution: Using ThinkVantage button to turn off monitor.

#7 Post by RealBlackStuff » Mon Mar 14, 2016 7:22 am

Your Registry entry is wrong.
It should be: "C:\Program Files (x86)\MonitorOff.exe"
including the " quotation marks.

veganpete123
Posts: 2
Joined: Sun Mar 13, 2016 8:14 am
Location: leics, uk

Re: Solution: Using ThinkVantage button to turn off monitor.

#8 Post by veganpete123 » Fri Mar 18, 2016 9:27 am

RealBlackStuff wrote:Your Registry entry is wrong.
It should be: "C:\Program Files (x86)\MonitorOff.exe"
including the " quotation marks.
Thanks. I tried with quotation marks first, then without - same result with both, still didn't work.

RealBlackStuff
Admin Emeritus
Admin Emeritus
Posts: 23822
Joined: Mon Sep 18, 2006 5:17 am
Location: Loch Garman, Éire

Re: Solution: Using ThinkVantage button to turn off monitor.

#9 Post by RealBlackStuff » Fri Mar 18, 2016 11:31 am

You'll also need to correct your registry entry.
Delete your whole current 8001 entry.
Then right-click on TPHOTKEY and select New/Key, hit Enter and name it 8001.
Rright-click on 8001, then select New/String Value and name that File.
While File is highlighted, hit the Enter button, and in the new window fill in Value data: with
"C:\Program Files (x86)\MonitorOff.exe"
including the " quotation marks.
That should do it.

mayasim
Posts: 1
Joined: Sat May 07, 2016 10:04 am
Location: delhi, india
Contact:

Re: Solution: Using ThinkVantage button to turn off monitor.

#10 Post by mayasim » Sat May 07, 2016 10:09 am

will it really works.or any trouble using this

evening_hunger
Junior Member
Junior Member
Posts: 303
Joined: Thu Nov 26, 2015 2:55 pm
Location: Normandy, France

Re: Solution: Using ThinkVantage button to turn off monitor.

#11 Post by evening_hunger » Sat May 07, 2016 10:38 am

A bit offtopic if you can forgive me, but I think it might be useful to any Linux users googling this topic up: to turn the monitor off in Linux it suffices -in most cases- to use the command

Code: Select all

 xset dpms force off 
. Bind it to any key (ThinkVantage or what have you) and you're done.
(BTW I know people claiming Windows is simpler to use than Linux...)
T14amdR7-4750U/32GB/500gb.ssd/debian_testing (main driver)
X320/i7-2620M/8GB/256gb.ssd/FHD13.3''IPS/debian_testing (ex-main driver)
T30Pentium-M 4 1.8Ghz 512MB RAM - under restoration
X230/i5/8GB/500gb.hdd+256gb.m2ssd/IPS/debian_stable+win7
755CE, 486DX, approx 28MB RAM (Win95 JP)

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “ThinkPad Utility Work Area”

Who is online

Users browsing this forum: No registered users and 6 guests