thinkpads.com Support Community Forum Index Bill Morrow's thinkpads.com Open Forum - The Original Thinkpad Support Forum
Follow ThinkpadsForum on Twitter
Goodbye Lorita, wherever you've gone..

If you've found this forum useful, please consider donating a dollar or two

It is currently Wed Apr 26, 2017 3:03 am

All times are UTC-05:00




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Sun Sep 06, 2009 9:23 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
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 :).

_________________
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


Last edited by yak on Wed Nov 24, 2010 4:40 pm, edited 1 time in total.

Top
   
PostPosted: Sun Sep 06, 2009 10:55 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
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:
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


Top
   
PostPosted: Mon Sep 07, 2009 12:30 am 
Offline
ThinkPadder
ThinkPadder

Joined: Tue Aug 08, 2006 2:08 pm
Posts: 1085
Location: Hong Kong
This is useful! BTW, does it work on earlier models with the Access IBM button as well?

Cheers.


Top
   
PostPosted: Mon Sep 07, 2009 5:34 am 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
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


Top
   
PostPosted: Sun Feb 17, 2013 1:40 pm 
Offline

Joined: Sat Feb 16, 2013 8:03 pm
Posts: 1
Location: Montreal, Canada
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.


Top
   
PostPosted: Sun Mar 13, 2016 8:19 am 
Offline

Joined: Sun Mar 13, 2016 8:14 am
Posts: 2
Location: leics, uk
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.


Top
   
PostPosted: Mon Mar 14, 2016 7:22 am 
Offline
Admin
Admin

Joined: Mon Sep 18, 2006 5:17 am
Posts: 17238
Location: Mt. Cobb, PA USA
Your Registry entry is wrong.
It should be: "C:\Program Files (x86)\MonitorOff.exe"
including the " quotation marks.


Top
   
PostPosted: Fri Mar 18, 2016 9:27 am 
Offline

Joined: Sun Mar 13, 2016 8:14 am
Posts: 2
Location: leics, uk
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.


Top
   
PostPosted: Fri Mar 18, 2016 11:31 am 
Offline
Admin
Admin

Joined: Mon Sep 18, 2006 5:17 am
Posts: 17238
Location: Mt. Cobb, PA USA
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.


Top
   
PostPosted: Sat May 07, 2016 10:09 am 
Offline

Joined: Sat May 07, 2016 10:04 am
Posts: 1
Location: delhi, india
will it really works.or any trouble using this


Top
   
PostPosted: Sat May 07, 2016 10:38 am 
Offline
Sophomore Member

Joined: Thu Nov 26, 2015 2:55 pm
Posts: 185
Location: Rouen, France
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:
 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...)

_________________
x220/i7-2620M/8GB/256gb.ssd/ips/debian (main driver)
x230/i5/8GB/500gb.hdd+256gb.m2ssd/tn/debian+win7 (better half)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 posts ] 

All times are UTC-05:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited