Skip to content

Commit

Permalink
Fixed SMCBatteryManager compatibility with 10.15
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Jun 4, 2019
1 parent ffe1128 commit b85854e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ VirtualSMC Changelog
====================
#### v1.0.5
- Allow loading on 10.15 without `-lilubetaall`
- Fixed SMCBatteryManager compatibility with 10.15

#### v1.0.4
- Removed exposed REV, RBr, RPlt keys from I/O Registry
Expand Down
3 changes: 3 additions & 0 deletions Sensors/SMCBatteryManager/SMCSMBusController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ IOService *SMCSMBusController::probe(IOService *provider, SInt32 *score) {
if (!BatteryManager::getShared()->probe())
return nullptr;

// On macOS 10.15 probe score is 0.
*score = 100000000;

return this;
}

Expand Down
2 changes: 1 addition & 1 deletion VirtualSMC.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1010;
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1100;
ORGANIZATIONNAME = vit9696;
TargetAttributes = {
1C748C261C21952C0024EED2 = {
Expand Down

3 comments on commit b85854e

@ben9923
Copy link

@ben9923 ben9923 commented on b85854e Jul 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not setting IOProbeScore within the IOKitPersonalities in the kext's info.plist?

@vit9696
Copy link
Contributor Author

@vit9696 vit9696 commented on b85854e Jul 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the reason for this was to prevent autostart… But to be honest, I am not sure. Does it work for you if you do it? I do not have a laptop nearby.

@ben9923
Copy link

@ben9923 ben9923 commented on b85854e Jul 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I don't have a laptop running Catalina to verify it's still working.
Hopefully someone else will be able to test that.

Please sign in to comment.