Jump to content
Ultimaker Community of 3D Printing Experts

OpenGL error on virtual machine


Recommended Posts

Posted · OpenGL error on virtual machine

I am trying to run Cura 4.1.0 on a virtual machine but when I launch it, I get the following error:

 

Failed to probe OpenGL

Could not probe OpenGL. This program requires OpenGL 2.0 or higher. Please check your video card drivers.

 

I know that typically this would be installed on a physical machine, but I’d really like to try to get this running from a virtual platform. I’ve dug through forums and found that some people are looking into video card passthrough, but I don’t have that option. I found a post saying that the OP’s IT department was able to get it running on a virtual machine using some kind of software, but nothing was listed and they aren’t replying.

 

I was hoping to see if this was something you folks have come across before and might know how I can proceed. I’m just looking for some possible breadcrumbs..

 

Currently, I’m trying to install into Server 2016, but I could also run it on Windows 10 instead. I am getting that error on both operating systems. I could also try to install into a Linux OS, but I haven't attempted anything like that yet.

 

I'd be connecting to the VM via RDP. 

 

I’m running my virtual environment on a HyperV host

 

Any help would be appreciated!

  • Link to post
    Share on other sites
    Posted · OpenGL error on virtual machine

    This StackExchange post explains the problem adequately:

    https://stackoverflow.com/questions/51705471/current-state-and-solutions-for-opengl-over-windows-remote

     

    Quote

    A RDP session of Windows does not expose the graphics card, at least not directly. (...)
    Starting a OpenGL context higher than v1.1 fails because of this.

    (...)

    You can start the OpenGL program [outside the RDP session], allowing it to see the graphics card, create an opengl context and then connect via WindowsRemote. This always works, as Windows remote just transfers the window content.

     

    As mentioned in that answer, perhaps you could write a script that closes the RDP connection and then launches Cura

    https://social.technet.microsoft.com/Forums/windowsserver/en-US/c8295ef8-3711-4576-9293-2c4965280165/opengl-and-remote-desktop?forum=winserverTS

  • Link to post
    Share on other sites
    Posted · OpenGL error on virtual machine

    This script works for me from a Windows RDP session:
     

    Quote

     

    @echo off
    echo Remote Desktop will be temporarily disconnected. Please reconnect after a few seconds.
    pause
    @echo on

    REM The active session has an arrow as the first character
    setlocal EnableDelayedExpansion
    FOR /F %%A in ('qwinsta') do (
        set tempSessionName=%%A
        if "!tempSessionName:~0,1!"==">"  (
            @echo on
            tscon.exe !tempSessionName:~1! /v /dest:console
            @echo off
        )    
    )
    @echo off
    echo Starting Cura . . .
    @echo on
    call "C:\Program Files\Ultimaker Cura 4.1\Cura.exe"
    @echo off
    pause


     

     

    Caveat: it needs to be run elevated to connect back to the console. I don't know how this will work on a server hosting multi-user RDP sessions.

  • Link to post
    Share on other sites
    Posted · OpenGL error on virtual machine

    Thanks @ahoeben, can you give me a bit of a breakdown whats happening in that script? also, you said you run that from a Windows RDP session... so that is run on the remote computer.. as a bat file? 

  • Link to post
    Share on other sites
    Posted · OpenGL error on virtual machine

    It is indeed a bat file, which I start from the RDP session on a remote computer. The script closes the RDP session, and you have to start another RDP session, but Cura will have launched on the remote computer. See the social.technet.microsoft.com link above for what the script does.

  • Link to post
    Share on other sites
    Posted · OpenGL error on virtual machine

    Hmm... tried running that bat file elevated and this is its output - unfortunately, same end result.OpenGL.thumb.JPG.cf6fa911b7f2ce7671cefe7abe681dcc.JPG

  • Link to post
    Share on other sites
    Posted · OpenGL error on virtual machine

    @fairchilde Were you ever disconnected from your RDP session? If not, then that is why it didn't work for you.

     

    I have used the exact script mentioned above and it works "as described". However, once I connect back via RDP, Cura is not usable even though it is in fact launched.

     

    Back to the drawing board.....

  • Link to post
    Share on other sites
    Posted · OpenGL error on virtual machine

    I just found that if you run nVidia GPU on your remote system, update the drivers and then run OpenGL enabling utility.

    Get it from nvidia website 

    https://developer.nvidia.com/nvidia-opengl-rdp

     

    Hope it helps

    • Like 1
    • Thanks 1
    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    ×
    ×
    • Create New...