Giter VIP home page Giter VIP logo

codykrieger / gfxcardstatus Goto Github PK

View Code? Open in Web Editor NEW
1.7K 70.0 323.0 3.28 MB

gfxCardStatus is an open-source menu bar application that keeps track of which graphics card your unibody, dual-GPU MacBook Pro is using at any given time, and allows you to switch between them on demand.

Home Page: https://gfx.io

License: Other

Objective-C 93.97% C 0.25% Ruby 0.17% Shell 4.35% Rich Text Format 1.18% CSS 0.08%

gfxcardstatus's Introduction

gfxCardStatus

by Cody Krieger

gfxCardStatus is an open-source menu bar application for OS X that allows users of dual GPU MacBook Pros to monitor the status of, and switch between said GPUs.

gfxCardStatus v2.5 downloads

Building from source

Building is easy. Open up gfxCardStatus.xcworkspace (not gfxCardStatus.xcodeproj), hit โŒ˜B, and away you go.

License

Licensed under the New BSD License.

Copyright (c) 2010-2020, Cody Krieger All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of gfxCardStatus nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CODY KRIEGER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

gfxcardstatus's People

Contributors

ahmet avatar antoneri avatar artyom-smirnov avatar bartkummel avatar capnslipp avatar codykrieger avatar coverxit avatar cras4202tw avatar fbrunel avatar gmavrikas avatar grishka avatar immist avatar kant avatar lowstar avatar morse-code avatar ndfred avatar niklaskorz avatar piccirello avatar reuben avatar roadtodream avatar robmch avatar ryotarai avatar sergiomiranda avatar slaxor avatar snomos avatar tarasyyyk avatar vb0iko avatar vonproteus avatar xu-cheng avatar zwaldowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gfxcardstatus's Issues

Star Wars - The Force Unleashed Crashes

I've run into some minor trouble with Star Wars - The Force Unleashed 1.2, Mac OS X 10.7, and gfxCardStatus 2.1, all running on a MacBook Pro 15" Mid-2009 2.8GHz Core 2 Duo with NVIDIA 9400M/9600M GT, and 4GB of RAM. Namely, it crashes if I've logged in running on the 9400M and switch to the 9600M GT. If I switch, log out, and log back in it launches and runs just fine.

I didn't play the game much in 10.6.x, but I do know that it would launch and run just fine if I used earlier versions of gfxCardStatus to switch from the 9400M to the 9600M GT. I haven't seen any other issues with Lion and gfxCardStatus switching GPUs without a logout/login.

Crash log: http://www.mediafire.com/?5dwj1j1v6z3orxr

App spontaneously switching to Discrete Only mode

I keep having the issue where gfxcardstatus keeps switching to the "Discreet Only" mode, even though I have the battery mode set to "integrated" and the plugged in mode set to "Dynamic". I notice this frequently when I use VMWare Fusion, or more specifically, when I exit out of VMWare and notice that my graphics card did not switch back to integrated mode. Without fail, the gfxcardstatus app will have my mode set as "discreet only".

Unable to click options in preferences

Downloaded and ran the application. Under preferences, I'm able to click all options under "general" but only the first option is clickable under the "switching" options. I've rebooted, and checked to make sure I've the proper graphics cards. My friend who also downloaded gfxCardStatus is having no issues, so I'm not sure what's going on.

I took a screenshot of the preferences panel here: http://cl.ly/a6cbd774ce9948d56942

Latest build f8d911e "2.0" GPU Switching on 9400/9600 Unibody 2009 MBPro is not smooth as it was on 1.8.1 with external monitor

I've checked out latest build and noticed that when the GPU switching ( power-based ) occurs it is not smooth as it was on stable 1.8.1 running on my 2009 MBPro w\ 9400/9600 when running with a external monitor plugged in

Both screens goes blue ( like when you plug the mini display port adapter ) and black for a few seconds than everything gets normal. With 1.8.1 the switching was totally smooth ( no screen flicks, no blue screens ) even with ext. monitor.

The switching between the GPU's without an external monitor plugged in is totally smooth. No blue / black screen.

Only thing I've actually noticed is that when no external monitor is connected and I remove the power connector, the screen dims ( probably power saver behaviour ) and CPU spikes. Actually CPU spikes on all switching cases, causing a small ( about 200 ms cpu cycle delay - measured on Instruments )

Logo revisions

Create a logo that doesn't get eaten up by the transparent charcoal background of stacks/lists in the dock when displayed.

Growl notifications all display in position 1

gfxCardStatus 2.0.1 on 10.6.6 with Growl 1.2.1.

The Growl notifications all display in the same position. This occurs even if there is another Growl notification already in that position either from gfxCardStatus or another application. The result is that the notifications are overlayed instead of the later notification being in a different position on the display. Never seen this with any other application's Growl notifications or indeed any that I have created with AppleScript of with grownotify. To test on my MacBook Pro just I just remove the AC cord or plug it back in and observe the 2 notifications each action triggers overlay each other.

Feature request: add preference based on battery life remaining

