Jump to content
2,189 posts in this topic

Recommended Posts

v2.4.6 (r195) no rpm on RX64 GPU:

 

1550216657_2019-04-1021_40_23.png.0aee469794c5b7945f7844db8176b8fd.png

 

The vclist it shows ok:

 

[losinka@imac]:~/Downloads$ ./vclist
----------------------------------------------------
vclist (vector sigma 2018), found 3 graphics cards!
----------------------------------------------------
Model               = Intel HD Graphics 530
vendor ID           = <86800000>
vendor ID           = <12190000>
revision ID         = <06000000>
subsystem ID        = <00d00000>
sub system VendorID = <58140000>


Device Utilization  = 0%
vram Used           = 71426048 bytes
vram Free           = 7444766720 bytes
----------------------------------------------------
Model               = Radeon RX Vega 64
vendor ID           = <02100000>
vendor ID           = <7f680000>
revision ID         = <c1000000>
subsystem ID        = <7fe30000>
sub system VendorID = <a21d0000>


Device Utilization  = 0%
Total Power         = 10 Watts
Temperature         = 42°
Fan Speed           = 0 RPM
Fan Speed           = 36%
vram Used           = 63299584 bytes
vram Free           = 314453952 bytes
----------------------------------------------------
Model               = Radeon Vega Frontier Edition
vendor ID           = <02100000>
vendor ID           = <63680000>
revision ID         = <00000000>
subsystem ID        = <766b0000>
sub system VendorID = <02100000>


Device Utilization  = 0%
Total Power         = 7 Watts
Temperature         = 27°
Fan Speed           = 673 RPM
Fan Speed           = 13%
vram Used           = 7208960 bytes
vram Free           = 16934801344 bytes


[losinka@imac]:~/Downloads$

 

upd: No FAN's on this version:

 

1219306799_2019-04-1021_56_54.png.bcc25610cf5fe5ad8a7698f120f193b3.png

Edited by losinka
Link to comment
Share on other sites

Hi Slice,

 

HwmonitorSMC2 conflicts with iojones (1.2.2, 1.1) and ioregistry explorer( 1.x, 2.x , 3.x) :

 

whenever hwmonitorSMC2 is running, iojones keeps crashing, and ioregistry explorer will be extremely slow to open and to browse. Quit it solves the issue.

 

can you take a look at it? Thanks.  

Link to comment
Share on other sites

20 hours ago, losinka said:

v2.4.6 (r195) no rpm on RX64 GPU:

 

1550216657_2019-04-1021_40_23.png.0aee469794c5b7945f7844db8176b8fd.png

 

The vclist it shows ok:

 


[losinka@imac]:~/Downloads$ ./vclist
----------------------------------------------------
vclist (vector sigma 2018), found 3 graphics cards!
----------------------------------------------------
Model               = Intel HD Graphics 530
vendor ID           = <86800000>
vendor ID           = <12190000>
revision ID         = <06000000>
subsystem ID        = <00d00000>
sub system VendorID = <58140000>


Device Utilization  = 0%
vram Used           = 71426048 bytes
vram Free           = 7444766720 bytes
----------------------------------------------------
Model               = Radeon RX Vega 64
vendor ID           = <02100000>
vendor ID           = <7f680000>
revision ID         = <c1000000>
subsystem ID        = <7fe30000>
sub system VendorID = <a21d0000>


Device Utilization  = 0%
Total Power         = 10 Watts
Temperature         = 42°
Fan Speed           = 0 RPM
Fan Speed           = 36%
vram Used           = 63299584 bytes
vram Free           = 314453952 bytes
----------------------------------------------------
Model               = Radeon Vega Frontier Edition
vendor ID           = <02100000>
vendor ID           = <63680000>
revision ID         = <00000000>
subsystem ID        = <766b0000>
sub system VendorID = <02100000>


Device Utilization  = 0%
Total Power         = 7 Watts
Temperature         = 27°
Fan Speed           = 673 RPM
Fan Speed           = 13%
vram Used           = 7208960 bytes
vram Free           = 16934801344 bytes


[losinka@imac]:~/Downloads$

 

upd: No FAN's on this version:

 

1219306799_2019-04-1021_56_54.png.bcc25610cf5fe5ad8a7698f120f193b3.png

The r195's commit says "don't show bad sensors". fans that says 0 rpm are hide. Anyway if you want to see bad sensors create a file (or a directory) to your Desktop called HWBadSensors:

touch ~/Desktop/HWBadSensors

and restart the app. Tell me if those sensors show up.

Link to comment
Share on other sites

18 hours ago, justin said:

