PowerCfg-您未使用的Windows的隐藏式能源和电池工具

There's been a lot of talk about power and energy usage by PCs lately, especially ones on battery. I use an irresponsibly power hungry desktop at home, an Ivy Bridge Intel Lenovo X1 Carbon Touch for work, a Surface 2 (for email, remote desktop (RDP), videos, games and airplane stuff since I don't sweat its batter) and I'm also testing this prototype Haswell that Intel sent me. Whatever machine I get next to replace the X1 Carbon Touch (likely a Yoga 2 Pro) will be a Haswell, and ideally it will support "Connected Standby." Connected Standby is a low-power state that lasts for tens (or hundreds) of hours, but allows the PC to play music, refresh email, and receive VOIP calls. Haswell is amazing, to be clear, but it's all the components working together - chipset, wifi adapter, processor - that make for a truly compelling machine.

最近,有关PC的功率和能量使用的讨论很多,尤其是电池供电的PC。 我在家中使用不负责任的耗电量巨大的台式机,工作时使用Ivy Bridge英特尔Lenovo X1 Carbon TouchSurface 2 (用于电子邮件,远程桌面(RDP),视频,游戏和飞机等物品,因为我不怕打扰)。我还在测试Intel寄给我的Haswell原型。 无论我接下来更换X1 Carbon Touch(可能是Yoga 2 Pro)的哪台机器都是Haswell,理想情况下,它将支持“ Connected Standby”。 Connected Standby是一种低功耗状态,可以持续数十(或数百)小时,但允许PC播放音乐,刷新电子邮件和接收VOIP呼叫。 很明显,Haswell令人惊叹,但所有组件协同工作-芯片组,WiFi适配器,处理器-构成了真正令人信服的机器。

Recently I re-discovered the powercfg.exe command line tool that's built into Windows. You have this now. It's a funny little tool that, on the one hand, lets you make minute tweaks to how power is used on your computer, but on the other hand, creates the most elaborate reports on how your PC uses power.

最近,我重新发现了Windows内置的powercfg.exe命令行工具。 你现在有这个。 这是一个有趣的小工具,一方面可以让您对计算机上的电源使用方式进行细微的调整,但另一方面,它可以创建有关PC使用电源的最详尽的报告。

You may have used powercfg.exe in low disk space situations to disable the hibernation file with

您可能在磁盘空间不足的情况下使用powercfg.exe来禁用Hibernate文件

powercfg /hibernate off

It'll tell you lots of things about your system that you may not know, or that may help you better use power. For example powercfg /availablesleepstates will tell you the flavors of sleep and standy your PC supports.

它会告诉您有关系统的很多未知或可能帮助您更好地利用电源的信息。 例如,powercfg / availablesleepstates将告诉您PC支持的睡眠和待机状态。

您的电脑可以睡多久? (How deep can your PC sleep?)

Here's my fat desktop:

这是我的胖桌面:

C:\>powercfg /a
The following sleep states are available on this system:
Standby (S3)
Hibernate
Fast Startup

The following sleep states are not available on this system:
Standby (S1)
The system firmware does not support this standby state.

Standby (S2)
The system firmware does not support this standby state.

This is useful to know. My desktop supports standby. Do I use it? We'll see a little later. Here's the same query on my 5 years-newer Surface:

这很有用。 我的桌面支持待机。 我会用吗? 我们待会儿再见。 这是我5岁以上的Surface上的相同查询:

C:\>powercfg /a
The following sleep states are available on this system:
Standby (Connected)

