Jump to content

1,970 posts in this topic

Recommended Posts

Advertisement

You will be very useful.

Explain me please these issues

attachicon.gifСнимок экрана 2017-10-17 в 22.53.31.png

Is my corrected sources differ from your? attachicon.gifhwmonitor.zip

I have Xcode 9.0.1, in OS 10.12.6.

in IOBatteryStatus.h you should add these function's declaration:

+(NSDictionary *)getIOPMPowerSource;
+(int) getBatteryVoltageFrom:(NSDictionary *)IOPMPowerSource;
+(int) getBatteryAmperageFrom:(NSDictionary *)IOPMPowerSource; 

and in IOBatteryStatus.m the corresponding functions:

+ (NSDictionary *) getIOPMPowerSource
{
    CFMutableDictionaryRef matching , properties = NULL;
    io_registry_entry_t entry = 0;
    matching = IOServiceMatching( "IOPMPowerSource" );
    entry = IOServiceGetMatchingService( kIOMasterPortDefault , matching );
    IORegistryEntryCreateCFProperties( entry , &properties , NULL , 0 );
    
    NSDictionary * dict = CFBridgingRelease(properties);
    IOObjectRelease( entry );
    return dict;
}

// Voltage measured in mV
+ (int) getBatteryVoltageFrom:(NSDictionary *)IOPMPowerSource
{
    if (IOPMPowerSource && [IOPMPowerSource objectForKey:@kIOPMPSVoltageKey]) {
        return [[IOPMPowerSource objectForKey:@kIOPMPSVoltageKey] intValue];
    }
    
    return 0;
}

// Capacity measured in mA
+ (int) getBatteryAmperageFrom:(NSDictionary *)IOPMPowerSource
{
    if (IOPMPowerSource && [IOPMPowerSource objectForKey:@kIOPMPSAmperageKey]) {
        int mA = [[IOPMPowerSource objectForKey:@kIOPMPSAmperageKey] intValue];
        return (mA > 0) ? mA : (0 - mA);
    }
    
    return 0;
}

both before @end.

More, on top of the .h or the .m file (better the .m) you must add:

#import <IOKit/pwr_mgt/IOPM.h>

Only needed to get the keys kIOPMPSAmperageKey and kIOPMPSVoltageKey (or all the others in the IOPMPowerSource dictionary). Their strings can change in time, who knows, but not the macros.

 

 

Your original project does not use default Xcode settings so little differences in the "Build Settings" to avoid common clang's warnings.. so to restore them. it should work anyway.

Latest project I posted was just the one in:

../hwsensors-hwsensors3-code/trunk/hwmonitor 

+ my modification. Basically this code will work with voodoo, rehabman's kext... or just in a real mac, since all kexts publish the same thing in IOPMPowerSource.

See that this time I used kIOPMPSAmperageKey (mA) as suggested by you.

Share this post


Link to post
Share on other sites

Good! Your changes accepted.

See Battery section is empty. 

Снимок экрана 2017-10-18 в 8.17.49.png

can we make it invisible if no batteries found?

 

And do you want to be a developer of the project? I can give you commit access to sf.net just tell me your nickname there.

Share this post


Link to post
Share on other sites

Good! Your changes accepted.

Thanks.

See Battery section is empty. 

can we make it invisible if no batteries found?

 

Two three ways:

  1. by mac model (smbios system-type). For the empty battery ("-") will display again if the driver cannot read values, or ACPI isnt good. Need investigation for possible values other than 2.
  2. take a look for IOPMPowerSource if is nil (NULL) 
  3. make a preferences menù with checkboxes.

which do you prefer?

 

And do you want to be a developer of the project? I can give you commit access to sf.net just tell me your nickname there.

I cannot be omni present due to my life (job, my Son ..etc), but some time I can play with those things, If you have no rush doing so, I'll be happy.  Usually I use github, so I have to create an account (i'll ask my Son for a new nickname...maybe another Transformer's character Lol).

Share this post


Link to post
Share on other sites

1. No. Because we was going to show Bluetooth devices batteries so it should work on desktop.

2. Not sure for the same reason.

3. Better do it automatically: if nothing to show.

 

Create nickname and you may visit sf as often as you wish.

Share this post


Link to post
Share on other sites

1. No. Because we was going to show Bluetooth devices batteries so it should work on desktop.

2. Not sure for the same reason.

 

e.g Device (BAT0) is for Bluetooth devices as well? I guess no!? I mean we know what type.. Ok automatic (= something to show if not null)

Share this post


Link to post
Share on other sites

Slice, if you want I've got Titan Xp Pascal version, I can test and report whatever you need.

AFAIK latest GeforceSensors crashes on Pascal? Did you check?

e.g Device (BAT0) is for Bluetooth devices as well? I guess no!? I mean we know what type.. Ok automatic (= something to show if not null)

