Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Failed to load driver: swrast ?

    General and Desktop
    6
    27
    43893
    Loading More Posts
    • 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.
    • D
      deleted28 last edited by

      Any idea how to fix this ?

      libGL error: failed to load driver: swrast
      libGL error: Try again with LIBGL_DEBUG=verbose for more details.

      OpenSuse 13.1
      Qt 5.3.0
      nvidia-computeG02 304.119-31.1
      nvidia-gfxG02-kmp-desktop 304.119_k3.11.6_
      x11-video-nvidiaG02 304.119-31.1

      thx

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Not really an answer but what do you get if you start your application with LIBGL_DEBUG=verbose ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • D
          deleted28 last edited by

          SGaist, telling the truth, i read this 2nd line in error message and if i had any idea how to start my application with "LIBGL_DEBUG=verbose" i had posted the result in my question.

          The package manager yast finds a single package on search "swrast"
          Its "Mesa - System for rendering interactive 3-D graphics"
          I remeber in the past there have been problems when MESA stuff was installed.
          Maybe i should remove this (?)

          1 Reply Last reply Reply Quote 0
          • M
            MuldeR last edited by

            Try something like:
            @LIBGL_DEBUG=verbose ./myapp@

            Or alternatively:
            @export LIBGL_DEBUG=verbose
            ./myapp@

            My OpenSource software at: http://muldersoft.com/

            Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

            Go visit the coop: http://youtu.be/Jay...

            1 Reply Last reply Reply Quote 0
            • D
              deleted28 last edited by

              LIBGL_DEBUG=verbose ./SizeGrip_q001
              "Qt Warning - invalid keysym: dead_actute"

              that's all i get in Konsole.
              The "libGL error: failed to load driver: swrast" i get in creator - Application output.

              The application starts up and seems to work properly.
              Anyway, this message is annooying

              1 Reply Last reply Reply Quote 0
              • D
                deleted28 last edited by

                MuldeR,

                if i use the second approach with export, i set an environment variable, right ?
                Do i need to remove this later or does it not survive a reboot ?
                If necessary to manually remove, please tell me how to ?

                [quote author="MuldeR" date="1398112562"]Try something like:
                @LIBGL_DEBUG=verbose ./myapp@

                Or alternatively:
                @export LIBGL_DEBUG=verbose
                ./myapp@[/quote]

                Any other ideas about this annoying swrast message ?
                i changed to qt veersion 5.2.1 now, but the problem persists.

                1 Reply Last reply Reply Quote 0
                • M
                  MuldeR last edited by

                  [quote author="wally123" date="1398180317"]if i use the second approach with export, i set an environment variable, right ?[/quote]

                  Actually you set the environment variable in both cases. While the first method sets it only for the new process, the second method will set it for all processes you start subsequently (from the same bash instance). And nope, it doesn't survive a reboot, unless you add it to your .bashrc file.

                  My OpenSource software at: http://muldersoft.com/

                  Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

                  Go visit the coop: http://youtu.be/Jay...

                  1 Reply Last reply Reply Quote 0
                  • D
                    deleted28 last edited by

                    thank you :)

                    running both approaches with LIBGL_DEBUG=verbose i do not get any
                    error message.
                    This error message seems to appear only when i build and run the application in qt-creator.
                    This happens even on fresh Qt GUI Application without any additional code.
                    Any idea highly welcome

                    this error is only emitted when i use Qt 5.2.1 , not with 4.8.

                    1 Reply Last reply Reply Quote 0
                    • A
                      andreyc last edited by

                      [quote author="wally123" date="1398113331"]> LIBGL_DEBUG=verbose ./SizeGrip_q001
                      "Qt Warning - invalid keysym: dead_actute" [/quote]
                      Tells that you have broken "locale file":https://bugs.freedesktop.org/show_bug.cgi?id=69476
                      But it is not a problem here.

                      [quote author="wally123" date="1398113331"]
                      The "libGL error: failed to load driver: swrast" i get in creator - Application output.
                      The application starts up and seems to work properly.
                      Anyway, this message is annooying [/quote]
                      LibGL tries to load software rendering library even if you have nvidia drivers.

                      What does the following command says
                      @
                      LIBGL_DEBUG=verbose glxinfo >/dev/null
                      @

                      1 Reply Last reply Reply Quote 0
                      • D
                        deleted28 last edited by

                        @> LIBGL_DEBUG=verbose glxinfo >/dev/null@
                        return nothing

                        @> LIBGL_DEBUG=verbose glxinfo
                        name of display: :0
                        display: :0 screen: 0
                        direct rendering: Yes
                        server glx vendor string: NVIDIA Corporation
                        server glx version string: 1.4
                        server glx extensions:
                        GLX_ARB_create_context, GLX_ARB_create_context_profile,
                        GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
                        GLX_ARB_multisample, GLX_EXT_create_context_es2_profile,
                        GLX_EXT_create_context_es_profile, GLX_EXT_swap_control,
                        GLX_EXT_swap_control_tear, GLX_EXT_texture_from_pixmap,
                        GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_NV_float_buffer,
                        GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGI_swap_control,
                        GLX_SGI_video_sync
                        client glx vendor string: NVIDIA Corporation
                        client glx version string: 1.4
                        client glx extensions:
                        GLX_ARB_create_context, GLX_ARB_create_context_profile,
                        GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
                        GLX_ARB_get_proc_address, GLX_ARB_multisample,
                        GLX_EXT_create_context_es2_profile, GLX_EXT_fbconfig_packed_float,
                        GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, GLX_EXT_swap_control,
                        GLX_EXT_swap_control_tear, GLX_EXT_texture_from_pixmap,
                        GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_NV_copy_image,
                        GLX_NV_float_buffer, GLX_NV_multisample_coverage, GLX_NV_present_video,
                        GLX_NV_swap_group, GLX_NV_video_capture, GLX_NV_video_out,
                        GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGI_swap_control,
                        GLX_SGI_video_sync
                        GLX version: 1.4
                        GLX extensions:
                        GLX_ARB_create_context, GLX_ARB_create_context_profile,
                        ........ @
                        and some more, do you need all the output ?

                        I also posted this question to opensuse forum:
                        Also several interesting explanations:
                        "openuse forum swrast ":https://forums.opensuse.org/showthread.php/497353-Remove-packages-dependency-question?p=2638720#post2638720

                        1 Reply Last reply Reply Quote 0
                        • A
                          andreyc last edited by

                          [quote author="wally123" date="1398277480"]@> LIBGL_DEBUG=verbose glxinfo >/dev/null@
                          return nothing[/quote]
                          This is interesting. Because in my case it returns the debug messages
                          @
                          $ LIBGL_DEBUG=verbose glxinfo >/dev/null
                          libGL: OpenDriver: trying /usr/lib64/dri/tls/i965_dri.so
                          libGL: OpenDriver: trying /usr/lib64/dri/i965_dri.so
                          @

                          [quote author="wally123" date="1398277480"]and some more, do you need all the output ? [/quote]
                          No. don't need it. :-)

                          If you have this warning only in QtCreator Application output window then I would suggest to compare the terminal environment and QtCreator Run environment. Run "env | sort" in a terminal and compare the output with QtCreator Projects/Run/Run Environment.
                          Unfortunately there is no easy way to grab it from QtCreator into a file and run diff on two files.

                          1 Reply Last reply Reply Quote 0
                          • D
                            deleted28 last edited by

                            ...

                            1 Reply Last reply Reply Quote 0
                            • D
                              deleted28 last edited by

                              here the QT… part of “env” :

                              @QEMU_AUDIO_DRV=pa
                              QT_IM_MODULE=xim
                              QT_IM_SWITCHER=imsw-multi
                              QT_PLUGIN_PATH=/home/op/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/
                              QT_SYSTEM_DIR=/usr/share/desktop-data
                              SDL_AUDIODRIVER=pulse@
                              

                              QtCreator Projects/Run/Run Environment:
                              Yes, unfortunately not easy to grab :)
                              Also unable to paste a screenshot here.

                              What’s the relevvant lines, what to compare ?

                              1 Reply Last reply Reply Quote 0
                              • D
                                deleted28 last edited by

                                maybe another hint to get behind what i setup wrong:

                                When i open examples from Qt 5.2.1 i get :
                                @.../Examples/basicdrawing/window.cpp:44: error: QtWidgets: No such file or directory
                                #include <QtWidgets>
                                ^@
                                on every single example i tested so far.
                                I fear i messed up some settings :(

                                1 Reply Last reply Reply Quote 0
                                • SGaist
                                  SGaist Lifetime Qt Champion last edited by

                                  Aren't you opening Qt 4's examples ?

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    deleted28 last edited by

                                    in the QtCreator "Welcome" Tab - > Examples i can choose in the rightmost top corner between 4.8 and 5.2.
                                    I selected qt5 example but i think the creator environment setting is wrong. In qt4 i think i used #include <QtGui>.

                                    When i change #include <QtWidgets> to <QtGui> in a qt5 example i got no error message.

                                    1 Reply Last reply Reply Quote 0
                                    • A
                                      andreyc last edited by

                                      [quote author="wally123" date="1398324670"]
                                      here the QT… part of “env” :

                                      @QEMU_AUDIO_DRV=pa
                                      QT_IM_MODULE=xim
                                      QT_IM_SWITCHER=imsw-multi
                                      QT_PLUGIN_PATH=/home/op/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/
                                      QT_SYSTEM_DIR=/usr/share/desktop-data
                                      SDL_AUDIODRIVER=pulse@
                                      

                                      What’s the relevant lines, what to compare ?
                                      [/quote]

                                      I don't exactly know what environment variables to compare. I hoped the difference would be obvious when you see it.

                                      Try to change "Build Environment" to "Clean Environment" in "Run Environment" section of the Project settings.

                                      1 Reply Last reply Reply Quote 0
                                      • A
                                        andreyc last edited by

                                        [quote author="wally123" date="1398330041"]maybe another hint to get behind what i setup wrong:

                                        When i open examples from Qt 5.2.1 i get :
                                        @.../Examples/basicdrawing/window.cpp:44: error: QtWidgets: No such file or directory
                                        #include <QtWidgets>
                                        ^@
                                        on every single example i tested so far.
                                        [/quote]

                                        I think SGaist is right and you open a Qt4 example.
                                        In Qt5 basicdrawing is located in
                                        @
                                        .../examples/widgets/painting/basicdrawing
                                        @

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          deleted28 last edited by

                                          With "Clean environment" build is ok but run :
                                          @QXcbConnection: Could not connect to display @

                                          When i set to "System Environment" the recently built examples runs without error messages.
                                          No more libGL message.
                                          I'm confused

                                          I think i should delete all configuration files of QtCreator
                                          and restart creator to set all new.
                                          I s this possible ?
                                          Which files to delete ?

                                          1 Reply Last reply Reply Quote 0
                                          • A
                                            andreyc last edited by

                                            [quote author="wally123" date="1398369609"]With "Clean environment" build is ok but run :
                                            @QXcbConnection: Could not connect to display @
                                            [/quote]
                                            It is ok because there is no any X11 settings

                                            [quote author="wally123" date="1398369609"]
                                            When i set to "System Environment" the recently built examples runs without error messages.
                                            No more libGL message.
                                            [/quote]
                                            It confirms the fact that when you run the application from a terminal you don't have this message. So there is something wrong in Build Environment settings. You can compare the settings line by line if you would like.

                                            [quote author="wally123" date="1398369609"]
                                            I think i should delete all configuration files of QtCreator
                                            and restart creator to set all new.
                                            I s this possible ?
                                            Which files to delete ?
                                            [/quote]

                                            Build environment is a per project settings.
                                            I think that you can delete .pro.user file and then open this project again you will have a build environment that is consistent with a system environment.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post