HwmonitorSMC2 conflicts with iojones (1.2.2, 1.1) and ioregistry explorer( 1.x, 2.x , 3.x) :

Untrue. HwmonitorSMC2 read the IOKit registry using IOKit framenwork, just like the apps mentioned by you. Each time you poll the IO registry the IOKit framework create a snapshot of it, and to do that ..it create a lock (a mutex) to avoid concurrency operations on multiple threads, i.e. it put threads to wait each other. Matter of nanoseconds. 
 

18 hours ago, justin said:

ioregistry explorer will be extremely slow to open and to browse. Quit it solves the issue.

Both iojones and ioregistry explorer do additional tasks like listening for changes while HWMonitorSMC just poll each time you have set in the settings.

Basically you can't blame no one if you want access the same resource  from different apps.

A remedy is only to:

  1. use one of them at time
  2. or disable some sensors (you can do that)
  3. or slow down with polling time of the sensors
  4. or just open, for example IORegistryExplore.app and save the snapshot and watch it off line (i.e. not in real time)....and you should do that.

 

18 hours ago, justin said:

whenever hwmonitorSMC2 is running, iojones keeps crashing

Wrong assumption. Tell that to the developer of iojones since it is his app that crash:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib               	0x00007fff7a843258 objc_retain + 24
1   net.sourceforge.IOJones       	0x000000010e476f17 0x10e46b000 + 48919
2   net.sourceforge.IOJones       	0x000000010e4730fc 0x10e46b000 + 33020
3   net.sourceforge.IOJones       	0x000000010e471a4d 0x10e46b000 + 27213
4   net.sourceforge.IOJones       	0x000000010e46fcfc 0x10e46b000 + 19708
5   net.sourceforge.IOJones       	0x000000010e46fe1d 0x10e46b000 + 19997
6   com.apple.framework.IOKit     	0x00007fff524988c8 IODispatchCalloutFromCFMessage + 181
7   com.apple.CoreFoundation      	0x00007fff4fb9d858 __CFMachPortPerform + 282
8   com.apple.CoreFoundation      	0x00007fff4fb9d732 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
9   com.apple.CoreFoundation      	0x00007fff4fb9d690 __CFRunLoopDoSource1 + 527
10  com.apple.CoreFoundation      	0x00007fff4fb8577e __CFRunLoopRun + 2535
11  com.apple.CoreFoundation      	0x00007fff4fb84b45 CFRunLoopRunSpecific + 459
12  com.apple.HIToolbox           	0x00007fff4ee639db RunCurrentEventLoopInMode + 292
13  com.apple.HIToolbox           	0x00007fff4ee63715 ReceiveNextEventCommon + 603
14  com.apple.HIToolbox           	0x00007fff4ee634a6 _BlockUntilNextEventMatchingListInModeWithFilter + 64
15  com.apple.AppKit              	0x00007fff4d1fe90b _DPSNextEvent + 965
16  com.apple.AppKit              	0x00007fff4d1fd6a3 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
17  com.apple.AppKit              	0x00007fff4d1f77c0 -[NSApplication run] + 699
18  com.apple.AppKit              	0x00007fff4d1e6d00 NSApplicationMain + 777
19  libdyld.dylib                 	0x00007fff7bfdd3d5 start + 1

..looks like the error relates accessing deallocated memory.

HWMonitorSMC2 open/close connections with different drivers which can make iojones under a condition, i.e. a bug (from it),

in fact as you can see IORegistry explorer doesn't crash.

Edited by vector sigma
typo
Link to comment
Share on other sites

3 hours ago, vector sigma said:

The r195's commit says "don't show bad sensors". fans that says 0 rpm are hide. Anyway if you want to see bad sensors create a file (or a directory) to your Desktop called HWBadSensors:


touch ~/Desktop/HWBadSensors

and restart the app. Tell me if those sensors show up.

This is a not "bad sensors": in idle, Vega RX64 shows 0rpm but in load the RPM's are more than "0"

 

"touch ~/Desktop/HWBadSensors" return the Vega fan back, but did not return the other fan's:

 

708564964_2019-04-1021_56_54.png.951eab214157c0c39d01ca9c1c7b7698.png

 

v2.4.5 is ok

 

Grazie mille! :)

Edited by losinka
  • Like 1
Link to comment
Share on other sites

1 minute ago, losinka said:

This is a not "bad sensors": in idle, Vega RX64 shows 0rpm but in load the RPM's are more than "0"

Ok, that explain a lot. The app doesn't know when it is in idle mode, but a dump made with HWMonitorSMC2 in idle state first, an then in fully operational state  can make me understand if I can detect both modes and so be sure the fans reading is 0 because is idle or just is a bad value.

 