See IOBatteryStatus.m

+(BOOL) keyboardAvailable
{
    io_service_t service = IOServiceGetMatchingService(0, IOServiceNameMatching("AppleBluetoothHIDKeyboard"));

It was created by Navi and I don't know how it was proposed to work.

Share this post


Link to post
Share on other sites

this way:

+(NSString *) getKeyboardName
{
  io_service_t service = IOServiceGetMatchingService(0, IOServiceNameMatching("AppleBluetoothHIDKeyboard"));
  NSString * value = nil;
  
  if (!service ) {
		return nil;
  }
//  CFStringRef idc = IORegistryEntryCreateCFProperty(service, CFSTR("Product"), kCFAllocatorDefault, 0);
     value = (__bridge_transfer  NSString *)IORegistryEntryCreateCFProperty(service, CFSTR("Product"), kCFAllocatorDefault, 0);
//  value = [NSString stringWithFormat:@"%@", (NSString*)idc];
 // if(idc) CFRelease(idc);
  
  IOObjectRelease(service);
  return value;
  
}

search for "Product" to give it a name, then is added as BatterySensorsGroup to an array. Later in getKeyboardBatteryLevel() it search for BatteryPercent under AppleBluetoothHIDKeyboard. So should show only a percentage.

I don't know if this is correct in 2017 since it should be under "IOAppleBluetoothHIDDriver", I think.

ioreg -c AppleBluetoothHIDKeyboard | grep Battery
    | |   |     | | |   |   "BatteryPanic" = Yes
    | |   |     | | |   |   "BatteryLow" = Yes
    | |   |     | | |   |   "BatteryLowNotificationType" = "LowBattery"
    | |   |     | | |   |   "BatteryDangerouslyLowNotificationType" = "CriticallyLowBattery"
    | |   |     | | |   |   "BatteryPercent" = 12
    | |   |     | | |   |   "Battery" = <"WVXQ0x9f9UT

:D

Share this post


Link to post
Share on other sites

Did not tryed yet to run the program on my iMac, just used the ioreg command. Tomorrow or saturday I have more time and I'll create my sf account. also I need more space on the hack and I have to find a way to expand macOs partition and save Ubuntu. See you.

Share this post


Link to post
Share on other sites

Did not tryed yet to run the program on my iMac, just used the ioreg command. Tomorrow or saturday I have more time and I'll create my sf account. also I need more space on the hack and I have to find a way to expand macOs partition and save Ubuntu. See you.

Welcome to Developer's group!

Share this post


Link to post
Share on other sites

Welcome to Developer's group!

 

I'm hoping that one day someone with skylake X will join the group....

This monitor rocks and I miss it :)

Share this post


Link to post
Share on other sites

Welcome to Developer's group!

Thanks Slice! 

This is my new sf account

As expected! I'll start tomorrow. Also its appearance with dark mode is bad, but I'll make auto detect...

I'm hoping that one day someone with skylake X will join the group....

This monitor rocks and I miss it :)

What's the problem?

Share this post


Link to post
Share on other sites

Thanks Slice! 

This is my new sf account

As expected! I'll start tomorrow. Also its appearance with dark mode is bad, but I'll make auto detect...

What's the problem?

 

Just no readings basically. Unsupported CPU. I got to the point where it will load, but I only get the hard drive temps.

Share this post


Link to post
Share on other sites

Can you send me a .ioreg file and a boot-log in PM? This will require more time.. with no promis

Yes I can :)

And of course no promise. I appreciate it.

Share this post


Link to post
Share on other sites

...but I only get the hard drive temps.

These temps are missing for my PCIe NVMe SSDs on my ASRock Z270 Super Carrier.

What do i have to do to let them show within HardwareMonitor app?

Share this post


Link to post
Share on other sites

These temps are missing for my PCIe NVMe SSDs on my ASRock Z270 Super Carrier.

What do i have to do to let them show within HardwareMonitor app?

Ah, yes.

My 960 evo doesn't show either. Only have the SSDs

Share this post


Link to post
Share on other sites

Thanks Slice! 

This is my new sf account

 

Done.

Next step you should login and then checkout the project again but with RW access.

https://sourceforge.net/p/hwsensors/hwsensors3/code3/HEAD/tree/

 

 

I'm hoping that one day someone with skylake X will join the group....

This monitor rocks and I miss it :)

 

What is the CPU? Can you give me preboot.log from clover? AIDA64 CPU report?

Share this post


Link to post
Share on other sites

 

What is the CPU? Can you give me preboot.log from clover? AIDA64 CPU report?

 

Yes great!

This is a dropbox link with ioreg as well (too big to attach)

https://www.dropbox.com/sh/sikuvfac8qfx795/AABzOhW-ImGdaIhNY2biPM3aa?dl=0

 

