Confirmed Fix/Partial Solve for Retina MBP UI Lag/Smoothness

Discussion in 'MacBook Pro' started by Wingzero, Aug 8, 2012.

  1. Wingzero macrumors member

    Joined:
    Jun 28, 2011
    #1
    Whilst this is not a complete fix for the issue neither a 100% viable one, it does indeed work and has a few tradeoffs which some people may consider acceptable.


    First: let me declare neither me nor throttlemesiter take any responsibility for any damage caused to your machine as a result of this.

    Second: credit to throttlemeister for supplying me with a kext and uncovering this fix, he deserves all of the credit I am merely a tester and writer off this guide.

    What to expect:

    - Smoother transition between spaces and in and out of mission control
    - Smoother UI whilst using scaled resolutions such as 1920x1200 etc.
    - Smoother animations in windows, resizing etc
    - Smoother web page scrolling//browsing
    - Higher temperatures
    - Less Battery life.


    The fix:

    It is a simple task of locating a kext and disabling it, then forcing the discrete GPU.

    The kext is located in;

    /System/Library/Extensions/AppleGraphicsPowerManagement.kext


    -To disable it, right click the kext and rename the .kext extension to .disable
    (to reverse this later just rename back to .kext)

    -It will ask for the password, just enter and continue.

    -The kext will now be a directory folder.

    -Next is to erase the kext cache to be rebuilt this is easy;

    -Navigate to /System/Library/Caches and drag the com.apple.kext.caches folder to the trash and empty it from trash (don't worry it's rebuilt on reboot)

    Restart your retina MBP.



    Now go to Energy Saver settings in System Preferences and uncheck "automatic graphics switching"

    Or alternatively use gfxcardstatus to force the discrete GPU.



    Finally if all followed correctly you should notice a significantly smoother UI.





    As stated above, the downsides to this are that the GPU will constantly be in full power mode at it's proper full clock speed, this generates more heat and in turn will consume more power.

    Use at your own risk, but if the added heat and battery life decrease doesn't matter to you by all means do this.
     
  2. throttlemeister macrumors 6502a

    Joined:
    Mar 31, 2009
    Location:
    Netherlands
    #2
    I wouldn't claim credit, as I merely found this fix on one of the hackintosh forums where they were trying to improve performance of not supported graphics cards. I just applied it to a real Apple.

    As a proof of concept, this is interesting, but in my opinion to make it useable on a daily basis, we need to figure out how to change the powerstate settings or transition times from one powerstate to the next.
     
  3. sofianito macrumors 65816

    sofianito

    Joined:
    Jan 14, 2011
    Location:
    Spain
    #3
    What's the added value compared to gfxcardstatus?
     
  4. dsciel macrumors regular

    Joined:
    Jul 13, 2011
    #4
    how long the battery will last if rMBP forcing to use discrete video card at all time?
     
  5. golf1410 macrumors 6502a

    golf1410

    Joined:
    May 7, 2012
    Location:
    San Francisco, CA
    #5
    If you plug in adapter, is it forced to use a graphic card?
     
  6. throttlemeister macrumors 6502a

    Joined:
    Mar 31, 2009
    Location:
    Netherlands
    #6
    Runnend gfscardstatus allows you to force discrete gfx, doing this thing above forces discrete gfx to max power (ie max frequency and max voltage) like it will be when playing games. It turns off power scaling.
     
  7. sofianito macrumors 65816

    sofianito

    Joined:
    Jan 14, 2011
    Location:
    Spain
    #7
    Thanks for the clarification.

    I think it is not worth to run the GT 650M at max power just to avoid lags because it will drain your battery...
     
  8. throttlemeister macrumors 6502a

    Joined:
    Mar 31, 2009
    Location:
    Netherlands
    #8
    Looking through the plist, there is no entry for a MacbookPro10,1 but there is a list of entries with undefined hex codes attached to it. It must be one of these, but which one? :)

    Finding out would be crucial to do some manual tuning and have the card run faster without going full power.

    ----------

    Could someone running bootcamp look up the vender/device ID's for both gfx cards?
     
  9. throttlemeister, Aug 9, 2012
    Last edited: Aug 9, 2012

    throttlemeister macrumors 6502a

    Joined:
    Mar 31, 2009
    Location:
    Netherlands
    #9
    This is the section of the plist controlling the rMBP, it is labeled "Mac-00BE6ED71E35EB86". The sections related to the discrete gfx are (obviously) GFX0 and Vendor10deDevice0fd5.

    Now to figure out which parts to change... and to what. :)

    XML:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>Mac-00BE6ED71E35EB86</key>
    	<dict>
    		<key>GFX0</key>
    		<dict>
    			<key>Heuristic</key>
    			<dict>
    				<key>ID</key>
    				<integer>4</integer>
    			</dict>
    			<key>control-id</key>
    			<integer>17</integer>
    		</dict>
    		<key>IGPU</key>
    		<dict>
    			<key>Heuristic</key>
    			<dict>
    				<key>EnableOverride</key>
    				<integer>0</integer>
    				<key>ID</key>
    				<integer>2</integer>
    			</dict>
    			<key>control-id</key>
    			<integer>16</integer>
    			<key>max-power-state</key>
    			<integer>8</integer>
    			<key>min-power-state</key>
    			<integer>0</integer>
    		</dict>
    		<key>Vendor10deDevice0fd5</key>
    		<dict>
    			<key>Heuristic</key>
    			<dict>
    				<key>ID</key>
    				<integer>4</integer>
    				<key>MinP0P1</key>
    				<integer>9</integer>
    				<key>MinP5</key>
    				<integer>14</integer>
    				<key>MinP8</key>
    				<integer>15</integer>
    				<key>MinVP0</key>
    				<integer>9</integer>
    				<key>MinVP1</key>
    				<integer>19</integer>
    				<key>MinVP5</key>
    				<integer>26</integer>
    				<key>MinVP8</key>
    				<integer>28</integer>
    				<key>NumOfPstates</key>
    				<integer>16</integer>
    				<key>P0Table</key>
    				<array>
    					<integer>0</integer>
    					<integer>1</integer>
    					<integer>2</integer>
    					<integer>3</integer>
    					<integer>4</integer>
    					<integer>5</integer>
    					<integer>6</integer>
    					<integer>7</integer>
    					<integer>8</integer>
    					<integer>9</integer>
    					<integer>20</integer>
    					<integer>22</integer>
    					<integer>23</integer>
    					<integer>24</integer>
    					<integer>26</integer>
    					<integer>28</integer>
    				</array>
    				<key>P1Table</key>
    				<array>
    					<integer>10</integer>
    					<integer>11</integer>
    					<integer>12</integer>
    					<integer>13</integer>
    					<integer>14</integer>
    					<integer>15</integer>
    					<integer>16</integer>
    					<integer>17</integer>
    					<integer>18</integer>
    					<integer>19</integer>
    					<integer>20</integer>
    					<integer>22</integer>
    					<integer>23</integer>
    					<integer>24</integer>
    					<integer>26</integer>
    					<integer>28</integer>
    				</array>
    			</dict>
    			<key>control-id</key>
    			<integer>17</integer>
    		</dict>
    		<key>Vendor10deDevice0fd8</key>
    		<dict>
    			<key>Heuristic</key>
    			<dict>
    				<key>ID</key>
    				<integer>4</integer>
    				<key>MinP0P1</key>
    				<integer>3</integer>
    				<key>MinP5</key>
    				<integer>7</integer>
    				<key>MinP8</key>
    				<integer>12</integer>
    				<key>MinVP0</key>
    				<integer>3</integer>
    				<key>MinVP1</key>
    				<integer>7</integer>
    				<key>MinVP5</key>
    				<integer>14</integer>
    				<key>MinVP8</key>
    				<integer>16</integer>
    				<key>NumOfPstates</key>
    				<integer>13</integer>
    				<key>P0Table</key>
    				<array>
    					<integer>0</integer>
    					<integer>1</integer>
    					<integer>2</integer>
    					<integer>3</integer>
    					<integer>8</integer>
    					<integer>9</integer>
    					<integer>10</integer>
    					<integer>11</integer>
    					<integer>12</integer>
    					<integer>13</integer>
    					<integer>14</integer>
    					<integer>15</integer>
    					<integer>16</integer>
    				</array>
    				<key>P1Table</key>
    				<array>
    					<integer>4</integer>
    					<integer>5</integer>
    					<integer>6</integer>
    					<integer>7</integer>
    					<integer>8</integer>
    					<integer>9</integer>
    					<integer>10</integer>
    					<integer>11</integer>
    					<integer>12</integer>
    					<integer>13</integer>
    					<integer>14</integer>
    					<integer>15</integer>
    					<integer>16</integer>
    				</array>
    			</dict>
    			<key>control-id</key>
    			<integer>17</integer>
    		</dict>
    	</dict>
    </dict>
    </plist>
    EDIT:
    There appear to be 3 card entries in here, GFX0, IGPU as main sections, and nvidia device 0fd5 (as in my retina) and 0fd8, which seems to be an unknown graphics card for me at this time.
     
  10. mg428 macrumors member

    Joined:
    Sep 16, 2007
    #10

    I recently purchased my first Mac, a 13 inch rMBP and I am experiencing UI lag problem. I am quite a newbie when it comes to Macs. Can someone guide me on how and where I can find this kext file and change it as explained in the post.

    By the way, I assume this solution must be applicable to integrated GPUs as well, right? After all, through the Apple logo/About This Mac tab/System Report/Extensions, I see that this file is available in the computer under /System/Library/Extensions, but I could not find even the System folder.
     

Share This Page