zoukankan      html  css  js  c++  java
  • ubuntu下终于安装好了nvidia的gt540显卡驱动

    ubuntu下终于安装好了nvidia的gt540显卡驱动。估计好多童鞋怕麻烦都放弃安装了哈。

    先看看效果。

    ~$ lspci |grep -i vga
    00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M] (rev ff)

    期间遇到了很多问题,记录一下。

    参考链接:【使用 Bumblebee 控制 NVIDIA 双显卡(Ubuntu)】  http://www.linuxidc.com/Linux/2012-09/70418.htm

    跟到第五部分:“测试效果”的时候,和作者描述的不同了,出现了一个问题:

    执行 optirun glxgears 提示错误:

    [ERROR]Cannot access secondary GPU - error: [XORG] (EE) No devices detected.

    [ERROR]Aborting because fallback start is disabled.

    然后继续查找资料,发现都是修改busid的pci编号。

    如:http://www.linuxidc.com/Linux/2013-07/87369.htm

           http://forum.ubuntu.org.cn/viewtopic.php?f=42&p=2986284

    可是我的配置文件是对的,和他们问题的并不一样,无奈,继续查找资料。

    没头绪了,注销、重启、重装,各种折腾。

    又跟着 http://www.linuxidc.com/Linux/2012-09/70418.htm 重复做了一遍,这次多更新了下pci信息

    sudo update-pciids

    这时,问题不同了。

    [ERROR]Cannot access secondary GPU, secondary X is not active.

    又搜索了一番,还是没找到解决办法,差点儿要放弃了。突然想起安装系统的时候有个ask ubuntu。

    找到了http://askubuntu.com/questions/295270/failing-to-initialize-nvidia-gpu

    终于看到了一个不同的解决方法,顿时窃喜,怎么也得试一把。【PS:百度找到的真是千篇一律,google又无奈被强~~~ 只能呵呵了】

    In order to fix my problem in Ubuntu 13.04, I performed the following:

    sudo add-apt-repository ppa:xorg-edgers/ppa
    sudo apt-get update
    sudo apt-get install nvidia-319

    I then installed bumblebee by the method described by the wiki: https://wiki.ubuntu.com/Bumblebee

    To test, I installed mesa-utils, and ran optirun glxgears with great success!

    The only thing I would like to check now is whether the bumblebee version offered as default by the repro is the latest 3.2.1 released on the 26th of April. Either way it is not a hassle to upgrade.

    ubuntu13和14的驱动差别应该不大,顺便看了下nvidia-319不是最新版本的。 去nvidia看了下,331很新。

    sudo add-apt-repository ppa:xorg-edgers/ppa
    sudo apt-get update
    sudo apt-get install nvidia-331

    哈哈,安装、重启,再次查看vga信息。

    lspci | grep -i vga
    00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M] (rev ff)

    (rev ff)   貌似成功了。

    测试一下:

    optirun glxgears

    继续:

    打开n卡设置:

    optirun nvidia-settings -c :8

    都ok了。

    bumblebee的作用是禁用nvidia独立显卡,需要使用独显时,使用”optirun 程序名“手动开启nvidia来运行需要加速的程序。

    如optirun vmware

    驱动到此全部安装好了,感触很多哇。千万不要轻言放弃。

  • 相关阅读:
    Vue技巧小结(持续更新)
    Vue+Webpack常见问题(持续更新)
    webpack模块定义和使用的模式
    vue-cli笔记
    新浪微博怎么知道你没登录
    jquery页面水印插件,支持多行水印、行错开
    浏览器并发连接数(未完成)
    HTTP1.0 、1.1
    你总说时间很少
    看小说的这些年
  • 原文地址:https://www.cnblogs.com/lovelp/p/3855959.html
Copyright © 2011-2022 走看看