It would be great if there were three settings for power-source based switching, instead of the two currently: mains, battery (above threshold), and battery (below threshold), where the user can specify a threshold (e.g., 50%). The idea being, when above (say) 50%, dynamic switching or nvidia-only can be used, but when battery is running low, fall back to low-power graphics only.

Lion + Battery

Hey guys,

i am using a Macbook Pro
mid 2010,
2.4ghz i5,
8gb ram
mac os x lion
gfxcardstatus 2.1 (newest version i checked)

I told gfxcardstatus to change to the integrated graphics immediatly when i switch to battery-mode.
everytime i do so, the mac doesnt seem to be able to show or follow my instructions.
i only run mail.app and firefox. and just simple browsing. but i wasnt even able to access google.
the mac freezes and goes max. fan-noise.

i know this issue is probably not 100% caused by gfxcardstatus. though when i change the settings to switch automatically. no freezes occure.

thanks.

App crashes when swtiching

Or so it seems. When I switch from the menubar, the icon disappears, and clicking the app icon will not make it re-appear, although it shows it still running in Activity Monitor.

This is on Early-2010 MacBook Pro 17" Intel HD/GT 330M

VRAM Usage Stat

Consider adding this statistic somewhere in the app...maybe not in the menu though, don't want it to get too cluttered.

Issues with Chrome?