These S1,S2,S3,S4 numbers indicate how "deeply" your system can sleep. S1 is dozing, and S4 is hibernation. You might find that your machine supports a mode like S3 or something but then it's a device you've added that is preventing it from sleeping that deeply. You can diagnose sleep issues (which, for me, usually end up being cheap USB things I've added) with

这些S1,S2,S3,S4数字表示系统可以“深度”睡眠的程度。 S1在打zing睡,S4在Hibernate。 您可能会发现您的计算机支持S3之类的模式,但后来添加的设备阻止了它的深度睡眠。 您可以通过以下方式诊断睡眠问题(对我而言,这通常是廉价的USB东西)

powercfg /devicequery s1_supported

...for each state and compare the lists of devices.

...针对每种状态并比较设备列表。

The most powerful (today) sleep state for energy management is Connected Standby also known as ACPI S0. Regular Sleep/Standby on average Win7 and Win8 machines is S3.

能源管理最强大的(今天)睡眠状态是Connected Standby,也称为ACPI S0。 在Win7和Win8计算机上,常规睡眠/待机为S3。

Connected Standby lets you effectively turn your machine off, but still get email, VOIP calls, play music, etc. There's also rules and guidelines around connected standby that limit battery drain to less than 5% of capacity over a work day.

Connected Standby可让您有效地关闭机器,但仍会收到电子邮件,VOIP通话,播放音乐等。关于Connected Standby,还有一些规则和准则可将整个工作日的电池耗电量限制为少于5%。

I ran powercfg.exe /a on the prototype Haswell I've been evaluating and it too supports connected standby, which is deeply cool. This explains the fantastic standby ("in the backpack") times I see with it. As more and more machines have Haswell and support Connected Standby, developers will need to support theses "always fresh" scenarios. It's just habit for me to open a laptop before getting on a plane, launch email, load up on RSS feeds, get my flight details. It'll be very cool to have a Haswell machine in "Connected Standby" that is always fresh, even though it may have been asleep all weekend.

我在我一直在评估的原型Haswell上运行powercfg.exe / a,它也支持连接待机,这非常酷。 这解释了我看到的出色的待机时间(“在背包中”)。 随着越来越多的计算机具有Haswell并支持Connected Standby,开发人员将需要支持这些“总是新鲜的”方案。 这只是我的习惯,在登机之前先打开笔记本电脑,发送电子邮件,加载RSS feed,获取航班信息。 在“联网待机”中拥有一台始终保持新鲜状态的Haswell机器将非常酷,即使它可能整个周末都在睡觉。

电源报告 (Power Reporting)

I recently blogged about how the Windows "High Performance" power profile differed from the "Balanced" profile on Servers' performance. Since I'm not on my desktop machine 24/7, I could save a lot of energy by making sure it's falling asleep at the appropriate time and that it's sleeping as deeply as possible.

我最近在博客中写道,Windows的“高性能”电源配置文件与服务器性能的“平衡”配置文件有何不同。 由于我不在全天候24/7台式机上,因此可以通过确保它在适当的时间入睡并尽可能深地睡眠来节省大量能量。

The real magic switches buried in PowerCfg.exe are /energy and /batteryreport and, if your machine supports "Connected Standby" also /sleepstudy, and I recommend you run them now. I shall wait. ;)

埋在PowerCfg.exe中的真正魔术开关是/ energy和/ batteryreport,如果您的计算机支持“ Connected Standby”,也应该是/ sleepstudy,我建议您立即运行它们。 我等一下;)

I ran the Energy Report on my Desktop and it generated a nice HTML report. Here's some highlights (it's super long).

我在桌面上运行了能源报告,它生成了一个不错HTML报告。 这里有一些亮点(超长)。

First, my desktop isn't configured to ever fall asleep! A fail on my part.

首先,我的桌面未配置为永远无法入睡! 我的失败。

  • Power Policy:Power Plan Personality is High Performance (Plugged In)

    电源策略:电源计划个性就是高性能(插入式)
  • The current power plan personality is High Performance when the system is plugged in.

    插入系统后,当前电源计划的个性是“高性能”。
  • Power Policy:Sleep timeout is disabled (Plugged In)

    电源策略:睡眠超时已禁用(已插入)
  • The computer is not configured to automatically sleep after a period of inactivity.

    未将计算机配置为在一段时间不活动后自动进入睡眠状态。

Second, my wifi adapter isn't set to use Low-Power. Didn't know that.

其次,我的wifi适配器未设置为使用低功耗。 不知道

  • Power Policy:802.11 Radio Power Policy is Maximum Performance (Plugged In)

    功率策略:802.11无线电功率策略是最高性能(插入式)
  • The current power policy for 802.11-compatible wireless network adapters is not configured to use low-power modes.

    802.11兼容的无线网络适配器的当前电源策略未配置为使用低功耗模式。

Finally, my Wacom Tablet may have the wrong drivers or not be able to sleep:

