Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Using Creator/Design Studio under WSL2?
Forum Updated to NodeBB v4.3 + New Features

Using Creator/Design Studio under WSL2?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
15 Posts 3 Posters 3.0k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mrjjM mrjj

    Hi
    There was alot of talk about openGl but not sure what current status is

    did you try a
    glxinfo
    and see what openGL that is available ?
    If not even glxgears runs it cant be very good support.

    https://stackoverflow.com/questions/66497147/cant-run-opengl-on-wsl2

    mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #3

    @mrjj

    mzimmers@mzimmers-home:~$ glxinfo | grep OpenGL
    libGL error: No matching fbConfigs or visuals found
    libGL error: failed to load driver: swrast
    OpenGL vendor string: Intel
    OpenGL renderer string: Intel(R) UHD Graphics 630
    OpenGL version string: 1.4 (4.6.0 - Build 27.20.100.8681)
    OpenGL extensions:
    mzimmers@mzimmers-home:~$
    
    mrjjM 1 Reply Last reply
    0
    • mzimmersM mzimmers

      @mrjj

      mzimmers@mzimmers-home:~$ glxinfo | grep OpenGL
      libGL error: No matching fbConfigs or visuals found
      libGL error: failed to load driver: swrast
      OpenGL vendor string: Intel
      OpenGL renderer string: Intel(R) UHD Graphics 630
      OpenGL version string: 1.4 (4.6.0 - Build 27.20.100.8681)
      OpenGL extensions:
      mzimmers@mzimmers-home:~$
      
      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #4

      Hi
      I think the Gl.so (the lib) misses some dependencies or don't find it where expected.

      • libGL error: No matching fbConfigs or visuals found

      https://askubuntu.com/questions/834254/steam-libgl-error-no-matching-fbconfigs-or-visuals-found-libgl-error-failed-t

      try the sudo ldconfig -p | grep -i gl.so
      and see.

      • libGL error: failed to load driver: swrast
        might be fixable by
        apt-get intall -y mesa-utils and libgl1-mesa-glx
      mzimmersM 1 Reply Last reply
      1
      • mrjjM mrjj

        Hi
        I think the Gl.so (the lib) misses some dependencies or don't find it where expected.

        • libGL error: No matching fbConfigs or visuals found

        https://askubuntu.com/questions/834254/steam-libgl-error-no-matching-fbconfigs-or-visuals-found-libgl-error-failed-t

        try the sudo ldconfig -p | grep -i gl.so
        and see.

        • libGL error: failed to load driver: swrast
          might be fixable by
          apt-get intall -y mesa-utils and libgl1-mesa-glx
        mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #5

        @mrjj thanks for the suggestions. Here's the output of the ldconfig:

        mzimmers@mzimmers-home:~$ sudo ldconfig -p | grep -i gl.so
                libwayland-egl.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libwayland-egl.so.1
                libcogl.so.20 (libc6,x86-64) => /lib/x86_64-linux-gnu/libcogl.so.20
                libOpenGL.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libOpenGL.so.0
                libOpenGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libOpenGL.so
                libGL.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libGL.so.1
                libGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libGL.so
                libEGL.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL.so.1
                libEGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL.so
        mzimmers@mzimmers-home:~$
        

        According to the link you posted, the stated problem should be fixed in my version of Ubuntu (20.04).

        I'm really in the dark here...

        mrjjM 1 Reply Last reply
        0
        • mzimmersM mzimmers

          @mrjj thanks for the suggestions. Here's the output of the ldconfig:

          mzimmers@mzimmers-home:~$ sudo ldconfig -p | grep -i gl.so
                  libwayland-egl.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libwayland-egl.so.1
                  libcogl.so.20 (libc6,x86-64) => /lib/x86_64-linux-gnu/libcogl.so.20
                  libOpenGL.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libOpenGL.so.0
                  libOpenGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libOpenGL.so
                  libGL.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libGL.so.1
                  libGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libGL.so
                  libEGL.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL.so.1
                  libEGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL.so
          mzimmers@mzimmers-home:~$
          

          According to the link you posted, the stated problem should be fixed in my version of Ubuntu (20.04).

          I'm really in the dark here...

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #6

          @mzimmers
          Hi
          It looks ok. Noting is missing.

          Btw. Creator does start, correct?
          (im asking as it had some issues at some point with 20.04)

          mzimmersM 1 Reply Last reply
          0
          • mrjjM mrjj

            @mzimmers
            Hi
            It looks ok. Noting is missing.

            Btw. Creator does start, correct?
            (im asking as it had some issues at some point with 20.04)

            mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by
            #7

            @mrjj yes it starts, though it does throw those errors I mentioned earlier. But many of the example apps fail (after throwing the same errors).

            mrjjM 1 Reply Last reply
            0
            • mzimmersM mzimmers

              @mrjj yes it starts, though it does throw those errors I mentioned earlier. But many of the example apps fail (after throwing the same errors).

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #8

              @mzimmers
              Ok Creator it self run but anything needed openGL fails. it sounds like.

              You followed something like
              https://www.programmersought.com/article/40497291197/
              to get creator running ?

              It lists Intel(R) UHD Graphics 630 .
              This is correct yes ?
              and openGL works in your win 10 ?

              mzimmersM 1 Reply Last reply
              0
              • mrjjM mrjj

                @mzimmers
                Ok Creator it self run but anything needed openGL fails. it sounds like.

                You followed something like
                https://www.programmersought.com/article/40497291197/
                to get creator running ?

                It lists Intel(R) UHD Graphics 630 .
                This is correct yes ?
                and openGL works in your win 10 ?

                mzimmersM Offline
                mzimmersM Offline
                mzimmers
                wrote on last edited by mzimmers
                #9

                @mrjj I installed Qt from the online installer, and I'm using vcxsrv. I installed Ubuntu via WSL2.

                The graphics processor is indeed the Intel UHD 630.

                I ran the heartrate-game example (which I think uses OpenGL) on Windows and it worked; didn't work under WSL2. (no, it doesn't use OpenGL).

                mrjjM 1 Reply Last reply
                0
                • mzimmersM mzimmers

                  @mrjj I installed Qt from the online installer, and I'm using vcxsrv. I installed Ubuntu via WSL2.

                  The graphics processor is indeed the Intel UHD 630.

                  I ran the heartrate-game example (which I think uses OpenGL) on Windows and it worked; didn't work under WSL2. (no, it doesn't use OpenGL).

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  Hi
                  Ok.
                  Try to run some QML via Creator (if possible)

                  in the linux , can you do
                  lsmod | grep video

                  it should list something like
                  i915

                  mzimmersM 1 Reply Last reply
                  0
                  • mrjjM mrjj

                    Hi
                    Ok.
                    Try to run some QML via Creator (if possible)

                    in the linux , can you do
                    lsmod | grep video

                    it should list something like
                    i915

                    mzimmersM Offline
                    mzimmersM Offline
                    mzimmers
                    wrote on last edited by mzimmers
                    #11

                    @mrjj well, the heartrate-game is definitely QML, and it runs on Windows.

                    mzimmers@mzimmers-home:/$ lsmod | grep video
                    mzimmers@mzimmers-home:/$ lsmod
                    Module                  Size  Used by
                    mzimmers@mzimmers-home:/$
                    

                    I tried building the boxes example, and got this error:

                    :-1: error: Project ERROR: This example requires Qt to be configured with -opengl desktop
                    

                    which confuses me even further -- does that message mean "configure" as in configure before building Qt?

                    EDIT:

                    The error that the boxes project gave was a bit of a red herring; in the .pro file, there's this line:

                    qtConfig(opengles.|angle|dynamicgl): error("This example requires Qt to be configured with -opengl desktop")
                    

                    I opened the cube example (which claims to use OpenGL) and that runs under Windows, but not under WSL2.

                    mrjjM 1 Reply Last reply
                    0
                    • mzimmersM mzimmers

                      @mrjj well, the heartrate-game is definitely QML, and it runs on Windows.

                      mzimmers@mzimmers-home:/$ lsmod | grep video
                      mzimmers@mzimmers-home:/$ lsmod
                      Module                  Size  Used by
                      mzimmers@mzimmers-home:/$
                      

                      I tried building the boxes example, and got this error:

                      :-1: error: Project ERROR: This example requires Qt to be configured with -opengl desktop
                      

                      which confuses me even further -- does that message mean "configure" as in configure before building Qt?

                      EDIT:

                      The error that the boxes project gave was a bit of a red herring; in the .pro file, there's this line:

                      qtConfig(opengles.|angle|dynamicgl): error("This example requires Qt to be configured with -opengl desktop")
                      

                      I opened the cube example (which claims to use OpenGL) and that runs under Windows, but not under WSL2.

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      @mzimmers

                      Hmm that what not what i expceted. o.O
                      It should have the driver as far as i can see

                      https://github.com/microsoft/WSL2-Linux-Kernel/tree/master/Documentation/gpu
                      Its listed.

                      But maybe its not modules like normally but compiled as lsmod lsits nothing.

                      • which confuses me even further -- does that message mean "configure" as in configure before building Qt?

                      Yes that normally means that but since you used the online installer it should already be fine.

                      mzimmersM 1 Reply Last reply
                      0
                      • mrjjM mrjj

                        @mzimmers

                        Hmm that what not what i expceted. o.O
                        It should have the driver as far as i can see

                        https://github.com/microsoft/WSL2-Linux-Kernel/tree/master/Documentation/gpu
                        Its listed.

                        But maybe its not modules like normally but compiled as lsmod lsits nothing.

                        • which confuses me even further -- does that message mean "configure" as in configure before building Qt?

                        Yes that normally means that but since you used the online installer it should already be fine.

                        mzimmersM Offline
                        mzimmersM Offline
                        mzimmers
                        wrote on last edited by
                        #13

                        @mrjj I may kick this topic to brainstorming, since it's clear that the problem isn't isolated to Qt. Someone on an OpenGL forum said that it looks like I have the correct drivers, but something is preventing them from being used.

                        kshegunovK 1 Reply Last reply
                        0
                        • mzimmersM mzimmers

                          @mrjj I may kick this topic to brainstorming, since it's clear that the problem isn't isolated to Qt. Someone on an OpenGL forum said that it looks like I have the correct drivers, but something is preventing them from being used.

                          kshegunovK Offline
                          kshegunovK Offline
                          kshegunov
                          Moderators
                          wrote on last edited by
                          #14

                          @mzimmers said in Using Creator/Design Studio under WSL2?:

                          I may kick this topic to brainstorming, since it's clear that the problem isn't isolated to Qt. Someone on an OpenGL forum said that it looks like I have the correct drivers, but something is preventing them from being used.

                          They may be blacklisted in the kernel, so you should check that (can't give you reference offhand, but google should be able to help).

                          Read and abide by the Qt Code of Conduct

                          1 Reply Last reply
                          0
                          • mzimmersM Offline
                            mzimmersM Offline
                            mzimmers
                            wrote on last edited by
                            #15

                            Well, I got it working...Windows kept fooling me because it likes to hide startup files in about a million different places, but it ultimately came down to a mis-configured startup file for VcXsrv.

                            The details:

                            mzimmers@mzimmers-home:~$ glxinfo -B
                            name of display: 172.27.32.1:0.0
                            display: 172.27.32.1:0  screen: 0
                            direct rendering: Yes
                            Extended renderer info (GLX_MESA_query_renderer):
                                Vendor: Mesa/X.org (0xffffffff)
                                Device: llvmpipe (LLVM 12.0.0, 256 bits) (0xffffffff)
                                Version: 21.0.3
                                Accelerated: no
                                Video memory: 25543MB
                                Unified memory: no
                                Preferred profile: core (0x1)
                                Max core profile version: 4.5
                                Max compat profile version: 3.1
                                Max GLES1 profile version: 1.1
                                Max GLES[23] profile version: 3.2
                            OpenGL vendor string: Mesa/X.org
                            OpenGL renderer string: llvmpipe (LLVM 12.0.0, 256 bits)
                            OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.0.3 - kisak-mesa PPA
                            OpenGL core profile shading language version string: 4.50
                            OpenGL core profile context flags: (none)
                            OpenGL core profile profile mask: core profile
                            
                            OpenGL version string: 3.1 Mesa 21.0.3 - kisak-mesa PPA
                            OpenGL shading language version string: 1.40
                            OpenGL context flags: (none)
                            
                            OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.0.3 - kisak-mesa PPA
                            OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
                            

                            Of note from a forum I asked on:

                            The hardware (including the GPU) is virtualised. So the Linux video drivers can’t access the GPU directly as in a standard Linux installation; they have to use the virtual GPU provided by WSL, and I don’t think that supports OpenGL at present. In which case, you’re limited to the llvmpipe driver, which uses the CPU for rendering. There is some work being done on providing OpenGL support atop DirectX for WSL, but I believe that’s still work in progress.

                            It appears that he's right about needing llvmpipe, since that appears in my info dump above.

                            So, anyway, glxgears runs right now, and so does cube. Thanks for all the suggestions; hopefully someone else will find this useful.

                            1 Reply Last reply
                            3

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved