Failed to load driver: swrast ?
-
Hi,
Not really an answer but what do you get if you start your application with LIBGL_DEBUG=verbose ?
-
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 (?) -
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 -
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. -
[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.
-
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 welcomethis error is only emitted when i use Qt 5.2.1 , not with 4.8.
-
[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
@ -
@> 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 -
[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. -
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 ?
-
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 :( -
Aren't you opening Qt 4's examples ?
-
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.
-
[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.
-
[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
@ -
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 confusedI 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 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. -
Can not get rid of the libGL error, anyway.
I removed qt4.8 kit and lib from Build&Run settings to make things more clear and focus to qt5 only.
Tried several modifications in Build- and Run-environment.
I have no idea what to search for and what causes the error message.
i 'm totally confused now.
Any idea what remains to do highly welcome.