[kde-freebsd] Desktop Effects not working with nvidia-driver

David Naylor dbn at freebsd.org
Mon Jan 18 06:53:15 UTC 2016


Hi,

For the last few months my desktop effects have not been working with OpenGL
due to kwin_opengl_test core dumping.  I have found two possible workarounds:

1) Switch to XRENDER (performance is still good however Blur and other effects
may not work)

2) Override the kwin_opengl_test with the following script:
cat > /usr/local/lib/kde4/libexec/kwin_opengl_test
#!/bin/sh
exit 0
^D

The cause of the crash appears to be during linking, before main() even starts:
# gdb /usr/local/lib/kde4/libexec/kwin_opengl_test kwin_opengl_test.core
GNU gdb 6.1.1 [FreeBSD]
<snip/>
#0  0x000000080060c2a2 in _rtld_is_dlopened () from /libexec/ld-elf.so.1
[New LWP 100463]
(gdb) bt
#0  0x000000080060c2a2 in _rtld_is_dlopened () from /libexec/ld-elf.so.1
#1  0x0000000800605c8d in _r_debug_postinit () from /libexec/ld-elf.so.1
#2  0x000000080060346d in .text () from /libexec/ld-elf.so.1
#3  0x0000000804f3a365 in _nv003glcore () from /usr/local/lib/libnvidia-glcore.so.1
#4  0x0000000804b9e690 in _nv023glcore () from /usr/local/lib/libnvidia-glcore.so.1
#5  0x0000000804f1effc in _nv015glcore () from /usr/local/lib/libnvidia-glcore.so.1
#6  0x0000000801a414eb in glXCreateNewContext () from /usr/local/lib/libGL.so.1
#7  0x0000000801a09e5a in .init () from /usr/local/lib/libGL.so.1
#8  0x0000000800605a9f in r_debug_state () from /libexec/ld-elf.so.1
#9  0x00000008006050ee in __tls_get_addr () from /libexec/ld-elf.so.1
#10 0x0000000800603439 in .text () from /libexec/ld-elf.so.1
#11 0x0000000000000000 in ?? ()

I have no idea how or why this is happening but a solution exists:
 1) CMake is linking kwin_opengl_test to too many libraries (it only needs 
    libGL and libX11).
 2) The error above appears to be because of libXft linking before libGL.  
    Placing libGL before libXft in the linking order fixes the crash (or 
    removing libXft).

See attached for a patch that fixes the linking order.  I'll commit this patch
to ports and area51, and submit a bug report against ld-elf this evening.  

Regards,

David
-------------- next part --------------
--- kwin/opengltest/CMakeLists.txt.orig	2016-01-18 06:47:15 UTC
+++ kwin/opengltest/CMakeLists.txt
@@ -4,7 +4,7 @@ set(kwin_opengl_test_SRCS opengltest.cpp
 
 kde4_add_executable(kwin_opengl_test ${kwin_opengl_test_SRCS})
 
-target_link_libraries(kwin_opengl_test ${X11_LIBRARIES} ${OPENGL_gl_LIBRARY})
+target_link_libraries(kwin_opengl_test ${OPENGL_gl_LIBRARY} ${X11_LIBRARIES})
 
 install(TARGETS kwin_opengl_test DESTINATION ${LIBEXEC_INSTALL_DIR} )
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-freebsd/attachments/20160118/69fd9f14/attachment.sig>


More information about the kde-freebsd mailing list