Important: Please read the Qt Code of Conduct -

Run and debug by bumblebee

  • Hi,
    My laptop is using Nvidia Optimus Technology and I have Ubuntu, if I want to use my nvidia gpu, I have to use bumblebee. so how can I run my program in Qt by bumblebee (when I want to run a program by bumblebee I use this command in Terminal "optirun my-program")

  • Moderators

    Are you asking how to launch a separate program via optirun from within your own Qt application? If so, then you'll use QProcess to launch optirun, with my-program as the first command line parameter passed to it.

  • No, I mean how can I debug my gpu program in Qt creator

  • Moderators

    Creator does not support bumblebee (whatever that is).

    You should be able to add a custom exectuable runconfiguration to creator (Projects->Run Settings) that can start whatever you want with whatever parameters. Debugging that will most likely not work through the bumblebee wrapper. You will need to use the normal run configuration set up for you by creator for that. Switching between runconfigs is pretty fast though (Ctrl-T, or click on the computer icon in the lower left area of creator).

  • Just adding to this old post as I had the same issue. Call qtcreator with "optirun qtreator" and debugging will work and you can get the correct context (ie use the nvidia hardware) - so do not call optirun again in your run time config - just once when spawning qtcreator. This worked for me with no additional changes to the qt config.

Log in to reply