2 minutes ago, losinka said:

"touch ~/Desktop/HWBadSensors" return the Vega fan back, but did not return the other fan's:

try:HWMonitorSMC2.app.zip 

  • Thanks 1
Link to comment
Share on other sites

12 minutes ago, vector sigma said:

Ok, that explain a lot. The app doesn't know when it is in idle mode, but a dump made with HWMonitorSMC2 in idle state first, an then in fully operational state  can make me understand if I can detect both modes and so be sure the fans reading is 0 because is idle or just is a bad value.

 

try:HWMonitorSMC2.app.zip 

 

I do not see disconnected fan. It is normal?

 

1139393177_2019-04-1123_06_28.png.8cb0fb389dc6bfb1811dfb95e20fe543.png765149035_2019-04-1123_07_41.png.b18f42476c9c190fba7c8acf0cc426f0.png

Link to comment
Share on other sites

4 minutes ago, losinka said:

Now shows good, thank you!

can I have those dumps?

45 minutes ago, vector sigma said:

Ok, that explain a lot. The app doesn't know when it is in idle mode, but a dump made with HWMonitorSMC2 in idle state first, an then in fully operational state  can make me understand if I can detect both modes and so be sure the fans reading is 0 because is idle or just is a bad value

 

Link to comment
Share on other sites

On 4/12/2019 at 3:51 AM, vector sigma said:

Ok, that explain a lot. The app doesn't know when it is in idle mode, but a dump made with HWMonitorSMC2 in idle state first, an then in fully operational state  can make me understand if I can detect both modes and so be sure the fans reading is 0 because is idle or just is a bad value.

 

try:HWMonitorSMC2.app.zip 

@vector sigma

Hi, HWMonitorSMC2.app 2.4.6 version, the menu bar icon is asymmetrical, the spacing between the two sides is not coordinated, it looks very awkward, how can I change it? Or can you change it in the next version?

1.png

2.png

Link to comment
Share on other sites

  • 3 weeks later...

Release 196 is uploaded to sf.net including HWMonitorSMC2 v2.4.6

Снимок экрана 2019-05-08 в 6.06.03.png

 

@vector sigma

Menu font is too large for me. Is there a way to tune it?

3 minutes ago, Slice said:

 

 

@vector sigma

Menu font is too large for me. Is there a way to tune it?

Yes! It works!

Снимок экрана 2019-05-08 в 6.18.53.png

 

  • Like 3
Link to comment
Share on other sites

16 hours ago, Slice said:

Release 196 is uploaded to sf.net including HWMonitorSMC2 v2.4.6

Снимок экрана 2019-05-08 в 6.06.03.png

 

@vector sigma

Menu font is too large for me. Is there a way to tune it?

Yes! It works!

Снимок экрана 2019-05-08 в 6.18.53.png

 

Hi Slice, I'm so sorry to have few time lately to put in this project but sincerely I have few forces at the end of the day. Locally I have more changes for the app and the fan's control for W836x.kext which work ok for me ...just I have to implement the control by the app to make it usable by users. Hope to find time to finish soon..

 

Glad that you can change fonts as you want.

Link to comment
Share on other sites

On 5/15/2019 at 11:40 AM, fabiosun said:

I have different behavior in fan speed reading using latest 196 commit 

Yes, see this post for the solution. There's a bug which I've only fixed locally. I'm working slowly to implement Fan's control... but I didn't finish the job yet:

FanControl.png.5367b419e4c235d03b92e81d8488bc46.png

coming soon.

 

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Hi guys, today I've created the "development" branch where I'll put new code from now on. What's on the new branch?

The Fan control from HWMonitorSMC2 for all kexts that support writing SMC keys, Apple or not.

 

W836x.kext (Nuvoton and Windbond chips) is highly modified and uses the NVRAM to store settings across reboots, and this is how it works:

  1. Install the FakeSMC.kext and W836x.kext from the dmg attached. Will not work with old FakeSMC.kext.
  2. To enable the Fan control you have to add the new kernel flag -fanCtrl and reboot.
  3. Use the new HWMonitorSMC2.app, always from the attached dmg.
  4. Go to the preferences and enable "Fan Control", restart the app for the changes to take effect. If you want to show min and max values you have to enable "Show Min/Max speed" as well.

FanControl.png.ffc3590a4768fe551115f7b0b97fc4f3.png

 

 

How W836x.kext knows the min and max rpms can do a fan?