最后,我的Wacom平板电脑可能驱动程序错误或无法入睡:

  • USB Suspend:USB Device not Entering Selective Suspend

    USB挂起:USB设备未输入选择性挂起
  • This device did not enter the USB Selective Suspend state. Processor power management may be prevented when this USB device is not in the Selective Suspend state. Note that this issue will not prevent the system from sleeping.

    该设备未进入USB选择性挂起状态。 当此USB设备未处于“选择性挂起”状态时,可能会阻止处理器电源管理。 请注意,此问题不会阻止系统进入睡眠状态。
  • Device Name - Wacom Tablet

    设备名称-Wacom平板电脑
  • Device ID - USB\VID_056A&PID_00D1

    设备ID-USB \ VID_056A&PID_00D1

This was extremely useful information for me, so I'll take 5 minutes and make sure this big desktop goes into standby when I'm not around.

这对我来说是非常有用的信息,因此我将花费5分钟的时间,并确保不在时就可以使这个大型桌面进入待机状态。

笔记本电脑/平板电脑上的电池和电源报告 (Battery and Power Reporting on a Laptop/Tablet)

If you run powercfg /batteryreport on a laptop you get a WEALTH of information in an HTML report. Here's some highlights.

如果在便携式计算机上运行powercfg / batteryreport,则HTML报表中会显示大量信息。 这里有一些亮点。

有关已安装电池的详细信息 (Details on Installed Batteries)

Lots of details on the batteries in your machine

有关机器中电池的许多详细信息

  • NAME - X864048BA

    名称-X864048BA
  • MANUFACTURER - ATL

    制造商-ATL
  • SERIAL NUMBER - 12412

    序列号-12412
  • CHEMISTRY - L/ION

    化学-L / ION
  • DESIGN CAPACITY - 31,297 mWh

    设计能力-31,297兆瓦时
  • FULL CHARGE CAPACITY - 31,646 mWh

    完全充电容量-31,646兆瓦时
  • CYCLE COUNT - 34

    循环数-34

What the device was doing, when, the battery mWh and times:

设备在做什么,何时,电池的mWh和时间:

image

You get awesome charts showing how you battery discharges, charges, and percentages.

您会获得很棒的图表,显示电池的放电,充电和百分比情况。

image

As well as detailed usage history, percentage used and hours used.

以及详细的使用历史记录,已用百分比和已用小时。

image
通过/ sleepstudy,连接的备用计算机可以获得更惊人的报告 (Connected Standby machines get an even MORE amazing report with /sleepstudy)

You can see what apps are using what about of battery and time, what devices are the "worst offenders" and then you can use this knowledge to decide what you keep running in the background.'

您可以查看哪些应用程序正在使用什么电池和时间,哪些设备是“最坏的冒犯者”,然后您可以使用此知识来确定在后台继续运行什么。

image

Here is one Connected Standby session:

这是一个Connected Standby会话:

image

I was a little surprised at the quantity of hard data collected and stored by Windows. Also, when blogs and reviewers do detailed tests on different machines showing battery life and stressed tests, are they running powercfg.exe to ensure all the drivers are working together and haven't been flagged as either power-hungry or energy-stupid?

Windows收集和存储的大量硬数据令我有些惊讶。 另外,当博客和审阅者在不同的计算机上进行详细的测试以显示电池寿命和压力测试时,他们是否在运行powercfg.exe以确保所有驱动程序都可以正常工作,并且没有被标记为“耗电或能源愚蠢”?

I would love to see even more data on what Windows is doing around energy, and I'm nearly positive the system is keeping track of power-hungry apps. Why not give me a little "heat map" in the title bar so I can know what browser uses the most power, what app is working too hard, or what website is running JavaScript in a loop? Why not give us the option to put those tools front and center?

我希望看到Windows围绕能源所做的更多数据,并且我几乎肯定该系统会跟踪耗电的应用程序。 为什么不在标题栏中给我一些“热图”,这样我才能知道哪种浏览器使用的功率最多,哪个应用程序工作太辛苦或者哪个网站正在循环运行JavaScript? 为什么不让我们选择将这些工具放在首位和居中?

Sponsor: Big thanks to Telerik Icenium for sponsoring the feed this week! Build and publish iOS & Android apps with Visual Studio using only HTML5 & JavaScript! Telerik Icenium now includes Visual Studio integration. Start a 30 day trial with support now!

赞助商:非常感谢Telerik Icenium本周赞助了此提要! 仅使用HTML5和JavaScript使用Visual Studio构建和发布iOS和Android应用程序! Telerik Icenium现在包括Visual Studio集成。 立即开始获得支持的30天试用

翻译自: https://www.hanselman.com/blog/powercfg-the-hidden-energy-and-battery-tool-for-windows-youre-not-using

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值