注:本解决方案适用于使用N卡的PC

出现该错误 , 一般是由于开源的nouveau驱动和Nvidia专有驱动冲突导致的 。在解决该问题时 , 尝试过卸载 N 卡专有驱动 , 仅使用开源nouveau驱动 ,

这样做以后这个错误是没有了, 但是OpenGL代码执行起来以后出现了各种问题 , 对 shader 支持也不好 , 使用的时候会提示 仅支持低版本的 GLSL , 通过

调用 glutInitContextVersion 指定了 OpenGL 版本后 错误提示没有了 , 但是程序还是不能正常工作 。 最后选择卸载 nouveau , 转而使用 N 卡 专有驱动 。

  卸载 nouveau 驱动的 步骤如下:

    

Before starting, you might want to know that nouveau is a project which aims to develop open source drivers for Nvidia cards. When you install Ubuntu, it detects your card and installs these drivers.

Please note that, nouveau drivers manual removal is required only if you are going to install the propreitary nvidia drivers yourself. If this is not the case then directly install the required graphic drivers from System->Administration->Hardware drivers. Its the recommended and the most convenient way available.

For our little endeavour, here is what we are going to do.

    We'll blacklist all the culprit modules,
remove all the nvidia* packages and
as an extra step we may have to update the initramfs disk because it could be configured to load the modules at startup. 1) Blacklist the modules. Open the blacklist.conf file. [shredder12]$ sudo vim /etc/modprobe.d/blacklist.conf add the following modules in the file. blacklist amd76x_edac #this might not be required for x86 32 bit users.
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv Save the file and exit. 2) Remove all the nvidia* packages [shredder12]$ sudo apt-get remove --purge nvidia* 3) Once you are done with the steps above, reboot, stop the display manager and try to install nvidia drivers. Press Ctrl-Alt-F1. Once you are in the text mode, stop the display manager. This will end all the applications, so you better close them yourself before completing this step. To stop the display manager use the following command [shredder12]$ sudo /etc/init.d/gdm stop gdm is for gnome display manager. If you are using kde then use “kdm”. Now, run the driver package that you downloaded from Nvidia’s website. [shredder12]$ sudo ./NVIDIA-Linux-x86-260.19.44.run 4) If you still get the error related to nouveau drivers then you are probably required to update the initramfs disk. Probably it might be configured to load the nouveau drivers. Don't reboot or poweroff, run this command to update the initramfs disk. [shredder12]$ sudo update-initramfs -u Now reboot and repeat the step 3. This time things should go smoothly.

换上了专有驱动后 , 在 编译选项中 指定 -L/usr/lib/nvidia-xxx/ , 让链接器链接专有驱动提供的OpenGL库 , 问题解决 。

最新文章

  1. 修改 EF的默认连接工厂为 Sql Server 而不是LocalDb
  2. Ubuntu 14.04 安装VMware 12
  3. Linux aclocal
  4. No.3__C#
  5. (转)SQL Server 中的事务和锁(三)-Range S-U,X-X 以及死锁
  6. 【LeetCode】3.Longest Substring Without Repeating Characters 最长无重复子串
  7. easy ui 菜单和按钮(Menu and Button)
  8. MyBatis源码解读(4)——SqlSession(上)
  9. tcp入门(唐唐的故事)
  10. node.js后台快速搭建在阿里云(二)(pm2和nginx篇)
  11. Linux suse 11 sp1 安装教程
  12. 让Python代码更快运行的 5 种方法
  13. 微信小程序富文本中的图片大小超出屏幕
  14. 洛谷2971 [USACO10HOL]牛的政治Cow Politics
  15. Ubuntu 搜狗输入法崩溃 重启办法
  16. CAS-自旋锁
  17. 对象字典0x1005和0x1006的理解
  18. SSIS 学习之旅 FTP访问类
  19. JS图片滚动代码(无缝、平滑)
  20. python https协议和InsecurePlatformWarning问题

热门文章

  1. incredibuild agent service is not running
  2. mybatis xml的无效判空
  3. hive-1.2.1安装步骤
  4. 对dpkg: error processing package xxx (--configure) 的处理
  5. java-成员方法/变量、类方法/变量等区别
  6. 生成扫描二维码下载app的二维码的方法
  7. 2016腾讯we大会的时间——2016年11月6日
  8. 明天学习一下验证码的匹配和thinkphp第十三章
  9. ggplot2 theme相关设置—文本调整
  10. CentOS6.4安装go环境