Simply by calibrating them during the first attempt ever made, by slow down at minimum your fans... so it will know the minimum rpms, and so the same for the max values. Values will be saved to the NVRAM, so next times this will not happen again.

You can recalibrate fans by setting the following nvram variable to the max:

sudo nvram HW_fanControl=%ff

..and you will hear your fans slow down firstly, and then go at max for some seconds. The third stage is to restore the motherboard defaults, so that you can decide if enable the fan control for a specific fan.... directly in HWMonitorSMC2.app:

PWM.png.687869f08267b28167683f6b47c4347b.png

pay attention that you have to enable the PWM checkbox otherwise you will not be able to edit its value.

(By disabling the PWM checkbox... the fan will be in auto mode, or to be more precise how is set in the BIOS)

 

 

Warning: as you can see my CPU Fan is controllable while "Fan 0" isn't and have equal min and max values. Why? This fan is not a PWM one because only have a 3 pin connector. In Fact to be controllable fans must have 4 pins:

PWM.jpg.9b7f224136850c0728c8da08033c4e36.jpg

 

Legacy and new SMC keys

 

In 2018 Apple introduced new SMC keys that sobstitute the old "FS! ", and in new models keys are in the format of "F1Md". This latest is the default method, but you can switch back in using the old one by adding the kernel flag "-legacyFan"

 

Why the nvram to store settings?

  1. Is persistent across reboots for all the users.
  2. You don't have to save a file somewhere or install scripts and daemons.
  3. nvram saving will only be used if HW_fanControl variable is already present in nvram... in this case published by W836x.kext. If this var is not present the app will try to write smc keys directly, but it is not persistent without a daemon that save/read somewhere smc keys involved at power off and/or power on time. Also that means that in real Mac, or with other plugins, nvram will be not touched.

How other projects should be able to use the nvram variables saved by HWMonitorSMC2.app and use the same method?

  1. The driver must post the nvram variable HW_fanControl with a value in byte >= 0 (but less then 0xff). This way HWMonitorSMC2.app knows that we want to use nvram method.
  2. being able to read and parse the HW_fanControlData variable in nvram composed by 44 bytes: 
    // example with only one fan, Fan at index 1, and with PWM turned on
      UInt8 nvFanControls[44] = {
        0x02, 0x00, /* 16 bits, bit at index 1 enabled for fan at index 1. Value for 'FS! ' or 'F1Md'*/
        0x00, 0x00, /* UInt16 value, fan at index 0 target speed                                     */
        0x05, 0xdc, /* UInt16 value, fan at index 1 target speed, in this case  0x05dc i.e. 1500 rpm */
        0x00, 0x00, /* UInt16 value, fan at index 2 target speed                                     */
        0x00, 0x00, /* UInt16 value, fan at index 3 target speed                                     */
        0x00, 0x00, /* UInt16 value, fan at index 4 target speed                                     */
        0x00, 0x00, /* UInt16 value, fan at index 5 target speed                                     */
        0x00, 0x00, /* UInt16 value, fan at index 6 target speed                                     */
        0x00, 0x00, /* UInt16 value, fan at index 0 min speed                                        */
        0x03, 0xE8, /* UInt16 value, fan at index 1 min speed     in this case  0x03e8 i.e. 1000 rpm */
        0x00, 0x00, /* UInt16 value, fan at index 2 min speed                                        */
        0x00, 0x00, /* UInt16 value, fan at index 3 min speed                                        */
        0x00, 0x00, /* UInt16 value, fan at index 4 min speed                                        */
        0x00, 0x00, /* UInt16 value, fan at index 5 min speed                                        */
        0x00, 0x00, /* UInt16 value, fan at index 6 min speed                                        */
        0x00, 0x00, /* UInt16 value, fan at index 0 max speed                                        */
        0x07, 0xd0, /* UInt16 value, fan at index 1 max speed     in this case  0x07d0 i.e. 2000 rpm */
        0x00, 0x00, /* UInt16 value, fan at index 2 max speed                                        */
        0x00, 0x00, /* UInt16 value, fan at index 3 max speed                                        */
        0x00, 0x00, /* UInt16 value, fan at index 4 max speed                                        */
        0x00, 0x00, /* UInt16 value, fan at index 5 max speed                                        */
        0x00, 0x00  /* UInt16 value, fan at index 6 max speed                                        */
      }; // max 7 fans supported.

     

Tested only with nuvoton chips as I don't own other mobos.

 

HWSensors-3_r199.dmg.zip

 

@Slice, tell me if is ok for you.

Edited by vector sigma
typos
  • Like 7
Link to comment
Share on other sites

×
×
  • Create New...