[Solved]Black screen by starting first document

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: [Solved]Black screen by starting first document

Post by Russ4262 »

I think something has changed in our builds or commits based upon the following data presented.
I'm back to my older Windows machine lately. I ran into the black screen in the viewport when I attempted to use the 0.19.17337 x64 LP 12.1.2 binary. I found an older nightly version, 0.19.16624 x64 LP 12.1.2, unzipped on the same machine and tested it.

The following older nightly (post .18 release) runs and opens files with no black screen in viewport
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16624 (Git)
Build type: Release
Branch: master
Hash: 222ae7305fdf1097e4ef3d050f69dff47dbd8786
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

However, the new version 0.19.17337 x64 LP 12.1.2 I tried yielded a black screen in the viewport.
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17337 (Git)
Build type: Release
Branch: master
Hash: 0871fb49c71f1ac4029e441814332368f42bd78a
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)


I have accumulated a reasonable collection of nightly build binaries; so, I can go back and check some builds post-16624 to find where abouts the change occured that now yields the black screen in the viewport on this machine. Unfortunately, the nightly collection is on my wife's laptop. I'll have to wait until I have access to it again to copy those binaries to this machine for testing.

Thankfully, WMayer's environmental variable suggestion, quoted below, has fixed the black screen on the new 0.19.17337 x64 LP 12.1.2. Nonetheless, I am curious as to which commit or change since 16624 has caused the problem. I'd like to find it and see if we can fix it - so long as the fix doesn't hinder FC's forward progress.
wmayer wrote: Fri May 03, 2019 3:43 pm ... or alternatively set the environment variable QT_OPENGL to desktop.
Thanks,
Russ
Attachments
Has black screen for viewport  WITHOUT environmental variable fix
Has black screen for viewport WITHOUT environmental variable fix
19_17337 Black Screen x64_LP_12_1_2.png (101.05 KiB) Viewed 6822 times
No black screen issue - also an x64_LP_12_1_2 version
No black screen issue - also an x64_LP_12_1_2 version
19_16624 NO Black Screen.png (122.75 KiB) Viewed 6822 times
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: [Solved]Black screen by starting first document

Post by RatonLaveur »

Hello to everyone,

I would like to further report that the setting of the System environment variable QT_OPENGL to desktop as suggested by wmayer has enabled me to resolve the black viewport issue on the following distribution and version:

FreeCAD_0.19.17137_x64_LP_12.1.2_PY3QT5-WinVS2015

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17137 (Git)
Build type: Release
Branch: master
Hash: e0db5b62be05aa66709c45bbd8418f42d84d8af5
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Switzerland (fr_CH)

I don't know how valuable "corroborating evidence" such as this is :)
chrisb
Veteran
Posts: 53922
Joined: Tue Mar 17, 2015 9:14 am

Re: [Solved]Black screen by starting first document

Post by chrisb »

Thanks for reporting back. Should I add this to the Known OS specific issues?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
twohands
Posts: 2
Joined: Fri Aug 09, 2019 4:48 pm

Re: [Solved]Black screen by starting first document

Post by twohands »

I know this is a total newb question, but I'm having this issue on a windows 10 installation, and I'm not very knowledgeable when it comes to code. I've found a way change environmental variables, but this one doesn't show up there, so i'm not sure how to change it. Can anyway give me some basic instructions on this? It would be so much appreciated! Thanks in advance!
-Brendon
chrisb
Veteran
Posts: 53922
Joined: Tue Mar 17, 2015 9:14 am

Re: [Solved]Black screen by starting first document

Post by chrisb »

It doesn't have to exist, just set it.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
twohands
Posts: 2
Joined: Fri Aug 09, 2019 4:48 pm

Re: [Solved]Black screen by starting first document

Post by twohands »

chrisb wrote: Fri Aug 09, 2019 10:34 pm It doesn't have to exist, just set it.
I figured as much, but I really don't know how. I found a place to set it in the windows control panel, but it wants a file path, so I'm wondering if that's the right place to do it, because a file path seems different than a command, but that's probably just my lack of understanding talking. I guess in that case, I'm not sure what the correct file path is, and also how to specify anything to do with it, other than simply assigning it to a name. Obviously I haven't the slightest clue about this. Or is this something I can do from within freecad?

Sorry for being such a dunce when it comes to this, but I've looked around and so far haven't come up with anything that's helping me figure it out any better.

Thanks again for any help anyone can offer.
chrisb
Veteran
Posts: 53922
Joined: Tue Mar 17, 2015 9:14 am

Re: [Solved]Black screen by starting first document

Post by chrisb »

What windows do you use? I'm not on Windows10, but I would be very much surprised, if things concerning environment variables would have changed significantly. Perhaps a Win10 user can explain how to set.

If you are able to use a commandline you can set a variable with

Code: Select all

set QT_OPENGL=desktop
<call your FreeCAD.exe here>
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: [Solved]Black screen by starting first document

Post by Russ4262 »

Welcome to the FreeCAD forum, Twohands!
We will get you taken care of. I'm a Win10 user.
twohands wrote: Sat Aug 10, 2019 4:18 am ... Thanks again for any help anyone can offer.
Here's your solution:
  • Press Windows key or activate Cortana search
  • Type the following words, "edit environment variables"
  • One or two results might be returned depending on search history: "Edit environment variables for your account" and "Edit the system environment variables".
  • Select, "Edit environment variables for your account", unless you want to set this FreeCAD variable at the system level.
  • The "Environment Variables" window pops up (seen in attached image).
  • In the top section it will list variables for your (current user) account.
  • Click NEW button.
  • The "New User Variable" window pops up.
  • Enter the case-sensitive variable name, "QT_OPENGL", and corresponding case-sensitive value, "desktop" (no quotes anywhere)
  • Click the OK button in both windows to save.
  • You might have to log out and back in for it to take effect.
If that doesn't work, set it at the system level:
  • Select 2nd choice on #3 above.
  • Enter Admin password when/if prompted.
  • Click NEW button in bottom section of "Environment Variables" window.
  • Set variable details as above and save.
Glad to have another FreeCAD user!

Russell
Attachments
Environment Variables
Environment Variables
Environment_Variables.png (25.13 KiB) Viewed 6603 times
User avatar
furti
Posts: 344
Joined: Mon Nov 27, 2017 5:27 pm

Re: [Solved]Black screen by starting first document

Post by furti »

I had the same Problem that the 3D View was black when loading a new document with the newest 0.19 Version. For me the problem was, that the Graphics driver decides if a program is executed using the build in Intel Graphics card or the dedicated Nvidia one.
And the new Version was executed using the Intel Graphics card. After changing this in the driver, FreeCAD is executed on the Nvidia Graphics card and everything works.
Viky
Posts: 2
Joined: Sun Sep 01, 2019 7:28 pm

Re: [Solved]Black screen by starting first document

Post by Viky »

Hi, I have the same issue. FreeCAD 0.18 is not working via RDP anymore - opening new or existing project shows black screen.
Post Reply