MacBook Pro runs very slow when on battery

A colleague gave me a 2010 MacBook Pro and I notice that it runs very slow when running on battery. Boot-up takes a very long time and everything is lagging. It is practically unusable. When the power supply is plugged in however, it works normally. I tried the usual prescribed troubleshooting from Apple to reset the SMC but that still didn’t fix the issue.

Finally I came across this discussion on Apple Support Communities. The root cause seems to be faulty temperature sensor damaged by liquid spill. Because the sensor is faulty, macOS assumes the system is overheating and drops the CPU cycle which in turns makes everything runs much slower.

To check if your Mac has the same issue, quit all programs and with the power supply connected, open Activity Monitor and click on the CPU tab. Check the usage percentage at the bottom. It should be minimal at around 1%. Now disconnect the power supply and see if the figure spikes up to around 80%.

Short of getting your logic board repaired, the workaround is to disable this feature by removing a system file. Keep in mind though that doing this effectively disable CPU throttling and will reduce battery life.

First, identify the model of your Mac by clicking on the Apple on the top menu bar and select About this Mac. From the About this Mac pane click on System Report…. Select Hardware in the left panel and make a note of the Model Identifier. For mine it was MacBookPro7,1.

If you’re running El Capitan or higher, we first need to turn off System Integrity Protection (SIP). Follow these steps to turn SIP off.

  • Restart your Mac.
  • While it is booting hold down Command-R to boot into the Recovery System.
  • Click on Utilities from the menu bar and select Terminal.
  • Type csrutil disable and press return.
  • Close the Terminal app.
  • Restart your Mac.

Now with SIP turned off, open a Finder window and click on Macintosh HD.

  • Click on System > Library > Extensions.
  • Locate the file called IOPlatformPluginFamily.kext, right-click on it and select Show Package Contents.
  • Click on Contents > PlugIns.
  • Locate the file called ACPI_SMC_PlatformPlugin.kext, right-click on it and select Show Package Contents.
  • Click on Contents > Resources.
  • Find the the plist file that corresponds to your Model Identifier. In my case it is MacBookPro7_1.plist.
  • Move it to Trash.
  • Restart.

Your Mac should run normally when on battery now. Lastly, you might want to turn SIP back on by following the same steps as above but typing csrutil enable this time.

Setup port channel between a pair of Cisco ASA and a switch stack

For better redundancy, we may want to use port channel to connect a high availability active/passive pair of Cisco ASA to a switch stack. An important aspect to know is to create separate port channels on the switch stack, one for each ASA. On each ASA, it is still a single port channel because the configuration is replicated between the units. If you group all interfaces on the switch stack into a single port channel connecting to both ASA, the port channel will not be established because of the separate ASA system IDs. A single port channel is also not desirable because you do not want traffic to be sent to the standby ASA.

The following diagram from this Cisco document explains it all.

Following this diagram, we configure two port-channels on the switch stack.

!
interface Port-channel2
switchport mode trunk
!
interface Port-channel3
switchport mode trunk
!

We then apply the port channel configuration to the four switch interfaces which are connected to the ASA pair.

!
interface GigabitEthernet3/2
description to ASA-Primary
switchport mode trunk
channel-group 2 mode active
!
interface GigabitEthernet6/2
description to ASA-Primary
switchport mode trunk
channel-group 2 mode active
!
interface GigabitEthernet3/3
description to ASA-Secondary
switchport mode trunk
channel-group 3 mode active
!
interface GigabitEthernet6/3
description to ASA-Secondary
switchport mode trunk
channel-group 1 mode active
!

Let’s now configure port-channel on the ASA pair.

!
interface Port-channel1
no nameif
no security-level
no ip address
!

We then apply the port-channel to the two interfaces on each ASA.

!
interface GigabitEthernet0/0
channel-group 1 mode active
no nameif
no security-level
no ip address
!
interface GigabitEthernet0/1
channel-group 1 mode active
no nameif
no security-level
no ip address
!

The next step is important; for each VLAN we create a subinterface on the port channel. In each, we define the VLAN ID, IP address and security-level. In the example below we create:

!
interface Port-channel1.10
vlan 10
nameif INSIDE
security-level 100
ip address 10.1.1.2 255.255.255.0
!
interface Port-channel1.1000
vlan 1000
nameif OUTSIDE
security-level 0
ip address dhcp setroute
!

It is important to have the same VLAN ID of both side. When adding a new VLAN apply the configuration on the switch stack first.

Cisco ASA – A group cannot contain services of different types

In Cisco ASA 6.4.9 – and older possibly – it is possible to mix different types of service in a group. So you can have TCP and UDP or TCP-UDP and TCP in the same group.

Later versions of ASA do not allow this. In ASDM, you will get error message like below if you attempt to do this.

Additionally, if you had created a group with mixed types of service, later version of ASDM will not show this service group.