|
Actually, it's about 20 pages or so of C#; the rest is the "framework" / class libraries.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I've reported a _problem_ with my HP win10 laptop. I would shut the system down (Start...Shut down) with the system 100% charged. a few days later I would return to the laptop & find that the battery was drained to 80% or so. What?
I wrote a program that shows wear-leveling (Open Source code at my github GitHub - raddevus/wearlevel: wearlevel project that checks 1) how long OS has been running, 2) how many bytes read and written during uptime.[^] ). It'll show you number of bytes read/written since PC turned on & will display how long OS been running (GetTickCount64() ).
Anyways, I had shut down my computer 1 week before. Then I returned to it, started it up & ran the wear-leveling app. It told me that the computer had been running for over 1 week.
I was shocked.
I talked to my son about it and he said, "there's a weird setting under power options" and we started picking around. He found it. Check out this snapshot[^].
It's shown turned off in the image, because I turned it off when my son showed me.
Notice that the option is grayed out until you choose the Admin option [Change settings that are currently available].
After turning the option off, I shutdown my computer.
I went back and ran my wearleveling app & it said my computer had only been running a bit over 1 minute now.
I searched around a bit for an explanation and found this:
How Fast Startup Works
Fast Startup combines elements of a cold shutdown and the hibernate feature. When you shut down your computer with Fast Startup enabled, Windows closes all applications and logs off all users, just as in a normal cold shutdown. At this point, Windows is in a state very similar to when it’s freshly booted up: No users have logged in and started programs, but the Windows kernel is loaded and the system session is running. Windows then alerts device drivers that support it to prepare for hibernation, saves the current system state to the hibernation file, and turns off the computer.
Still Curious
I'm curious if my laptop has a bug or if keeping the system running in this very low state is actually the way it works. I may never know, but hopefully I've resolved it since I turned this off.
|
|
|
|
|
I would suspect a bug. Windows has had issues for decades with power management and/or stupid decisions, most of which are not advertised. For example, with the release of Windows 10 (may have been earlier) Microsoft decided to start turning power off to usb devices - by default. I currently have about a dozen devices - mostly ethernet and serial ports - connected to usb for development. It was maddening why I was losing connections or connections were non-responsive until a friend of mine mentioned to check the power settings.
Many times, Windows 10 will roll out a major update and reset the defaults.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
charlieg wrote: I currently have about a dozen devices - mostly ethernet and serial ports - connected to usb for development.
I too have created USB-powered devices & suffered the same challenges. So annoying.
charlieg wrote: Many times, Windows 10 will roll out a major update and reset the defaults.
I've griped about this for a long time. My laptop also has a fingerprint reader. One of the (RIDICULOUSLY STUPID) features of the fingerprint reader driver is a setting that allows the OS to "turn the power off to save energy". Numerous times, I've turned off the feature -- making it so it cannot turn the power off on the fingerprint device.
I will leave my laptop on over night and return to it to find the fingerprint sensor will not read and log me in. Once again, a windows update has run & switched the option back so it can turn off the power to the fingerprint sensor. OY!!!
|
|
|
|
|
lol. So a few weeks ago I updated my development laptop. The camera now scans my eyes and logs me in. So, see? You need a new laptop!
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Somehow, I suspect it's not actually keeping the system running; it's just not resetting the "startup" timestamp. When you query how long it's been running, it takes the current timestamp, subtracts the startup timestamp, and gives you the difference.
There are other ways to get the system uptime:
c++ - GetTickCount values on Windows 10 - Stack Overflow[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
No, that's incorrect, because when I do a Restart the value changes.
Plus, my laptop battery deplets.
Plus, the reads / writes values goes into the billions while the laptop is supposedly off.
It's not reading something incorrect.
Either the laptop has a problem -- which has been confirmed at HP -- Here's an entry of a bunch of people mentioning this problem on hp laptop: Pavilion 15z-eh000 has a power drain issue even at s5 state - HP Support Community - 7929731[^] .
Or there is a laptop and OS issue which is a Perfect Storm of bugs which keeps the laptop slightly powered up.
modified 17-May-22 14:14pm.
|
|
|
|
|
> No, that's incorrect, because when I do a Restart the value changes.
Actually, that's also correct. The "fast startup" causes it to not reset uptime when doing a shutdown, but restart actually does reset uptime.
It is thoroughly confusing.
|
|
|
|
|
|
|
It seems to me replacing the CMOS battery is, if not the first thing to do after a computer malfunction, always a good idea if you can't recall the last time you performed such routine maintenance. That said, in all the years that I favored my DELL Inspiron ... I couldn't even say whether it had a CMOS battery (because I certainly never consciously reupped one).
Just for FAILSAFE purposes, pull the CMOS battery ... to see that the BIOS resets. You really couldn't go wrong "testing" that, right? If not for running up the "Fast Startup" colors, just to refresh your own non-routine routine Windows use behavior.
|
|
|
|
|
|
Well that's certainly interesting. A few times I've had strange driver-related bugs, and (knowing that a restart is not quite the same as a shutdown/startup) I've done a full shut down, waited 10 minutes, and started up - expecting that if I tell Microsoft to shut the system down, it will do as I've requested. This explains why "hard" reboots like this do not clear driver faults, because the drivers (and other system processes) are not actually being restarted. WTF, Microsoft?
Option now changed. And I will need to do SWMBO's machine too as that has all sorts of nasty behaviour that has persisted across multiple last-ditch attempts to clear stuff by SHUTTING DOWN AND RESTARTING. (In CAPS because I'm metaphorically shouting at *@*&% Microsoft...)
(Oh, and it seems you can only get to that screen via Control Panel NOT via system settings / power plans)
|
|
|
|
|
DerekT-P wrote: Option now changed. And I will need to do SWMBO's machine too as that has all sorts of nasty behaviour that has persisted across multiple last-ditch attempts to clear stuff by SHUTTING DOWN AND RESTARTING. (In CAPS because I'm metaphorically shouting at *@*&% Microsoft...)
I agree 100%
|
|
|
|
|
Power & Sleep Options in Settings. Then click "Additional power settings" under "Related settings" heading on far right.
Mike
|
|
|
|
|
Unfortunately by design. "Fast Startup" is designed to keep your profile in memory so it can be reloaded quickly the next time you turn on the computer. Keeping the memory alive is why you see battery usage when "shutdown." Basically it's a pseudo sleep mode. Unfortunately it also prevents using shutdowns to enable reloading a profile and the only way to reload a profile when this misfeature is active is to use the "Restart" or "Logoff followed by a Shutdown". I always turn it off for this reason.
|
|
|
|
|
Yes, that's my point too, the feature is probably far more problematic than it is helpful.
Imagine all the strange states that will occur when someone "shuts down" thinking everything is wiped, but then this very esoteric feature is on. REally kind of terrible.
|
|
|
|
|
Another consideration:
When it's in the "hibernating" state, the file system(s) are still mounted, so on a dual-boot system you can't access them from, say, Linux.
This has bitten me in the past, but I can't recall what Windows version it was.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
I turned this thing off as soon as I discovered it. It keeps the damn kernel resident in memory and turns your ram into a sort of NVRAM (at the cost of your battery).
I don't care how long it takes to boot, a desktop or laptop computer must be as dead as your great-great-great grandmother when you shutdown. The one exception being the system clock (as always) and maybe a signal monitor on your NC for remote bootup (those things are tricky to get working right)
It just ain't right...almost contra natura 
|
|
|
|
|
Great post. I agree 100% It's a crazy feature -- especially since it is _basically hidden_ to most users. I've been using Windows since Win3.1 & I muck around in Windows a lot & understand a lot of settings but this feature is quite esoteric -- and I believe it is relatively new (only implemented under Win10, right?)
It should be turned off by default & if the user wants it then they can turn it on.
My drive is a M.2 nvme anyways & my laptop starts up in about 5 seconds even without this feature.
|
|
|
|
|
Okay, fair[^]
To err is human. Fortune favors the monsters.
|
|
|
|
|
|
Too funny
The most expensive tool is a cheap tool. Gareth Branwyn
JaxCoder.com
|
|
|
|
|
<rant>
If you want to build up some technical debt that becomes brittle, difficult to maintain, and that will eventually metastasize into a massive pus spewing ball of nightmares be sure to package your code into multiple NuGet packages that you sprinkle over your projects like hail on a greenhouse.
Do these things save time?
No.
The web of dependencies that you can build with these things is incredible and I'd argue that the time it takes to properly manage these conveniences more than offsets simply keeping all your code for a solution within that solution. I've about had it with nice little widgets you can include in a project that immediately explode when jumping from JQuery 3.5.1 to 3.5.2 - indecipherable errors and surprise failures everywhere.
Don't even get me started on the magic of code generation... that is a nice little dependency that will absolutely stab you in the back, rob you, steal your car and run off to Mexico with your girlfriend. I'm getting to the point where I hate every single freakin' pointdexter that posts a solution of some sort on GitHub - I'm glad you've managed to pad yoru resume - thanks for the headache.
|
|
|
|
|
MadGerbil wrote: NuGet ... JQuery
There's your first problem.
Client-side libraries like Bootstrap and jQuery should never have been distributed as NuGet packages. Especially since Visual Studio now has a built-in client library manager[^] to manage them for you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|