{"id":8240,"date":"2019-09-27T00:36:30","date_gmt":"2019-09-27T07:36:30","guid":{"rendered":"https:\/\/www.coretechnologies.com\/blog\/?p=8240"},"modified":"2023-01-07T17:36:07","modified_gmt":"2023-01-08T01:36:07","slug":"how-to-fix-opengl-problem","status":"publish","type":"post","link":"https:\/\/www.coretechnologies.com\/blog\/dropbox-software\/how-to-fix-opengl-problem\/","title":{"rendered":"How to Fix the &#8220;OpenGL&#8221; Problem when Running Dropbox as a Windows Service"},"content":{"rendered":"<h2 class=\"blog-caption\" style=\"margin-top:10px;\">What&#8217;s the problem with Dropbox?<\/h2>\n<p>As we wrote about last week, <a href=\"\/blog\/alwaysup\/dropbox-not-working\/\">Dropbox version 81.4.195 often fails to run as a background Windows Service<\/a>. The telltale sign that Dropbox is in trouble is this wordy alert, which appears in Session 0: <\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/dropbox-opengl-error.png\" class=\"zoomPopup\" title=\"Dropbox OpenGL Error\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/dropbox-opengl-error.png\" title=\"Dropbox OpenGL Error (click to enlarge)\" alt=\"Dropbox OpenGL Error\" border=\"0\" ><\/a><\/div>\n<p>Dropbox stops dead in its tracks &mdash; without synchronizing a single file!<\/p>\n<h2 class=\"blog-caption\">So how do I fix it?<\/h2>\n<p>Follow these steps to fix the problem:<\/p>\n<div class=\"highlight-box-green\">\n<ol>\n<li>\n<p>Start a Windows command prompt as an Administrator (an <a href=\"\/WindowsServices\/FAQ.html#ElevatedPrompt\" target=\"_blank\" rel=\"noopener noreferrer\">elevated command prompt<\/a>)<\/p>\n<\/li>\n<li>\n<p>Run this command:<\/p>\n<blockquote><p><b>SETX QT_OPENGL software<\/b><\/p><\/blockquote>\n<div align=\"center\"><a href=\"\/blog\/images\/set-qt-opengl-environment-variable.png\" class=\"zoomPopup\" title=\"SETX QT_OPENGL software\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/set-qt-opengl-environment-variable.png\" title=\"SETX QT_OPENGL software (click to enlarge)\" alt=\"SETX QT_OPENGL software\" border=\"0\" ><\/a><\/div>\n<\/li>\n<li>\n<p>Close the command prompt.<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<p>Afterwards, restart Dropbox as a service. The OpenGL prompt should be gone &mdash; a relic of an unpleasant past.<\/p>\n<p><b>Huge thanks<\/b> go to Dropbox forum user Wilson7777, who alerted the community of this remedy. His original solution <a href=\"https:\/\/www.dropboxforum.com\/t5\/Installs-integrations\/I-m-seeing-an-error-message-quot-Failed-to-create-OpenGL-context\/m-p\/367185\/highlight\/true#M78386\" target=\"_blank\" rel=\"noopener noreferrer\">is here<\/a>.<\/p>\n<h2 class=\"blog-caption\">Why does the fix work?<\/h2>\n<p>The explanation is a bit technical, but here goes&#8230;<\/p>\n<p>Dropbox uses <a href=\"https:\/\/www.qt.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Qt<\/a> &mdash; a popular cross-platform development framework.<\/p>\n<p>In turn, Qt requires <a href=\"https:\/\/en.wikipedia.org\/wiki\/OpenGL\" target=\"_blank\" rel=\"noopener noreferrer\">OpenGL<\/a> &mdash; a cross-platform API for rendering 2D and 3D vector graphics.<\/p>\n<p>So when you run Dropbox, both Qt and OpenGL will be started.<\/p>\n<p>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 &#8220;Failed to create OpenGL context for format QSurfaceFormat&#8221; error, which suggests that there is a problem with the computer&#8217;s graphics card\/hardware.<\/p>\n<p>Fortunately there is a way to instruct Qt: &#8220;Instead of using the computer&#8217;s graphics hardware for OpenGL, use software libraries&#8221;. Setting the QT_OPENGL environment variable to &#8220;software&#8221; is the way to do that.<\/p>\n<p>And with the change to use software instead of hardware, Qt, OpenGL and Dropbox all start properly.<\/p>\n<p>Note that when you ran the <b>SETX<\/b> command in step 2, it added the QT_OPENGL value to your environment. You can see it listed in your environment variables (available from the Control Panel):<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/qt_opengl-environment-variable.png\" class=\"zoomPopup\" title=\"QT_OPENGL environment variable\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/qt_opengl-environment-variable.png\" title=\"QT_OPENGL environment variable (click to enlarge)\" alt=\"QT_OPENGL environment variable\" border=\"0\" ><\/a><\/div>\n<h2 class=\"blog-caption\">Will this fix work for future versions of Dropbox?<\/h2>\n<p>We certainly hope so! But like you, we&#8217;re not sure what magic the next automatic update of Dropbox will bring&#8230;<\/p>\n<div align=\"center\">\n<div class=\"cta-button-1\">\n<table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"left\">\n<tbody>\n<tr>\n<td align=\"center\"><a href=\"\/blog\/tag\/dropbox\/\" title=\"More about running Dropbox as a Windows Service\"><span><nobr>Read more articles about Dropbox&#8230;<\/nobr><\/span><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<!-- relpost-thumb-wrapper --><div class=\"relpost-thumb-wrapper\"><!-- filter-class --><div class=\"relpost-thumb-container\"><style>.relpost-block-single-image, .relpost-post-image { margin-bottom: 10px; }<\/style><h3>You may also like...<\/h3><div style=\"clear: both\"><\/div><div style=\"clear: both\"><\/div><!-- relpost-block-container --><div class=\"relpost-block-container relpost-block-column-layout\" style=\"--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2\"><a href=\"https:\/\/www.coretechnologies.com\/blog\/box-drive\/windows-service-unable-to-start\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Box Drive Version 2.18 Fails to Run in Session 0 (as a Windows Service)\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/box-drive-logo-150x150-1.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Box Drive Version 2.18 Fails to Run in Session 0 (as a Windows Service)<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/not-sending-email-at-boot\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Q &amp; A: Why Doesn&#039;t AlwaysUp Send Email When My Server Boots?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/email-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Q &amp; A: Why Doesn&#039;t AlwaysUp Send Email When My Server Boots?<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/miscellaneous\/windows-server-2012-certified\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Windows Server 2012 Certified\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/windows-server-2012-logo-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Windows Server 2012 Certified<\/h2><\/div><\/div><\/a><\/div><!-- close relpost-block-container --><div style=\"clear: both\"><\/div><\/div><!-- close filter class --><\/div><!-- close relpost-thumb-wrapper -->","protected":false},"excerpt":{"rendered":"<p>What&#8217;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: &hellip; <a href=\"https:\/\/www.coretechnologies.com\/blog\/dropbox-software\/how-to-fix-opengl-problem\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2276,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[26,69,112,128,153,200],"class_list":["post-8240","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dropbox-software","tag-alwaysup-tag","tag-dropbox","tag-opengl","tag-qt","tag-session-0-isolation","tag-workaround"],"_links":{"self":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/8240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=8240"}],"version-history":[{"count":1,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/8240\/revisions"}],"predecessor-version":[{"id":11752,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/8240\/revisions\/11752"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media\/2276"}],"wp:attachment":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=8240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=8240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=8240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}