Hi! Even with power source-based switching enabled to only use Intel graphics (using MacBook Pro 15" 2010), Chrome still activates the Nvidia card.

Is this a bug with gfxCardStatus or something with Chrome?

uninstall

How do you uninstall? Why is there no support for uninstall?

Forgets power source settings

Maybe it's when I boot to windows, maybe it's completely arbitrary, but the app keeps forgetting the power source settings.

It jumps back to default (off) and often gets stuck in nvidia mode.

Dependency list incorrect in multi-user situations

There's currently an issue when multiple users are signed on and fast user switching is used to flip to another account, but processes that force the 330M on are left running. The GPU is detected as being on correctly, but the apps don't show up in the dependency list.

Changing power status (i.e. plugging/unplugging power cable) when on power settings causes user set wallpaper to go away

First off I just wanted to say that this app is a must for anyone with an i5/i7 MBP. I've recently downloaded v2.0 and I've noticed a strange behavior. I have graphics switching configured so that intel is used when on battery and dynamic on power, however whenever a switch occurs because of a change in power state my wallpaper disappears and I get the standard blue background that appears when no wallpaper is chosen. Obviously is just wallpaper so not the end of the world but still strange, more than happy to supply more information.

Switching video cards in Lion can cause some games to crash

I've been using gfxCardStatus for a while now to switch video cards on 2009 MBP (NVidia 9400M/9600GT). In SL, everything was working quite well. But when I upgraded to Lion, it seems that switching video cards make graphic intensive apps (especially games) unstable.

Here's how I reproduce it:

  1. Switch from 9400M to 9600GT.
  2. Run Steam.
  3. Run Team Fortress 2 (or any Source-based game).
  4. TF2 will crash.

Please take note that I am already using the latest gfxCardStatus (2.1)

Sometimes the game crashes immediately after the first time I switch via gfxCardStatus. Sometimes, it takes about 3-5 times before the games start crashing. And sometimes, Steam won't run at all.

At the moment, the only way I can resolve the crashing is to logout and relogin again (which I don't do in SL).

set intel only bug?

when setting to intel only immediately after waking up (I did this in my fork by, but calling your original setMode: ), the log shows success (getMuxState == 0), but sometimes the card remain unchanged (icon remain "n" and dependency list etc. remain "n")

Preferences don't stick

I uncheck this preference (as I don't want Growl notifications every time it changes,) and then I click "All done."

Later I reboot, and when the system is back up, I see Growl notifications, and I also see that this setting is checked again.

After changing gfx card both Portal 2 and Team Fortress 2 crash.

Running a MacBook Pro late 2009 (with 9400M and 9600M GT) and even with steam closed while changing the graphics card, Portal 2 and Team Fortress refuse to start. After changing back to the original graphics card, they both start without a problem.

Backtrace:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_c.dylib 0x9679e0bc strstr + 71
1 launcher.dylib 0x00399ef2 GLMRendererInfo::GLMRendererInfo(GLMRendererInfoFields_) + 1458
2 launcher.dylib 0x0039d155 GLMDisplayDB::PopulateRenderers() + 2389
3 launcher.dylib 0x003988e7 GLMDisplayDB::Populate() + 23
4 launcher.dylib 0x0039b70f CCocoaMgr::GetDisplayDB() + 159
5 shaderapidx9.dylib 0x0a386347 IDirect3D9::GetAdapterDisplayMode(unsigned int, D3DDISPLAYMODE) + 55
6 shaderapidx9.dylib 0x0a3d70c6 CShaderDeviceMgrDx8::GetCurrentModeInfo(ShaderDisplayMode_t_, int) const + 38
7 engine.dylib 0x049cf5ea Shader_Connect(bool) + 122
8 engine.dylib 0x04b46e03 CEngineAPI::Connect(void_ ()(char const, int_)) + 147
9 launcher.dylib 0x00394ce3 CAppSystemGroup::OnStartup() + 163
10 launcher.dylib 0x003950a5 CAppSystemGroup::Run() + 37
11 launcher.dylib 0x003950d8 CAppSystemGroup::Run() + 88
12 launcher.dylib 0x0039db62 MainFunctionThread(void_) + 82
13 launcher.dylib 0x0039decc ValveCocoaMain + 140
14 launcher.dylib 0x00389bb1 LauncherMain + 977
15 portal2_osx 0x00001d26 start + 54

Feature Request: Customize Dependencies

I would love to be able to customize which apps use nVidia and which use Intel because Google Chrome likes to use nVidia when it doesn't need it, likewise with iTunes and several other apps.

keeps switching from intel to nvidia back to intel when dynamic

Ever since I upgraded to gfxCardStatus v1.8 (from 1.7 I think...) I ran into this issue. I'm not doing anything on the computer and it constantly switches from intel to nvidia back to intel. I was hoping v2.0 would solve this problem but alas it does not. The only way I can make it stop is to turn off the program or select intel or nvidia only. Has anyone else had this problem?

edit: I just restored 1.7.5 from my oldest time machine backup and the problem is still present, could this be due to some library or saved application preferences?
edit: just removed ~/Library/Preferences/com.codykrieger* and problem persists.

Whitelist for apps that must run on discrete video

It would be nice to have a configurable whitelist for apps that should trigger switch to discrete wide even if the current mode is integrated (forced by manual selection or power source), e.g. adobe photoshop works on integrated video but is missing come important features, so video should switch to discrete if photoshop is launched.

Powersource changing during sleep not switching gpu upon wakeup

Reproduced with powersource based switching (battery = integrated, plugged in = discrete) on MBP 15" 2011.

How to reproduce:

1.Turn on MBP
2.Plug in magsafe and let MBP detect charging. gfxCardStatus will be switched to discrete.
3.Close lid and let MBP to sleep
4.Pull off magsafe
5.Open lid - gfxCardStatus will not switch to integrated gpu

Same happens if let close lid when MBP on battery and plugin magsafe - gfxCardStatus will not switch to discrete.

Lion issues

Some info about the issue:

NSApplicationDidChangeScreenParametersNotification is still fired when apps open that should cause a switch. The switch seems to take place much later than the notification comes, though, so when gfxCardStatus checks, technically it does get the "current" GPU, but then shortly after that, the GPU switches, and gfxCardStatus is incorrect.

Need to research some other methods of detecting when the GPU has switched.

Hot Switch Power Source and Battery Life

I'm trying to track down the issue and not sure how gfxCardStatus fits in but there's something going on.

gfxcardstatus 2.0.1 with new pref file set on "power source-based switching" with battery = integrated and plugged-in = dynamic.

This is on a 2011 MBP 15" i7 with SSD drive.

(A) If I have no apps running and if I am plugged in and then remove the plug, it says it has switched to integrated. My battery life remaining shows at about 5:15. (B) If I then reboot (on battery) my battery life jumps to 7:58.

I have coconut battery running under scenario (A) it hovers around 14.5W, while on scenario (B) it hovers around 9.5W of battery usage. I check Activity Monitor in both scenarios and nothing materially different in terms of CPU usage -- both fairly idle.

So something is happening when I unplug and the only thing I can think of is that even though it says it switched to integrated, it is still really using the discrete. Because in scenario (B) if I switch to discrete manually the battery drops to about 5:15. I find it hard to believe that's a coincidence.

Any ideas?

Thanks!

Power source switch

I am having a hard time with power source switching. By my tests I found the following problems:

  • "Restore last used mode at startup" and "Use power source-based switching" conflict with each other, check boxes should cancel each other;
  • Some times when you do a cold boot it does not switch to my preference if I am using battery.

If you need help or more explanation please let me know.

icon sporadically dissapears from menubar

Anyone else having this issue??

I'm running a brand new core i7 MacBook Pro with the intel integrated/Nvidia GT 330M graphics, and occasionally (it seems like whenever I'm looking for it) the "i" or "n" disappears. I'm trying to nail down when or what exactly triggers the disappearance but I have yet to figure it out. Boxee seems like a likely culprit however I don't think its the only one. After a while, the icon does return (I've noticed that it usually returns if I change any settings from System Preferences). An odd bug, hopefully you can get it fixed.

If you need any other info, let me know.

Global Keyboard Shortcuts

Tried power based switching, which is a great feature, but due to some apps not responding to the change well, I've gone back to manually switching by way of the menu-bar. Which led me to start wishing for a way to do it by keyboard. Global hot-key support built into the app, or switching by Applescript would work for me (as I can fire an Applescript with a QS trigger).

If no one else gets around to it, I might take a crack at it. Just don't have time to learn Cocoa at the moment :)

Windows are resized with dual monitors

Hey Cody, great app idea, I love it.

When using dual monitors (laptop + external, external is primary), open apps seem to render on the lappy's screen, then (mostly) move back into their correct position. However, they are vertically resized to the size of the smaller screen.

Didn't know if you tested that use case.

Thanks!

Lion compatibility

it seems gfxCardStatus stopped working, or at least unstable under Lion (mid-2010 MBP)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.