It is currently March 28th, 2024, 5:19 pm

PluginBacklight - control the backlight of laptop or monitor

Share and get help with Plugins and Addons
cfixd
Posts: 31
Joined: September 1st, 2014, 1:38 am

PluginBacklight - control the backlight of laptop or monitor

Post by cfixd »

There is already a screen brightness plugin:
http://rainmeter.net/forum/viewtopic.php?f=18&t=18506

I haven't seen it before I write the plugin :-( ,and if you only control the backlight of laptop,the upper one may be better.
I've wasted lots of time using a desktop monitor control API to control laptop LCD,finally I decide to write them together.

This Plugin is used to control the backlight of laptop LCD or desktop monitor.(Support Vista and later)
It controls the laptop LCD backlight by setting AC/DC brightness in Power Management (IOCTL).
To control a desktop monitor (external monitor) ,the monitor must support DDC/CI. It seems most of the monitors since 2006 support it,but you may need to enable it in monitor OSD.
Both HDMI and VGA cable are supported.

It's designed to control 3 monitors at most at the same time, but I've no hardware to test it and it may not work in some situation.
In my test, laptop can only control the external monitor when mode is "copy",and it doesn't works well in some laptop(notebook) computer.
I don't know how to solve these problems, hoping some can help improve it.

It returns the percentage (0-100) of current brightness.

Options:

Monitor= (Default: -1)
-1 :Default.This Plugin will try to control laptop LCD first in Initialize function, if failed, then the desktop one.
0 :Try to control all of the desktop monitors(3 at most).It can also be used for laptop to control external monitor.
1 :Control the first desktop monitor.(The number is according to the log when Showlog=1)
2 :Control the second desktop monitor.For a laptop,the first external monitor should be 2.
3 :Control the third desktop monitor.

Policy= (Optional)
Forcelevel, :(for laptop)return the nearest brightness according to Divide=
Removable, :(for laptop to control monitor)When external monitor is hot pluged, with this option, monitors will be able to reinitialized after 3s to avoid the crash of the rainmeter, the time to reinitialize is according to Update in skin or Bang.Not suggested when you don't hot plug the monitor.

For example:For laptop,SetBacklight 50 may return real brightness 52, but when Policy=Forcelevel, the brightness will be set to 52,and return 50.


Divide= (Default: 10)
Number from 1 to 100
Decide the number of level when using "Backlight+" or "Backlight-".If it's set 20, then change the brightness by 5%.
For laptop LCD it's decide by the OEM in drivers, or you can use Policy=Forcelevel to make the number seems better, but the real level won't change.

Showlog= (Default: 0)
1 :Show screen information in the log,the real brightness level for laptop LCD, or the list of the monitors in control.It's no need to be set in daily use.

Usage:

[MeasureBacklight]
Measure=Plugin
Plugin=Backlight
;Monitor=-1
;Divide=10
;Showlog=1

Bangs:

!CommandMeasure "MeasureBacklight" "SetBacklight x"
Set backlight to x percent(between 0 and 100).
It will be set to the nearest level in laptop LCD.

!CommandMeasure "MeasureBacklight" "ChangeBacklight x"
Change the backlight by x percent.

!CommandMeasure "MeasureBacklight" "Backlight+"
!CommandMeasure "MeasureBacklight" "Backlight-"
Change the backlight by level.
It's for laptop LCD to change the real brightness level when Forcelevel is not set.

Example skin:(Right Click the (i)icon on top right to view the introductions in English)
3.png
2.png
Backlight_0.9.3.rmskin
(37.98 KiB) Downloaded 1022 times
PluginBacklight_SourceCode_0.9.3.rar
(7.66 KiB) Downloaded 481 times
User avatar
Dank420
Posts: 145
Joined: April 3rd, 2013, 1:04 am
Location: O-High-O

Re: PluginBacklight - control the backlight of laptop or mon

Post by Dank420 »

Beauty, worked for me "out of the box", useing win 7 64bit, BenQ 24" led desktop monitor (other didn't work for me so im grateful) thanks for the work, have to dig out more monitors to test multi support......thanks!!
like the plugin and the skin :thumbup:
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK
Contact:

