请为我的系统推荐合适的图形驱动程序。我使用的是 Ubuntu 16.04 LTS 版本。这些是我的(HP Pavilion 笔记本 - 15-ab516tx 产品规格)笔记本电脑配置我有 Nvidia GeForce 940M 显卡。目前,我已从 nvidia-370 安装了 370.28 版本,但在运行 open-GL 代码时遇到了很多问题。在运行可执行文件时,程序会中断并在控制台上输出内容。但是,如果我尝试运行可执行文件 5-6 次,它有时会运行。
尽管我已将当前驱动程序版本替换为 nvidia 367.44。我在运行可执行文件时遇到了以下输出。但如果我以 root 身份运行它,则相同的可执行文件可以正常工作。
shikhar@:~/Documents$ ./main ./input.off
GL version: 4.5.0 NVIDIA 367.44
*** Error in `./main': malloc(): memory corruption: 0x00000000016021a0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7f43df580725]
/lib/x86_64-linux-gnu/libc.so.6(+0x819be)[0x7f43df58a9be]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7f43df58c5a4]
/usr/lib/nvidia-367/tls/libnvidia-tls.so.367.44(+0x24c0)[0x7f43dd91d4c0]
======= Memory map: ========
00400000-00405000 r-xp 00000000 08:07 8126573 /home/shikhar/Documents/CG/Assignment_1/main
00604000-00605000 r--p 00004000 08:07 8126573 /home/shikhar/Documents/CG/Assignment_1/main
00605000-00606000 rw-p 00005000 08:07 8126573 /home/shikhar/Documents/CG/Assignment_1/main
01386000-0318c000 rw-p 00000000 00:00 0 [heap]
40295000-40297000 r-xs 00000000 08:07 17432597 /tmp/.glVlOz4d (deleted)
419b5000-41a55000 rw-p 00000000 00:00 0
7f43d4000000-7f43d4021000 rw-p 00000000 00:00 0
7f43d4021000-7f43d8000000 ---p 00000000 00:00 0
7f43db32f000-7f43db735000 rw-p 00000000 00:00 0
7f43db735000-7f43db775000 rw-s 00000000 08:07 7079953 /home/shikhar/.glvndAzpml8 (deleted)
7f43db775000-7f43db7b5000 r-xs 00000000 08:07 7079953 /home/shikhar/.glvndAzpml8 (deleted)
7f43db7b5000-7f43db835000 rw-s 270850000 00:06 477 /dev/nvidiactl
7f43db835000-7f43db8b5000 rw-s 22fa47000 00:06 477 /dev/nvidiactl
7f43db8b5000-7f43db935000 rw-s 222576000 00:06 477 /dev/nvidiactl
7f43db935000-7f43dba35000 rw-s 23110e000 00:06 477 /dev/nvidiactl
7f43dba35000-7f43dba48000 rw-s 1fd2d0000 00:06 477 /dev/nvidiactl
7f43dba48000-7f43dba68000 rw-s 800e0000 00:06 567 /dev/nvidia0
7f43dba68000-7f43dbaa8000 rw-s 654ec000 00:06 477 /dev/nvidiactl
7f43dbaa8000-7f43dbac8000 rw-s 588cc000 00:06 477 /dev/nvidiactl
7f43dbac8000-7f43dbb08000 rw-s 65fa1000 00:06 477 /dev/nvidiactl
7f43dbb08000-7f43dbb28000 rw-s 35216000 00:06 477 /dev/nvidiactl
7f43dbb28000-7f43dbbe2000 rw-p 00000000 00:00 0
7f43dbbe2000-7f43dcf7b000 r-xp 00000000 08:07 3420394 /usr/lib/nvidia-367/libnvidia-glcore.so.367.44
7f43dcf7b000-7f43dcf9b000 rwxp 01399000 08:07 3420394 /usr/lib/nvidia-367/libnvidia-glcore.so.367.44
7f43dcf9b000-7f43dd33b000 r-xp 013b9000 08:07 3420394 /usr/lib/nvidia-367/libnvidia-glcore.so.367.44
7f43dd33b000-7f43dd53b000 ---p 01759000 08:07 3420394 /usr/lib/nvidia-367/libnvidia-glcore.so.367.44
7f43dd53b000-7f43dd903000 rw-p 01759000 08:07 3420394 /usr/lib/nvidia-367/libnvidia-glcore.so.367.44
7f43dd903000-7f43dd91b000 rw-p 00000000 00:00 0
7f43dd91b000-7f43dd91e000 r-xp 00000000 08:07 3420390 /usr/lib/nvidia-367/tls/libnvidia-tls.so.367.44
7f43dd91e000-7f43ddb1e000 ---p 00003000 08:07 3420390 /usr/lib/nvidia-367/tls/libnvidia-tls.so.367.44
7f43ddb1e000-7f43ddb1f000 rw-p 00003000 08:07 3420390 /usr/lib/nvidia-367/tls/libnvidia-tls.so.367.44
7f43ddb1f000-7f43ddbe7000 r-xp 00000000 08:07 3420414 /usr/lib/nvidia-367/libGLX_nvidia.so.367.44
7f43ddbe7000-7f43ddc1b000 rwxp 000c8000 08:07 3420414 /usr/lib/nvidia-367/libGLX_nvidia.so.367.44
7f43ddc1b000-7f43ddc2e000 r-xp 000fc000 08:07 3420414 /usr/lib/nvidia-367/libGLX_nvidia.so.367.44
7f43ddc2e000-7f43dde2e000 ---p 0010f000 08:07 3420414 /usr/lib/nvidia-367/libGLX_nvidia.so.367.44
7f43dde2e000-7f43dde56000 rw-p 0010f000 08:07 3420414 /usr/lib/nvidia-367/libGLX_nvidia.so.367.44
7f43dde56000-7f43dde5d000 rw-p 00000000 00:00 0
7f43dde5d000-7f43dde62000 r-xp 00000000 08:07 3415832 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f43dde62000-7f43de061000 ---p 00005000 08:07 3415832 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f43de061000-7f43de062000 r--p 00004000 08:07 3415832 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f43de062000-7f43de063000 rw-p 00005000 08:07 3415832 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f43de063000-7f43de065000 r-xp 00000000 08:07 3415821 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f43de065000-7f43de265000 ---p 00002000 08:07 3415821 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f43de265000-7f43de266000 r--p 00002000 08:07 3415821 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f43de266000-7f43de267000 rw-p 00003000 08:07 3415821 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f43de267000-7f43de288000 r-xp 00000000 08:07 3417199 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f43de288000-7f43de487000 ---p 00021000 08:07 3417199 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f43de487000-7f43de488000 r--p 00020000 08:07 3417199 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f43de488000-7f43de489000 rw-p 00021000 08:07 3417199 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f43de489000-7f43de49a000 r-xp 00000000 08:07 3415834 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f43de49a000-7f43de699000 ---p 00011000 08:07 3415834 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f43de699000-7f43de69a000 r--p 00010000 08:07 3415834 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f43de69a000-7f43de69b000 rw-p 00011000 08:07 3415834 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f43de69b000-7f43de6a0000 r-xp 00000000 08:07 3415870 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
7f43de6a0000-7f43de89f000 ---p 00005000 08:07 3415870 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
7f43de89f000-7f43de8a0000 r--p 00004000 08:07 3415870 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
7f43de8a0000-7f43de8a1000 rw-p 00005000 08:07 3415870 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
7f43de8a1000-7f43de8b0000 r-xp 00000000 08:07 3415842 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7f43de8b0000-7f43deaaf000 ---p 0000f000 08:07 3415842 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7f43deaaf000-7f43deab0000 r--p 0000e000 08:07 3415842 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7f43deab0000-7f43deab1000 rw-p 0000f000 08:07 3415842 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7f43deab1000-7f43debe6000 r-xp 00000000 08:07 3415817 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f43debe6000-7f43dede6000 ---p 00135000 08:07 3415817 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f43dede6000-7f43dede7000 r--p 00135000 08:07 3415817 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f43dede7000-7f43dedeb000 rw-p 00136000 08:07 3415817 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f43dedeb000-7f43dee39000 r-xp 00000000 08:07 3420392 /usr/lib/nvidia-367/libGLdispatch.so.0
7f43dee39000-7f43dee6b000 r-xp 0004e000 08:07 3420392 /usr/lib/nvidia-367/libGLdispatch.so.0
7f43dee6b000-7f43deea5000 r-xp 00080000 08:07 3420392 /usr/lib/nvidia-367/libGLdispatch.so.0
7f43deea5000-7f43df0a5000 ---p 000ba000 08:07 3420392 /usr/lib/nvidia-367/libGLdispatch.so.0
7f43df0a5000-7f43df0b4000 rw-p 000ba000 08:07 3420392 /usr/lib/nvidia-367/libGLdispatch.so.0
7f43df0b4000-7f43df0d4000 rw-p 00000000 00:00 0
7f43df0d4000-7f43df0e4000 r-xp 00000000 08:07 3415885 /usr/lib/nvidia-367/libGLX.so.0
7f43df0e4000-7f43df2e4000 ---p 00010000 08:07 3415885 /usr/lib/nvidia-367/libGLX.so.0
7f43df2e4000-7f43df2e5000 rw-p 00010000 08:07 3415885 /usr/lib/nvidia-367/libGLX.so.0
7f43df2e5000-7f43df305000 rw-p 00000000 00:00 0
7f43df305000-7f43df308000 r-xp 00000000 08:07 16781721 /lib/x86_64-linux-gnu/libdl-2.23.so
7f43df308000-7f43df507000 ---p 00003000 08:07 16781721 /lib/x86_64-linux-gnu/libdl-2.23.so
7f43df507000-7f43df508000 r--p 00002000 08:07 16781721 /lib/x86_64-linux-gnu/libdl-2.23.so
7f43df508000-7f43df509000 rw-p 00003000 08:07 16781721 /lib/x86_64-linux-gnu/libdl-2.23.so
7f43df509000-7f43df6c9000 r-xp 00000000 08:07 16781697 /lib/x86_64-linux-gnu/libc-2.23.so
7f43df6c9000-7f43df8c8000 ---p 001c0000 08:07 16781697 /lib/x86_64-linux-gnu/libc-2.23.so
7f43df8c8000-7f43df8cc000 r--p 001bf000 08:07 16781697 /lib/x86_64-linux-gnu/libc-2.23.so
7f43df8cc000-7f43df8ce000 rw-p 001c3000 08:07 16781697 /lib/x86_64-linux-gnu/libc-2.23.so
7f43df8ce000-7f43df8d2000 rw-p 00000000 00:00 0
7f43df8d2000-7f43df8e8000 r-xp 00000000 08:07 16781735 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f43df8e8000-7f43dfae7000 ---p 00016000 08:07 16781735 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f43dfae7000-7f43dfae8000 rw-p 00015000 08:07 16781735 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f43dfae8000-7f43dfbf0000 r-xp 00000000 08:07 16781767 /lib/x86_64-linux-gnu/libm-2.23.so
7f43dfbf0000-7f43dfdef000 ---p 00108000 08:07 16781767 /lib/x86_64-linux-gnu/libm-2.23.so
7f43dfdef000-7f43dfdf0000 r--p 00107000 08:07 16781767 /lib/x86_64-linux-gnu/libm-2.23.so
7f43dfdf0000-7f43dfdf1000 rw-p 00108000 08:07 16781767 /lib/x86_64-linux-gnu/libm-2.23.so
7f43dfdf1000-7f43dff63000 r-xp 00000000 08:07 3409918 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f43dff63000-7f43e0163000 ---p 00172000 08:07 3409918 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f43e0163000-7f43e016d000 r--p 00172000 08:07 3409918 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f43e016d000-7f43e016f000 rw-p 0017c000 08:07 3409918 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f43e016f000-7f43e0173000 rw-p 00000000 00:00 0
7f43e0173000-7f43e01b3000 r-xp 00000000 08:07 3412723 /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0
7f43e01b3000-7f43e03b2000 ---p 00040000 08:07 3412723 /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0
7f43e03b2000-7f43e03b6000 r--p 0003f000 08:07 3412723 /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0
7f43e03b6000-7f43e03bb000 rw-p 00043000 08:07 3412723 /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0
7f43e03bb000-7f43e0432000 r-xp 00000000 08:07 3415675 /usr/lib/x86_64-linux-gnu/libGLEW.so.1.13.0
7f43e0432000-7f43e0631000 ---p 00077000 08:07 3415675 /usr/lib/x86_64-linux-gnu/libGLEW.so.1.13.0
7f43e0631000-7f43e0638000 r--p 00076000 08:07 3415675 /usr/lib/x86_64-linux-gnu/libGLEW.so.1.13.0
7f43e0638000-7f43e0639000 rw-p 0007d000 08:07 3415675 /usr/lib/x86_64-linux-gnu/libGLEW.so.1.13.0
7f43e0639000-7f43e063e000 rw-p 00000000 00:00 0
7f43e063e000-7f43e066f000 r-xp 00000000 08:07 3420386 /usr/lib/nvidia-367/libGL.so.1.0.0
7f43e066f000-7f43e06a1000 r-xp 00031000 08:07 3420386 /usr/lib/nvidia-367/libGL.so.1.0.0
7f43e06a1000-7f43e06cb000 r-xp 00063000 08:07 3420386 /usr/lib/nvidia-367/libGL.so.1.0.0
7f43e06cb000-7f43e08cb000 ---p 0008d000 08:07 3420386 /usr/lib/nvidia-367/libGL.so.1.0.0
7f43e08cb000-7f43e08cc000 rw-p 0008d000 08:07 3420386 /usr/lib/nvidia-367/libGL.so.1.0.0
7f43e08cc000-7f43e08cd000 rw-p 00000000 00:00 0
7f43e08cd000-7f43e08dd000 r-xp 00000000 08:07 16781669 /lib/x86_64-linux-gnu/ld-2.23.so
7f43e08dd000-7f43e08de000 r-xp 00010000 08:07 16781669 /lib/x86_64-linux-gnu/ld-2.23.so
7f43e08de000-7f43e08f3000 r-xp 00011000 08:07 16781669 /lib/x86_64-linux-gnu/ld-2.23.so
7f43e08f5000-7f43e09be000 rw-p 00000000 00:00 0
7f43e09be000-7f43e0ac2000 rw-s 2768e2000 00:06 477 /dev/nvidiactl
7f43e0ac2000-7f43e0acd000 rw-p 00000000 00:00 0
7f43e0ad1000-7f43e0ad2000 rw-p 00000000 00:00 0
7f43e0ad2000-7f43e0ad4000 rw-s 00000000 08:07 17432597 /tmp/.glVlOz4d (deleted)
7f43e0ad4000-7f43e0ad5000 rw-s 1fd39f000 00:06 477 /dev/nvidiactl
7f43e0ad5000-7f43e0ad9000 rw-s 214058000 00:06 477 /dev/nvidiactl
7f43e0ad9000-7f43e0aec000 rw-p 00000000 00:00 0
7f43e0aec000-7f43e0aed000 rw-s 8fee4000 00:06 567 /dev/nvidia0
7f43e0aed000-7f43e0aee000 rw-s 8fee4000 00:06 567 /dev/nvidia0
7f43e0aee000-7f43e0aef000 rw-s 6ee2b000 00:06 477 /dev/nvidiactl
7f43e0aef000-7f43e0af0000 rw-s 93060000 00:06 567 /dev/nvidia0
7f43e0af0000-7f43e0af2000 rw-p 00000000 00:00 0
7f43e0af2000-7f43e0af3000 r--p 00025000 08:07 16781669 /lib/x86_64-linux-gnu/ld-2.23.so
7f43e0af3000-7f43e0af4000 rw-p 00026000 08:07 16781669 /lib/x86_64-linux-gnu/ld-2.23.so
7f43e0af4000-7f43e0af5000 rw-p 00000000 00:00 0
7fffb404a000-7fffb406b000 rw-p 00000000 00:00 0 [stack]
7fffb40d8000-7fffb40da000 r--p 00000000 00:00 0 [vvar]
7fffb40da000-7fffb40dc000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted (core dumped)
答案1
Stephen Angelico 表示,该系统的正确驱动程序版本是 nvidia-367.44。我的系统使用该版本运行良好。