The Core Technologies Blog

Our Software // Windows Services // 24×7 Operation


How to Fix the “OpenGL” Problem when Running Dropbox as a Windows Service

What’s the problem with Dropbox?

As we wrote about last week, Dropbox version 81.4.195 often fails to run as a background Windows Service. The telltale sign that Dropbox is in trouble is this wordy alert, which appears in Session 0:

Dropbox OpenGL Error

Dropbox stops dead in its tracks — without synchronizing a single file!

So how do I fix it?

Follow these steps to fix the problem:

  1. Start a Windows command prompt as an Administrator (an elevated command prompt)

  2. Run this command:

    SETX QT_OPENGL software

    SETX QT_OPENGL software
  3. Close the command prompt.

Afterwards, restart Dropbox as a service. The OpenGL prompt should be gone — a relic of an unpleasant past.

Huge thanks go to Dropbox forum user Wilson7777, who alerted the community of this remedy. His original solution is here.

Why does the fix work?

The explanation is a bit technical, but here goes…

Dropbox uses Qt — a popular cross-platform development framework.

In turn, Qt requires OpenGL — a cross-platform API for rendering 2D and 3D vector graphics.

So when you run Dropbox, both Qt and OpenGL will be started.

But for some unknown reason, when Dropbox is started as a Windows Service in Session 0, Qt and OpenGL fail to initialize. That failure causes Dropbox to throw up the “Failed to create OpenGL context for format QSurfaceFormat” error, which suggests that there is a problem with the computer’s graphics card/hardware.

Fortunately there is a way to instruct Qt: “Instead of using the computer’s graphics hardware for OpenGL, use software libraries”. Setting the QT_OPENGL environment variable to “software” is the way to do that.

And with the change to use software instead of hardware, Qt, OpenGL and Dropbox all start properly.

Note that when you ran the SETX command in step 2, it added the QT_OPENGL value to your environment. You can see it listed in your system environment variables (available from the Control Panel):

QT_OPENGL environment variable

Will this fix work for future versions of Dropbox?

We certainly hope so! But like you, we’re not sure what magic the next automatic update of Dropbox will bring…

Posted in Dropbox | Tagged , , , , , | 5 Comments

5 Responses to How to Fix the “OpenGL” Problem when Running Dropbox as a Windows Service

  1. Dan Richardson says:

    This works, for selected definitions of “fix”. The error message is gone. However, the Dropbox window doesn’t open. No status, no recents, no settings. Running the Dropbox app gets me a big empty white window.

    How do I reverse it? After the error message Dropbox at least sort of worked.

  2. ctcadmin says:

    Hi Dan. Glad to hear that the fix got you past the OpenGL error!

    However no longer seeing the Dropbox window (or its tray icon) is completely normal because Dropbox is running in the background in “Session 0” — an isolated desktop for Windows Services.

    You can read about Session 0 on our web site or in the step-by-step tutorial showing how to run Dropbox as a Windows Service with AlwaysUp.

  3. Dan Richardson says:

    Today the error is back, and Dropbox is crashing and restarting, over and over.

    I don’t use AlwaysUp. I’m here from DropBox’s useless support forum, where they are linking your fix as a solution to their problem.

    Deleting the environment variable successfully restored some functionality.

  4. Jeanne says:

    I tried this fix and it didn’t work. When I opened Dropbox again, I got the error and the program crashed. 🙁

  5. ctcadmin says:

    Sorry to hear that Jeanne!

    What version of Dropbox are you running? And are you running Dropbox as a windows service with AlwaysUp?

Leave a Reply

Your email address will not be published. Required fields are marked *