Re: PluginBacklight - control the backlight of laptop or mon

Post by Seahorse »

The plugin gods are continuing to give, love this, well done. 8-)
User avatar
Virginityrocks
Posts: 478
Joined: February 26th, 2011, 10:22 pm

Re: PluginBacklight - control the backlight of laptop or mon

Post by Virginityrocks »

Very nice. Used in my suite. Thanks. ;)
drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Re: PluginBacklight - control the backlight of laptop or mon

Post by drakulaboy »

on Windows 10 Technical Preview doesn't work :)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: PluginBacklight - control the backlight of laptop or mon

Post by balala »

On my desktop system, with Windows 7 Ultimate and a Philips 170S LCD monitor, works very well. Thank you.
User avatar
220v110
Posts: 26
Joined: February 17th, 2014, 1:33 pm

Re: PluginBacklight - control the backlight of laptop or mon

Post by 220v110 »

Can someone make brightness skin from this volume skin?
http://fbed.deviantart.com/art/Volume-Slider-V2-0-211397034
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: PluginBacklight - control the backlight of laptop or mon

Post by jsmorley »

User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK
Contact:

Re: PluginBacklight - control the backlight of laptop or monitor

Post by Seahorse »

Having an issue with Backlight, not clear what is crashing it, but kills Rainmeter totally, which makes it hard to turn off the skin I am editing which I think is the source. What I would like to establish is it it my code, the plugin, Rainmeter or my PC at fault:

Code: Select all

Fault bucket 120337068531, type 4
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: Rainmeter.exe
P2: 3.3.0.2468
P3: 56113550
P4: Backlight.DLL
P5: 0.9.3.0
P6: 5406dc3e
P7: c0000094
P8: 0000000000002779
P9: 
P10: 

Attached files:
C:\Users\Mike\AppData\Local\Temp\WERDD40.tmp.WERInternalMetadata.xml

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_Rainmeter.exe_6c2ddb2b756bc3446decfdff2c74b7c1d6c12_280209e9_218cedcb

