Skip to content

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

Closed

Description

@ajaykumarmeher

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

Activity

  1. justinclift commented on Aug 19, 2020

    @justinclift
    Member

    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?

  2. revolter commented on Aug 19, 2020

    @revolter
    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+?

  3. chrisjlocke commented on Aug 19, 2020

    @chrisjlocke
    Member

    Qt v5.12.8, I believe.

  4. justinclift commented on Aug 19, 2020

    @justinclift
    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.

  5. MKleusberg commented on Aug 19, 2020

    @MKleusberg
    Member

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

  6. justinclift commented on Aug 19, 2020

    @justinclift
    Member

    @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. 😄

  7. ajaykumarmeher commented on Aug 19, 2020

    @ajaykumarmeher
    Author

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

    Screenshot 2020-08-19 at 1 35 43 PM

  8. justinclift commented on Aug 19, 2020

    @justinclift
    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. 😄

  9. added this to the 3.12.1 milestone on Aug 21, 2020
  10. MKleusberg commented on Aug 21, 2020

    @MKleusberg
    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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions