Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable sqlitebrowser to use integrated graphics card instead of high performance graphics card in macOS #2377

Closed
ajaykumarmeher opened this issue Aug 18, 2020 · 9 comments
Assignees
Labels
enhancement Feature requests. osx
Milestone

Comments

@ajaykumarmeher
Copy link

ajaykumarmeher commented Aug 18, 2020

Describe the new feature

Currently the app is using high perf graphics card instead of normal integrated graphics card. Therefore, the app is impacting heavily on battery life for mac users.

Additional info

Please answer these questions before submitting your feature request.

Is your feature request related to an issue? Please include the issue number.

NO

Does this feature exist in another product or project? Please provide a link.

NO

Do you have a screenshot? Please add screenshots to help explain your idea.

In the below screenshot you can clearly see the graphics card is in high perf instead of integrated. If I quit the sqlitebrowser app the mode will change to integrated immediately.

Screenshot 2020-08-19 at 1 44 31 AM

After closing the app below is the status.
Screenshot 2020-08-19 at 1 48 08 AM

@justinclift
Copy link
Member

justinclift commented Aug 19, 2020

Interesting. Our application is built upon a cross platform framework called "Qt". My first thought is that maybe there's some setting(s) in Qt that would allow this. Maybe @revolter would know?

@justinclift justinclift added enhancement Feature requests. osx labels Aug 19, 2020
@revolter
Copy link
Member

Maybe adding the NSSupportsAutomaticGraphicsSwitching Info.plist key: https://codereview.qt-project.org/c/qt/qtbase/+/73839/.

More details: https://stackoverflow.com/a/27211853/865175.

Are we using Qt 5.3+?

@chrisjlocke
Copy link
Member

Qt v5.12.8, I believe.

@justinclift
Copy link
Member

@revolter Thanks heaps, that looks like the right kind of thing. 😄

And yep, Chris has it right. Our macOS and windows builds at the moment are using Qt 5.12.8.

@MKleusberg
Copy link
Member

#1935 looks like a related issue. Also, as @mgrojo says there, this might be related to #1233.

@justinclift
Copy link
Member

justinclift commented Aug 19, 2020

@ajaykumarmeher Would you be ok with trying something out?

If you could try adding this:

<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>

... to the file /Applications/DB Browser for SQLite.app/Contents/Info.plist.

It will need to be near the end, just after the <true/> string before the </dict> one. Make a backup of the file first though, just in case. 😄

In theory, once that change is done, you should be able to use the Integrated graphics card for the application.

If that does work, please let us know so we can add the change here for our future releases too. 😄

@ajaykumarmeher
Copy link
Author

@justinclift thanks a lot for providing the fastest solution possible :) kudos to the team.

Screenshot 2020-08-19 at 1 35 43 PM

justinclift added a commit that referenced this issue Aug 19, 2020
@justinclift
Copy link
Member

Awesome. I've just added that change to our source code, so it'll be in our nightly builds and all future releases too.

Thanks for looking into this @revolter, and thanks for testing it @ajaykumarmeher. 😄

@MKleusberg
Copy link
Member

Awesome 😄 I'll close this issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests. osx
Projects
None yet
Development

No branches or pull requests

6 participants