Analysis symbol: 
Rechecking for solution: 0
Report ID: d945964b-04b6-4e31-a1bb-8f9dde8b3051
Report Status: 0
Hashed bucket: 7f28e51e734a282955bfbaf969327cd1
WER File:
Version=1
EventType=APPCRASH
EventTime=130925700381582262
ReportType=2
Consent=1
UploadTime=130925700482826844
ReportIdentifier=54dbea02-902e-11e5-978a-448a5bd0ac3f
IntegratorReportIdentifier=2eec8b3c-ed3d-4037-97f6-99d7f2ab266a
NsAppName=Rainmeter.exe
Response.BucketId=7f28e51e734a282955bfbaf969327cd1
Response.BucketTable=4
Response.LegacyBucketId=120337068531
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=Rainmeter.exe
Sig[1].Name=Application Version
Sig[1].Value=3.3.0.2468
Sig[2].Name=Application Timestamp
Sig[2].Value=56113550
Sig[3].Name=Fault Module Name
Sig[3].Value=Backlight.DLL
Sig[4].Name=Fault Module Version
Sig[4].Value=0.9.3.0
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=5406dc3e
Sig[6].Name=Exception Code
Sig[6].Value=c0000094
Sig[7].Name=Exception Offset
Sig[7].Value=0000000000002779
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.10586.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=2057
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=efee
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=efee720ec25e082934da8765cf20412c
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=ecff
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=ecffd60274b22d1c720190fb3360078a
UI[2]=C:\Program Files\Rainmeter\Rainmeter.exe
UI[3]=Rainmeter has stopped working
UI[4]=Windows can check online for a solution to the problem.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\Program Files\Rainmeter\Rainmeter.exe
LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\WINDOWS\system32\KERNEL32.DLL
LoadedModule[3]=C:\WINDOWS\system32\KERNELBASE.dll
LoadedModule[4]=C:\WINDOWS\system32\SHLWAPI.dll
LoadedModule[5]=C:\WINDOWS\system32\msvcrt.dll
LoadedModule[6]=C:\WINDOWS\system32\combase.dll
LoadedModule[7]=C:\WINDOWS\system32\RPCRT4.dll
LoadedModule[8]=C:\WINDOWS\system32\bcryptPrimitives.dll
LoadedModule[9]=C:\WINDOWS\system32\GDI32.dll
LoadedModule[10]=C:\WINDOWS\system32\USER32.dll
LoadedModule[11]=C:\WINDOWS\system32\ADVAPI32.dll
LoadedModule[12]=C:\WINDOWS\system32\sechost.dll
LoadedModule[13]=C:\WINDOWS\system32\SHELL32.dll
LoadedModule[14]=C:\WINDOWS\system32\cfgmgr32.dll
LoadedModule[15]=C:\WINDOWS\system32\windows.storage.dll
LoadedModule[16]=C:\WINDOWS\system32\kernel.appcore.dll
LoadedModule[17]=C:\WINDOWS\system32\shcore.dll
LoadedModule[18]=C:\WINDOWS\system32\powrprof.dll
LoadedModule[19]=C:\WINDOWS\system32\profapi.dll
LoadedModule[20]=C:\WINDOWS\system32\IMM32.DLL
LoadedModule[21]=C:\Program Files\Rainmeter\Rainmeter.dll
LoadedModule[22]=C:\WINDOWS\system32\COMDLG32.dll
LoadedModule[23]=C:\WINDOWS\SYSTEM32\UxTheme.dll
LoadedModule[24]=C:\WINDOWS\SYSTEM32\WININET.dll
LoadedModule[25]=C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10586.0_none_8c15ae12515e1c22\COMCTL32.dll
LoadedModule[26]=C:\WINDOWS\system32\FirewallAPI.dll
LoadedModule[27]=C:\WINDOWS\system32\NETAPI32.dll
LoadedModule[28]=C:\WINDOWS\system32\ole32.dll
LoadedModule[29]=C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.10586.0_none_0bdd1d3064f6384a\gdiplus.dll
LoadedModule[30]=C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
LoadedModule[31]=C:\WINDOWS\SYSTEM32\MSVCP120.dll
LoadedModule[32]=C:\WINDOWS\SYSTEM32\MSVCR120.dll
LoadedModule[33]=C:\WINDOWS\SYSTEM32\DAVHLPR.DLL
LoadedModule[34]=C:\WINDOWS\SYSTEM32\fwbase.dll
LoadedModule[35]=C:\WINDOWS\system32\MSCTF.dll
LoadedModule[36]=C:\WINDOWS\SYSTEM32\PROPSYS.dll
LoadedModule[37]=C:\WINDOWS\system32\OLEAUT32.dll
LoadedModule[38]=C:\WINDOWS\SYSTEM32\dwmapi.dll
LoadedModule[39]=C:\WINDOWS\SYSTEM32\d2d1.dll
LoadedModule[40]=C:\WINDOWS\system32\clbcatq.dll
LoadedModule[41]=C:\WINDOWS\system32\windowscodecs.dll
LoadedModule[42]=C:\WINDOWS\SYSTEM32\DWrite.dll
LoadedModule[43]=C:\WINDOWS\SYSTEM32\mscms.dll
LoadedModule[44]=C:\WINDOWS\SYSTEM32\USERENV.dll
LoadedModule[45]=C:\WINDOWS\SYSTEM32\icm32.dll
LoadedModule[46]=C:\Users\Mike\AppData\Roaming\Rainmeter\Plugins\Backlight.DLL
LoadedModule[47]=C:\WINDOWS\SYSTEM32\dxva2.dll
LoadedModule[48]=C:\WINDOWS\SYSTEM32\d3d11.dll
LoadedModule[49]=C:\WINDOWS\SYSTEM32\dxgi.dll
LoadedModule[50]=C:\WINDOWS\SYSTEM32\D3D10Warp.dll
LoadedModule[51]=C:\Users\Mike\AppData\Roaming\Rainmeter\Plugins\HWiNFO.DLL
LoadedModule[52]=C:\Program Files\Rainmeter\Plugins\AdvancedCPU.DLL
LoadedModule[53]=C:\Program Files\Rainmeter\Plugins\QuotePlugin.DLL
LoadedModule[54]=C:\Program Files\Rainmeter\Plugins\WebParser.DLL
LoadedModule[55]=C:\WINDOWS\SYSTEM32\urlmon.dll
LoadedModule[56]=C:\WINDOWS\SYSTEM32\iertutil.dll
LoadedModule[57]=C:\WINDOWS\SYSTEM32\SspiCli.dll
LoadedModule[58]=C:\WINDOWS\system32\WS2_32.dll
LoadedModule[59]=C:\WINDOWS\SYSTEM32\ondemandconnroutehelper.dll
LoadedModule[60]=C:\WINDOWS\SYSTEM32\winhttp.dll
LoadedModule[61]=C:\WINDOWS\system32\mswsock.dll
LoadedModule[62]=C:\WINDOWS\SYSTEM32\WINNSI.DLL
LoadedModule[63]=C:\WINDOWS\system32\NSI.dll
LoadedModule[64]=C:\WINDOWS\SYSTEM32\DNSAPI.dll
LoadedModule[65]=C:\Windows\System32\rasadhlp.dll
LoadedModule[66]=C:\Program Files\Rainmeter\Plugins\NowPlaying.DLL
LoadedModule[67]=C:\WINDOWS\system32\PSAPI.DLL
LoadedModule[68]=C:\Program Files\Rainmeter\Plugins\AudioLevel.DLL
LoadedModule[69]=C:\WINDOWS\System32\MMDevApi.dll
LoadedModule[70]=C:\WINDOWS\System32\DEVOBJ.dll
LoadedModule[71]=C:\WINDOWS\SYSTEM32\AUDIOSES.DLL
LoadedModule[72]=C:\WINDOWS\SYSTEM32\wintypes.dll
LoadedModule[73]=C:\WINDOWS\System32\fwpuclnt.dll
LoadedModule[74]=C:\WINDOWS\SYSTEM32\bcrypt.dll
LoadedModule[75]=C:\Program Files\Rainmeter\Plugins\Win7AudioPlugin.DLL
LoadedModule[76]=C:\Program Files\Rainmeter\Plugins\SysInfo.DLL
LoadedModule[77]=C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL
LoadedModule[78]=C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL
LoadedModule[79]=C:\Users\Mike\AppData\Roaming\Rainmeter\Plugins\Chameleon.DLL
LoadedModule[80]=C:\Windows\System32\ActXPrxy.dll
LoadedModule[81]=C:\Users\Mike\AppData\Roaming\Rainmeter\Plugins\NomFerp.dll
LoadedModule[82]=C:\WINDOWS\SYSTEM32\mscoree.dll
LoadedModule[83]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
LoadedModule[84]=C:\WINDOWS\SYSTEM32\VERSION.dll
LoadedModule[85]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
LoadedModule[86]=C:\WINDOWS\SYSTEM32\MSVCR120_CLR0400.dll
LoadedModule[87]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\mscorlib\e24742a3939bece9db8105d99720b0e0\mscorlib.ni.dll
LoadedModule[88]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll
LoadedModule[89]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll
LoadedModule[90]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System\cb0700ff6398b8e9d0d936cfc4894ba1\System.ni.dll
LoadedModule[91]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\perfcounter.dll
LoadedModule[92]=C:\WINDOWS\SYSTEM32\pdh.dll
LoadedModule[93]=C:\WINDOWS\SYSTEM32\BROWCLI.DLL
LoadedModule[94]=C:\WINDOWS\SYSTEM32\rasman.dll
LoadedModule[95]=C:\WINDOWS\System32\perfproc.dll
LoadedModule[96]=C:\WINDOWS\system32\windowscodecsext.dll
LoadedModule[97]=C:\Windows\System32\msxml6.dll
State[0].Key=Transport.DoneStage1
State[0].Value=1
FriendlyEventName=Stopped working
ConsentKey=APPCRASH
AppName=Rainmeter
AppPath=C:\Program Files\Rainmeter\Rainmeter.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=09B8FCFE7B180E021C08D67587A126A1
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: PluginBacklight - control the backlight of laptop or monitor

Post by balala »

Could you please try this skin and see if it's working? Because you haven't posted a code and this way is hard to find out where could be the problem, but that Backlight skin is working on my computer, so let's see if it is on yours too.
Post Reply