attachicon.gifLog&Report.zip

 

Thanks!

New version

IntelCPUMonitor.kext-122.zip

Share this post


Link to post
Share on other sites

this seems do not detect my Xeon 2696 V4 CPU (22 cores / 44 Threads) Broadwell EP type

Also SSD is not detected (850 pro)

It is detected. The others there are not ssd disk but mechanical ones

 

Added CPU aida 64 report

post-468967-0-54653200-1508563315_thumb.png

CPU.zip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By fusion71au
      This is a brief guide on how to create a vanilla El Capitan (also same process for Sierra) OS X Installer USB with an updated prelinked kernel containing FakeSMC.

      It is tailored for those users who want to understand the “nuts and bolts” of how to create an installer and also to help brush up on their terminal skills (rather than have one made for them with the numerous automated “tools” available or even Apple’s createinstallmedia) :
       
       
      Specifically, it is also a “Proof of Concept” which shows that installation is possible without even having to rely on boot loader kext injection.

      Prerequisites
      Existing Yosemite installation (or Mavericks - see post#4 for steps 7,8) “Install OS X El Capitan.app" downloaded to the Applications folder Pacifist FakeSMC.kext - Slice or Kozlek branch Bootloader - Clover or Chameleon 8GB or larger USB drive (16GB recommended), formatted HFS+ (MBR or GUID) named “Installer”  
      Procedure
      1.  Boot into Yosemite with the kext-dev-mode=1 boot flag
      2.  Open OS X terminal and type the following lines, followed by <Enter> after each line.
          The image restore and file copying may take a while to complete, and at the end of the process, the Installer volume is renamed to “OS X Base System"....
       
      sudo -s hdiutil attach /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg asr restore -source /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg  -target /Volumes/Installer -erase -format HFS+ -noprompt -noverify rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages cp -av /Volumes/OS\ X\ Install\ ESD/Packages /Volumes/OS\ X\ Base\ System/System/Installation cp -av /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg /Volumes/OS\ X\ Install\ ESD/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System diskutil unmount /Volumes/OS\ X\ Install\ ESD exit 3.  Right click on the “OS X Base System” Volume and click “Get Info”
       

      4.  Click on the lock icon and untick “Ignore ownership on this volume”
       

      5.  Extract/Copy the El Capitan Kernels folder into /System/Library/ of the USB with Pacifist.  NB It is found in the "Essentials.pkg" in /System/Installation/Packages
       

      6.  Delete or Rename the original /System/Library/PrelinkedKernels/prelinkedkernel —> OG.prelinkedkernel
       

      7.  Copy FakeSMC.kext and other necessary kexts (e.g. VoodooPS2Controller.kext for laptops) into the /Library/Extensions folder of the installer USB using Finder.
       

      8.  Back in terminal, type the following lines, followed by <Enter> after each line to rebuild the prelinkedkernel…..
       
      sudo -s chmod -R 755 /Volumes/OS\ X\ Base\ System/Library/Extensions chown -R 0:0 /Volumes/OS\ X\ Base\ System/Library/Extensions touch /Volumes/OS\ X\ Base\ System/System/Library/Extensions kextcache -u /Volumes/OS\ X\ Base\ System exit Any errors should be noted but the output below is normal e.g.


      9. Install your Bootloader targeting the OS X Base System volume
       
       
       
       
      10.  Boot your system with the USB without injected kexts into the OS X Installer GUI....
       
       
       
       
       
      Post Install
      The original prelinked kernel in a fresh install of El Capitan will also lack FakeSMC ie it will only be linked to Apple signed kexts.  In order to boot into El Capitan the first time around without boot loader kext injection, the PLK needs to be rebuilt for the El Capitan volume like we did for the installer:
       
      1.  Boot into Yosemite with the kext-dev-mode=1 boot flag
      2.  Delete or Rename the original /System/Library/PrelinkedKernels/prelinkedkernel for the El Capitan volume —> OG.prelinkedkernel
      3.  Copy FakeSMC.kext and other necessary kexts (e.g. VoodooPS2Controller.kext for laptops) into the /Library/Extensions folder of El Capitan using Finder
      4.  Back in terminal, type the following lines, followed by <Enter> after each line to rebuild the prelinkedkernel.  In this example, the El Capitan volume is named "El_Capitan" - change if you have named it something else...
      sudo -s chmod -R 755 /Volumes/El_Capitan/Library/Extensions chown -R 0:0 /Volumes/El_Capitan/Library/Extensions touch /Volumes/El_Capitan/System/Library/Extensions kextcache -u /Volumes/El_Capitan exit 5. Install your Bootloader targeting the El Capitan volume.  This step is only necessary if you are installing El Capitan on a new drive without existing boot loader (not required if installing on a disk with existing boot loader beside Yosemite).
      6. Reboot your system without injected kexts into El Capitan!
       
       
      Other links
      The All-In-One Guide to Vanilla OS X for beginners
       
      Updates for Sierra and High Sierra   Custom Prelinkedkernel Generator Tool I have made a custom prelinkedkernel generator "PLK.tool" for Sierra + El Capitan.  Instructions:   1.  Download and extract the attached BaseSystem_PLK.tool.zip into your ~/Downloads folder.   2.  Copy any extra kexts necessary for booting your hack to ~/Downloads/BaseSystem/ExtraKexts (e.g. FakeSMC, VoodooPS2Controller), making sure SIP is disabled. 3.  Copy BaseSystem.dmg to ~/Downloads/BaseSystem  4.  Open terminal and run the following commands... cd ~/Downloads/BaseSystem chmod +x PLK.tool ./PLK.tool ---> supply your admin password ---> will place your new custom prelinkedkernel on the desktop.       macOS High Sierra bypass Firmware and MBR checks in post#13.
      BaseSystem_PLK.tool_ElCap.zip
      BaseSystem_PLK.tool_Sierra.zip
      BaseSystem_PLK.tool_Mojave.zip (need to run in Mojave to avoid dependency errors)
      BaseSystem_PLK.tool_Catalina.zip
    • By Slice
      Dell laptops and desktop can be monitored by SMM methods as mentioned is the old topic
       
      I made a plugin SMIMonitor for FakeSMC in 2014 but it was 32bits and was not working. Only now I made it to be 64bits (as darkvoid did with kozleks branch) and got positive results
        
      and after heating 
      So I have monitoring of 4 additional temperature sensors (CPU Proximity, GPU, DIMM, and Motherboard) and a CPU fan which initially stay at 0 rpm and start rotating after heating with 2882rpm.
       
      Moreover I implemented a function for brave people to control fans
      sudo SMC_util3 -kF0As -w2 The last digit 2 is a FAN speed you want to set
      0 = Off
      1 = Low
      2 = High
      If you have more then 1 fan then you can manage other one by choosing next key F1As, F2As etc.
       
      Precaution! Writing the fan speed is dangerous and may cause a computer damage. Do this at your own risk!
      Note. SMIMonitor.kext will work only with FakeSMC v3 provided with HWSensors3 in my signature.
      Official release at sf.net contains SMIMonitor without write possibility.
       
      Please test and report your successes and fails.
       
       
      SMIMonitor.kext-110.zip
      SMC_util3.zip
      smcwrite.zip
    • By DaHarry
      I have installed Hackintosh on to my System, but the CPU cooler is obviously louder then on Windows.
      I am using right now VirtualSMC.kext, but since FakeSMC provides temperature measurement tools, and VirtualSMC not, I asked my self if that might be a hint for my loud cooler?
      My question, has somebody tried maybe both and even compared them? And is FakeSMC maybe less noisy?
      Is it enough to just mount EFI partition, and delete the VirtualSMC.kext and put instead FakeSMC.kexts ? Without any fancy kext installation tool or terminal commands, just replace files and restart in enough?
      My System:
      Mainboard: Gigabyte Aorus Z390 Ultra
      CPU: Intel i9 9900k
      CPU Cooler: BeQuiet! Dark Rock 4
      GPU: Vega 64
      Ram: 2x16GB Corsair 3200
      SSD: 1TB Adata M.2
       
      The Tutorial i have used - https://github.com/cmer/gigabyte-z390-aorus-master-hackintosh/blob/master/STEP_BY_STEP.md
       
      Really works like a charm besides, the more noisy cooler, which i bought because it is extra quietly.
      I asked first at tonymac's forum, but they deleted the post because I haven't used their tool, really disgustig.. I really hope to never use their tools, and I hope here the information freedom is more respected.
      #f. tonyhoremacs
    • By vector sigma
      HWSensor Features
      Control temperature of Intel and AMD CPU Control temperature of AMD, Intel and NVidia cards Control temperature of motherboard Control FANS Control Voltages Control HDD/SSD state (SATA & NVMe) with S.M.A.R.T. monitoring  Control frequencies Laptop Battery Monitoring Different applications support High Sierra compatible Installation to /S/L/E or in the ESP (Clover only)  
      Supported languages:
      English (base), Russian, Italian, Korean and semplified Chinese
       
      Source code: at https://sourceforge.net/p/hwsensors/hwsensors3/code3/HEAD/tree/
      Bugs report at https://sourceforge.net/p/hwsensors/hwsensors3/tickets/
      Topic for discussion at: https://www.insanelymac.com/forum/topic/299861-hwsensors3/
       
      Chief Developer @Slice, new HWMonitorSMC2.app and package by @vector sigma
×