SIRprise / SSD-LED

Drive Activity Indicator
69 stars 12 forks source link

Issue with Windows 11 #11

Open kevinpray1 opened 2 years ago

kevinpray1 commented 2 years ago

When the program starts, I am getting a .NET error - the program works, but the error message continues to pop up and needs to be dismissed every time. I am running the latest version of Win11 Home and the .NET framework. error-msg

pvdublo7 commented 1 year ago

Yes - getting the same error since ,NET Framework updated to 4.8.1. Win 11 home - confirmed.

Love this little tool - can we get this fixed? Would so appreciate that.

SIRprise commented 1 year ago

Thanks for the report and screenshot! Seems to have to do with the PerformanceCounter...

You could try it by running in compatibility mode, described here: https://allthings.how/how-to-run-an-app-in-compatibility-mode-in-windows-11/

You could also try to use https://www.maketecheasier.com/windows-performance-monitor/ and try to find the _diskReadCounter and the _diskWriteCounter of "PhysicalDisk" and there the value _Total. The tool is capturing the values from there and it seems it cannot find it (I'm at work... will try it later)

Are you using ARM64?

I'm testing it with a virtual pc Win11 Enterprise 10.0.22000 and it works. (Updating now...)

pvdublo7 commented 1 year ago

Hello SIR!

Thanks for the update. Attached are my Win11 specs. Happening on Win 11 Pro and Home.

Will monitor here for the update. Let me know if you need anything else. Checking out Performance Monitor now.

Thank you for digging into this for us! Paul

image

pvdublo7 commented 1 year ago

Not exactly sure where to find _diskWriteCounter of "PhysicalDisk" and there the value _Total.

This is what I pulled up in Performance Monitor:

image

pvdublo7 commented 1 year ago

Compatibility Mode seems to be helping. No NET Framework error for the moment, but will restart the PC and see how it goes after the restart. Stand by.

UPDATE - no luck. Error returned after restart. Would there be a particular version of Windows for compatibility that might work better?

pvdublo7 commented 1 year ago

Another screenshot of issue:

image

SIRprise commented 1 year ago

Hi Paul, if compatibility mode works, you could deactivate autostart in the tool and make a link manually in the autostart. After that you can edit the link and configure compatibility mode there.

Thanks you for the screenshots: The right one is what we need. I only have a german windows here: image You need to add a new indicator for testing by pressing the + button: I think the english translation of the category you need to choose is "Physical Disk" (I did a mistake and used "logical disk" in the screenshot) and then "bytes read" and "bytes written". It is important that you can see instances in the box below: here you should find "_Total" or "C:". The tool seems to fail to find them. If your computer is very slow or busy while booting up, this could also be a problem and there are tools an options to delay the start and start sequence of the autostart programs.

SIRprise commented 1 year ago

I think I will add a logging mechanism to the tool soon to collect the needed information and catch that error and give the chance to the user to retry.

SIRprise commented 1 year ago

Ok, I made a new version. It can't fix your problem, but it logs the information it has in folder ./logs It includes also a little bit more error handling. You can find it here: https://github.com/SIRprise/SSD-LED/actions/runs/3184655594 (See the artifact below)

pvdublo7 commented 1 year ago

Thank you, sir! I will run it for a couple of days and send along the logs. Thanks very much for helping with this. Paul

SIRprise commented 1 year ago

A normal log should look like:

2022-10-05 16:44:39.986 +02:00 [INF] Starting SSD-LED v1.0.7.0
2022-10-05 16:44:44.466 +02:00 [INF] Found the following Physical Disks: ["2 E:","0 C:","_Total","1 D:"]
2022-10-05 16:45:24.675 +02:00 [INF] Exiting...
2022-10-05 16:45:33.833 +02:00 [INF] Starting SSD-LED v1.0.7.0
2022-10-05 16:45:35.999 +02:00 [INF] Found the following Physical Disks: ["2 E:","0 C:","_Total","1 D:"]
2022-10-05 16:46:33.751 +02:00 [INF] Exiting...

I had another idea what could trigger the problem: maybe you have chosen a single drive for monitoring in settings and saved the settings and the drive is not there anymore. So it could help to delete or modify the settings file here (find it here #https://github.com/SIRprise/SSD-LED/issues/7). The tool started as a proof of concept and I need to make it more bullet proof and more professionel step by step.

pvdublo7 commented 1 year ago

ssd_led20221005.log

Here is a log file for you.

With regard to the drive idea you have, no - never changed the drive or the drive settings. The problem is happening on 3 computers - so it's not that. I wish it were that easy!

All started every since .NET Framework latest update was installed.

pvdublo7 commented 1 year ago

I found the config file - config.zip

I don't see anything odd. Maybe you can. The only drive I want to monitor is the C: drive.

SIRprise commented 1 year ago

Thats helpful and surprising! :-) You config indicates you have chosen C:, but the error says "_Total" could not be found, what would be the default setting. And "_Total" has been found at the start of the tool. It seems it hides after start... very strange... I try to find something in google about PerformanceCounter class and win11/.net 4.8.1

In the meanwhile I released a new version - the logfile is a little bit difficult to be found. (The easiest way is to use task manager processes->right click->open file path and search for the user.config - the log is at the same place) There is a little bit more error handling in case the user settings could not be parsed correctly

SIRprise commented 1 year ago

Now I got https://stackoverflow.com/questions/2299097/performance-counter-category-names-c - and I attached a compiled version of it here. Viewer.zip There are all categories of values I can read from the system. You can use the text boxes on the top to filter and if you selected everything, you can also see the actual measured value on the lower right. SSD-LED is choosing Physical Disks->_Total->Bytes read/s and Bytes write/s. If this tool works, SSD-LED should also do. I could imagine you do not have all categories on the right side. Here is the screenshot of mine: grafik

If that doesn't help, you could try the tool I used before: https://thinkwiki.de/tpfancontrol/hddled.zip

SIRprise commented 1 year ago

If the searched categories are there but the Viewer-tool (or the performance monitor from the screenshot yesterday) are also not able to read values, we could go on with that: https://learn.microsoft.com/en-US/troubleshoot/windows-server/performance/manually-rebuild-performance-counters I'm still not sure, if Win11 or .NET4.8.1 or something else causes the problem.

barcoboy commented 1 year ago

I know this issue has been open a while, but just wanted to comment that I am seeing this happening in Windows 10 as well. Running .NET Framework 4.8.04084.