Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with some driver with OpenGL and nvidia
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Fulgurance
l33t
l33t


Joined: 15 Feb 2017
Posts: 655

PostPosted: Tue Feb 25, 2020 11:32 am    Post subject: Problem with some driver with OpenGL and nvidia Reply with quote

Hello, today i work on my Qt project (web browser) to test webengine.Compilation and code are okay, but when run my code, i have problem with OpenGL render. I suspect problem to detect nvidia opengl driver, but i don't know how to solve this problem.

qt-creator use flags:

Code:
zohran@MSI-GS73VR-6RF ~ $ eix qt-creator
[I] dev-qt/qt-creator
     Available versions:  4.8.2^t (~)4.10.1^t **9999*l^t {android +autotest autotools baremetal bazaar beautifier boot2qt +clang clearcase cmake cppcheck ctfvisualizer cvs +designer doc git glsl +help ios lsp mcu mercurial modeling nim perforce perfprofiler python qbs +qmldesigner qmlprofiler qnx remotelinux scxml serialterminal silversearcher subversion systemd test valgrind webassembly +webengine winrt L10N="cs da de fr ja pl ru sl uk zh-CN zh-TW"}
     Installed versions:  4.10.1^t(16:01:30 14/02/2020)(android autotest clang designer git help ios qmldesigner silversearcher valgrind webengine -baremetal -bazaar -beautifier -clearcase -cmake -cppcheck -cvs -doc -glsl -lsp -mercurial -modeling -nim -perforce -perfprofiler -python -qbs -qmlprofiler -qnx -remotelinux -scxml -serialterminal -subversion -systemd -test -winrt L10N="fr -cs -da -de -ja -pl -ru -sl -uk -zh-CN -zh-TW")
     Homepage:            https://doc.qt.io/qtcreator/
     Description:         Lightweight IDE for C++/QML development centering around Qt


nvidia-drivers use flags:
Code:
zohran@MSI-GS73VR-6RF ~ $ eix nvidia-drivers
[I] x11-drivers/nvidia-drivers
     Available versions:  340.108(0/340)^mtd 390.132-r1(0/390)^mtd 430.64-r1(0/430)^mtd 435.21-r1(0/435)^mtd 440.59(0/440)^mtd {+X acpi compat +driver gtk3 +kms libglvnd multilib static-libs +tools uvm wayland ABI_MIPS="n32 n64 o32" ABI_RISCV="lp64 lp64d" ABI_S390="32 64" ABI_X86="32 64 x32" KERNEL="FreeBSD linux"}
     Installed versions:  440.59(0/440)^mtd(13:18:06 24/02/2020)(X acpi compat driver kms uvm -gtk3 -libglvnd -multilib -static-libs -tools -wayland ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" KERNEL="linux -FreeBSD")
     Homepage:            https://www.nvidia.com/
     Description:         NVIDIA Accelerated Graphics Driver


WebBrowser.pro:
Code:
QT += \
    widgets\
    webenginewidgets

SOURCES += \
    Main.cpp


Main.cpp:
Code:
#include <QApplication>
#include <QWebEngineView>

int main(int argc, char *argv[])
{
    QApplication application(argc, argv);
    QWebEngineView webview;
    webview.setUrl(QUrl(QStringLiteral("https://www.google.fr")));
    webview.show();
    return application.exec();
}


Log:

Code:
12:23:25: Starting /home/zohran/WebBrowser/WebBrowser ...
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
QGLXContext: Failed to create dummy context
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
12:23:26: Le programme s'est terminé subitement.
12:23:26: The process was ended forcefully.
12:23:27: /home/zohran/WebBrowser/WebBrowser crashed.


It's not the first time i have problem with OpenGL rendering with my nvidia graphic card. For information, my video card have optimus technology, and Xorg is configured to use only nvidia card.
It's strange, but when i run program without Qt IDE, program work ???
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 448

PostPosted: Fri Feb 28, 2020 7:45 am    Post subject: Reply with quote

I tried and got the same results, tried release/debug. ( I have qt-creator from qt.io bc I had some other problems with portage version )

Just use KDevelop, its works ok there.
_________________
Sent from Windows
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum