debian如何安装合适的显卡驱动

最大的社区版本,Ubuntu的发源地
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

debian如何安装合适的显卡驱动

#1

帖子 yangdawei.hit » 2015-09-25 7:11

笔记本:Thinkpad T430u
系统: Debian Jessie
显卡:独显 NVIDIA Quadro NVS 5400M 和 集成 intel


感觉本子温度稍高,风扇稍快。本不碍事,但估计是使用Debian的默认驱动,致显卡没有安装的驱动所致。查看显卡,显示

代码: 全选

 lspci -nn | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)
安装nvidia-detect查看检测显卡,显示

代码: 全选

No NVIDIA GPU detected.
请问如何驱动检测不到的Nvidia显卡呢?

参考:https://wiki.debian.org/NvidiaGraphicsDrivers
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: debian如何安装合适的显卡驱动

#2

帖子 poloshiao » 2015-09-25 8:20

把下面指令 複製 貼進終端機 執行
1-1. uname -r
1-2. sudo lspci -knn
1-3. sudo lshw -numeric -class video
把結果直接 選取/複製 貼上來
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: debian如何安装合适的显卡驱动

#3

帖子 vickycq » 2015-09-25 8:56

对双显卡配置不熟,提醒几点:
1. 对图形性能要求不高可直接禁用独显
2. (曾经?) 流行的独立N卡双显卡切换工具 Bumblebee 已逾两年未获得更新。( 最后一次 commit 在 Apr 26, 2013 )
3. 折腾双显卡时,整机功率是一个很好的指标:
3-1. 安装 powerstat : sudo apt install powerstat
3-2. 断开外接电源,关闭带flash浏览器等消耗资源的应用,运行 powerstat -d 0 观察电池的放电功率
3-3. 一般来说,独立显卡得到合适驱动后整机功率应有 4~6W 的降低。以前我的一台 Y460 独显未驱动 ~26W,驱动后 ~18W。
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: debian如何安装合适的显卡驱动

#4

帖子 yangdawei.hit » 2015-09-25 15:49

运行 powerstat -d 0 观察电池的放电功率

代码: 全选

 Time    User  Nice   Sys  Idle    IO  Run Ctxt/s  IRQ/s  Watts
15:45:00  14.7   0.0  11.3  73.8   0.2    2    793    501  19.92
15:45:10  15.0   0.0  11.0  73.5   0.4    2    795    486  19.87
15:45:20  14.8   0.0  10.5  74.6   0.1    2    662    460  20.02
15:45:30  15.0   0.0  10.4  74.6   0.0    2    754    476  19.86
15:45:40  14.9   0.0  10.9  74.2   0.0    2   1011    494  21.93
15:45:50  14.7   0.0  10.7  74.6   0.0    2    753    471  19.97
15:46:00  15.3   0.0  10.8  73.7   0.2    2    945    556  20.12
15:46:10  15.0   0.0  11.0  73.5   0.5    2   1014    502  20.16
15:46:20  15.4   0.0  10.8  73.6   0.2    2   1302    524  20.37
15:46:30  14.9   0.0  10.5  74.5   0.1    2    757    481  20.05
15:46:40  14.3   0.0  11.0  74.7   0.0    2    657    468  20.07
15:46:50  14.6   0.0  10.7  74.7   0.0    2    961    490  20.07
-------- ----- ----- ----- ----- ----- ---- ------ ------ ------
 Average  14.9   0.0  10.8  74.2   0.2  2.0  867.0  492.3  20.20
  StdDev   0.3   0.0   0.2   0.5   0.2  0.0  178.1   25.4   0.54
-------- ----- ----- ----- ----- ----- ---- ------ ------ ------
 Minimum  14.3   0.0  10.4  73.5   0.0  2.0  657.3  460.4  19.86
 Maximum  15.4   0.0  11.3  74.7   0.5  2.0 1302.1  555.9  21.93
-------- ----- ----- ----- ----- ----- ---- ------ ------ ------
Summary:
 20.20 Watts on Average with Standard Deviation 0.54  

这是否意味着显卡原本是正常驱动呢?无论如何,我准备按poloshiao兄的指导折腾一下。
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: debian如何安装合适的显卡驱动

#5

帖子 yangdawei.hit » 2015-09-25 15:51

uname -r

代码: 全选

3.16.0-4-amd64
sudo lspci -knn

代码: 全选

00:00.0 Host bridge [0600]: Intel Corporation 3rd Gen Core processor DRAM Controller [8086:0154] (rev 09)
	Subsystem: Lenovo Device [17aa:500c]
	Kernel driver in use: ivb_uncore
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port [8086:0151] (rev 09)
	Kernel driver in use: pcieport
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)
	Subsystem: Lenovo Device [17aa:500d]
	Kernel driver in use: i915
00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04)
	Subsystem: Lenovo Device [17aa:500c]
	Kernel driver in use: xhci_hcd
00:16.0 Communication controller [0780]: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 [8086:1e3a] (rev 04)
	Subsystem: Lenovo Device [17aa:500c]
	Kernel driver in use: mei_me
00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04)
	Subsystem: Lenovo Device [17aa:500c]
	Kernel driver in use: ehci-pci
00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20] (rev 04)
	Subsystem: Lenovo Device [17aa:500c]
	Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4)
	Kernel driver in use: pcieport
00:1c.1 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 [8086:1e12] (rev c4)
	Kernel driver in use: pcieport
00:1c.2 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 [8086:1e14] (rev c4)
	Kernel driver in use: pcieport
00:1c.3 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 4 [8086:1e16] (rev c4)
	Kernel driver in use: pcieport
00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04)
	Subsystem: Lenovo Device [17aa:500c]
	Kernel driver in use: ehci-pci
00:1f.0 ISA bridge [0601]: Intel Corporation UM77 Express Chipset LPC Controller [8086:1e58] (rev 04)
	Subsystem: Lenovo Device [17aa:500c]
	Kernel driver in use: lpc_ich
00:1f.2 IDE interface [0101]: Intel Corporation 7 Series Chipset Family 4-port SATA Controller [IDE mode] [8086:1e01] (rev 04)
	Subsystem: Lenovo Device [17aa:500c]
	Kernel driver in use: ata_piix
00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller [8086:1e22] (rev 04)
	Subsystem: Lenovo Device [17aa:500c]
00:1f.5 IDE interface [0101]: Intel Corporation 7 Series Chipset Family 2-port SATA Controller [IDE mode] [8086:1e09] (rev 04)
	Subsystem: Lenovo Device [17aa:500c]
	Kernel driver in use: ata_piix
01:00.0 3D controller [0302]: NVIDIA Corporation GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] [10de:1140] (rev a1)
	Subsystem: Lenovo GeForce GT 620M [17aa:500d]
	Kernel driver in use: nouveau
03:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)
	Subsystem: Broadcom Corporation Device [14e4:0608]
	Kernel driver in use: bcma-pci-bridge
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader [10ec:5209] (rev 01)
	Subsystem: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader [10ec:5209]
	Kernel driver in use: rtsx_pci
04:00.1 SD Host controller [0805]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader [10ec:5209] (rev 01)
	Subsystem: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader [10ec:5209]
	Kernel driver in use: sdhci-pci
09:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 07)
	Subsystem: Lenovo Device [17aa:500c]
	Kernel driver in use: r8169
sudo lshw -numeric -class video

代码: 全选

  *-display               
       description: 3D controller
       product: GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] [10DE:1140]
       vendor: NVIDIA Corporation [10DE]
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: driver=nouveau latency=0
       resources: irq:47 memory:f2000000-f2ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:5000(size=128)
  *-display
       description: VGA compatible controller
       product: 3rd Gen Core processor Graphics Controller [8086:166]
       vendor: Intel Corporation [8086]
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:46 memory:f3000000-f33fffff memory:d0000000-dfffffff ioport:6000(size=64)
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: debian如何安装合适的显卡驱动

#6

帖子 poloshiao » 2015-09-25 18:50

请问如何驱动检测不到的Nvidia显卡呢?
显卡:独显 NVIDIA Quadro NVS 5400M 和 集成 intel
1. sudo lspci -knn
01:00.0 3D controller [0302]: NVIDIA Corporation GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] [10de:1140] (rev a1)
Subsystem: Lenovo GeForce GT 620M [17aa:500d]
1-1. 請確認 顯卡型號
uname -r
3.16.0-4-amd64
2. https://packages.debian.org/jessie/linu ... .0-4-amd64
Debian 版本 jessie
sudo lshw -numeric -class video
product: GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] [10DE:1140]
configuration: driver=nouveau latency=0
product: 3rd Gen Core processor Graphics Controller [8086:166]
configuration: driver=i915 latency=0
3. 雙顯卡
3-1. nVidia GF117M 目前驅動 開源 nouveau
3-2. 也可以安裝 閉源驅動 nvidia 參見
https://wiki.debian.org/NvidiaGraphicsD ... 2Jessie.22

4. 雙顯卡 如果同時 啟動 需要安裝 Bumblebee
https://wiki.debian.org/Bumblebee#Bumblebee_Project
For Sid and Jessie users, Bumblebee packages are available directly from the Debian repositories, head down to the Installation section. In summary, it's as simple as installing bumblebee or bumblebee-nvidia, and primus.
4-1. 安裝 Bumblebee 參閱
https://wiki.debian.org/Bumblebee#Installation
4-2. 注意 開源 nouveau 或 閉源驅動 nvidia
安裝 Bumblebee 稍有差異

5. 有問題 歡迎再貼文
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: debian如何安装合适的显卡驱动

#7

帖子 vickycq » 2015-09-25 20:04

1.
N卡的开源驱动性能较差,电源管理也较差。参见 https://linuxtoy.org/archives/compare-l ... -gpus.html 这篇文章虽写于2012年,但最近三年除了AMD开源驱动进步明显外,其它没什么变化。

2.
直接安装 bumblebee-nvidia 这个虚包,会将闭源驱动一起安装上。

3.
注意 https://wiki.debian.org/Bumblebee#Installation 的警告:
Warning: If you choose to install bumblebee-nvidia and the dependent nvidia driver packages, during postinst, you will see a debconf prompt warning you that you need to create a xorg.conf file in order to use the proprietary nvidia driver. This prompt only applies to non-Optimus users, i.e. single Nvidia GPU systems. Do NOT allow debconf to create a xorg.conf file, and do NOT run nvidia-xconfig! (This prompt always appears when you install nvidia packages through the repositories, and it currently does not detect Optimus/bumblebee users. See 735049 for a brief explanation.)

警告:如果安装 bumblebee-nvidia 和 nvidia 闭源驱动,安装进行到 postinst 阶段时,会提示是否自动创建 xorg.conf。若你是双显卡用户,不要令其自动创建 xorg.conf!不要运行nvidia-xconfig!自动创建的 xorg.conf 只对单N卡用户有效。具体参见https://bugs.debian.org/cgi-bin/bugrepo ... bug=735049

目前来看此bug尚未关闭。
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: debian如何安装合适的显卡驱动

#8

帖子 yangdawei.hit » 2015-09-25 21:17

这条消息来得真及时,我比较粗心,还没看Bumelbee的信息就草率安装nvidia驱动了。然后按https://wiki.debian.org/NvidiaGraphicsD ... 2Jessie.22提示建立了 xorg.conf。结果开机进入不了桌面了。然后进入命令行模式,删除了该文件再重启才恢复正常 。
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: debian如何安装合适的显卡驱动

#9

帖子 yangdawei.hit » 2015-09-25 21:19

不过令我感到困惑的是:如果默认正常安装了集成intel显卡,那本子的温度应该是比较低的,为什么一直显示是60度呢?我觉得50度才算正常。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: debian如何安装合适的显卡驱动

#10

帖子 poloshiao » 2015-09-25 21:38

如果默认正常安装了集成intel显卡,那本子的温度应该是比较低的,为什么一直显示是60度呢?我觉得50度才算正常。
1. 參閱
https://wiki.debian.org/Bumblebee#Power_Management
Power Management

2. 試試 acpi_call
https://help.ubuntu.com/community/Hybri ... #acpi_call
If you just want to have long battery life and slow temperature, you can use acpi_call: a linux kernel module that enables calls to ACPI. With acpi_call_GUI you can easily install and configure it via graphic interface.
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: debian如何安装合适的显卡驱动

#11

帖子 yangdawei.hit » 2015-09-25 21:41

观察了一会儿,又变成了49度了。刚才安装了 bumblebee-nvidia ,但重启后仅在应用菜单中看到了NVIDIA Server Settings项,点击弹出消息称

代码: 全选

You do not appear to be using the NVIDIA X driver.
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: debian如何安装合适的显卡驱动

#12

帖子 poloshiao » 2015-09-25 21:59

重启后仅在应用菜单中看到了NVIDIA Server Settings项,点击弹出消息称

代码: 全选

You do not appear to be using the NVIDIA X driver.
1. http://forums.debian.net/viewtopic.php? ... 63#p568704
独立N卡双显卡切换工具 Bumblebee 已逾两年未获得更新。( 最后一次 commit 在 Apr 26, 2013 )
2. 如果在 Debian Jessie 安裝 Bumblebee 一直不滿意
試試 在 Ubuntu 使用 雙顯卡
2-1. https://wiki.ubuntu.com/X/Config/HybridGraphics
2-1-1. 自從 Ubuntu 13.10 或 12.04.3 LTS 以後的版本
Linux kernel 直接支援 雙顯卡
不需再安裝第三方軟件 Bumblebee
但是 nVidia 最好是 安裝 閉源驅動 nvidia
2-1-2. 從 Ubuntu 套件庫 安裝 閉源驅動 nvidia
https://help.ubuntu.com/community/Binar ... wto/Nvidia
2-1-3. 從 nVidia 官網安裝 閉源驅動 nvidia
https://help.ubuntu.com/community/NvidiaManual
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: debian如何安装合适的显卡驱动

#13

帖子 vickycq » 2015-09-25 22:58

yangdawei.hit 写了:不过令我感到困惑的是:如果默认正常安装了集成intel显卡,那本子的温度应该是比较低的,为什么一直显示是60度呢?我觉得50度才算正常。
之前独立显卡使用开源驱动nouveau,电源管理不佳,无法自动降频,发热较大。
现在安装了私有驱动+Bumblebee,理论上不使用时独显会自动关闭。实际效果可观察功率。
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: debian如何安装合适的显卡驱动

#14

帖子 yangdawei.hit » 2015-09-25 23:59

提醒了我再次测量功耗,测试显示,功耗明显降低。具体数据如下:

代码: 全选

  Time    User  Nice   Sys  Idle    IO  Run Ctxt/s  IRQ/s Fork Exec Exit  Watts
23:56:12   3.0   0.0   1.0  95.5   0.6    1   2106    419    2    0    9  14.78
23:56:22   1.3   0.0   0.5  98.2   0.0    1    905    302    1    0    0  13.13
23:56:32   2.1   0.0   1.1  96.8   0.0    1   1159    356    1    0    1  13.28
23:56:42   3.2   0.0   1.2  95.6   0.0    1   1797    375    0    0    0  13.64
23:56:52   3.5   0.0   0.7  95.7   0.1    4   1277    485    0    0    0  13.84
23:57:02   4.5   0.0   1.0  93.5   1.0    1   1557    412   44   33   47  14.38
23:57:12   2.6   0.0   0.6  96.6   0.3    1   1333    359    1    0    0  14.08
23:57:22   1.9   0.0   0.8  97.1   0.2    1   1502    359    0    0    1  13.19
23:57:32   6.1   0.0   1.2  92.0   0.7    1   3837    599    1    0    0  18.06
23:57:42   6.5   0.0   1.9  90.9   0.7    2   4024    550    2    0    1  17.45
23:57:52   3.2   0.0   1.3  95.4   0.1    1   2062    410    0    0    0  14.40
23:58:02   2.4   0.0   1.0  95.7   1.0    1   1394    381   45   33   46  13.42
23:58:12   2.8   0.0   1.0  95.2   1.0    1    965    339    0    0    1  13.38
23:58:22   2.7   0.0   1.1  96.2   0.0    1   1226    360    0    0    0  13.12


-------- ----- ----- ----- ----- ----- ---- ------ ------ ---- ---- ---- ------
 Average   3.3   0.0   1.0  95.3   0.4  1.3 1796.0  407.6  6.9  4.7  7.6  14.30
  StdDev   1.4   0.0   0.3   1.9   0.4  0.8  937.4   80.3 15.4 11.5 16.1   1.50
-------- ----- ----- ----- ----- ----- ---- ------ ------ ---- ---- ---- ------
 Minimum   1.3   0.0   0.5  90.9   0.0  1.0  905.0  302.0  0.0  0.0  0.0  13.12
 Maximum   6.5   0.0   1.9  98.2   1.0  4.0 4024.1  599.2 45.0 33.0 47.0  18.06
-------- ----- ----- ----- ----- ----- ---- ------ ------ ---- ---- ---- ------
Summary:
 14.30 Watts on Average with Standard Deviation 1.50  
显然,较安装闭源驱动之前,功耗降低了30%。
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: debian如何安装合适的显卡驱动

#15

帖子 yangdawei.hit » 2015-09-28 21:56

尝试了 vickycq的方法:
直接安装 bumblebee-nvidia 这个虚包,会将闭源驱动一起安装上。

现在再次查看显卡

代码: 全选

sudo lshw -numeric -class video
显示:

代码: 全选

 *-display               
       description: VGA compatible controller
       product: 3rd Gen Core processor Graphics Controller [8086:166]
       vendor: Intel Corporation [8086]
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:30 memory:f3000000-f33fffff memory:d0000000-dfffffff ioport:6000(size=64)

不知道为什么nvidia显卡看不到了。工作了一阵,觉得如果没有了nvidia显卡,功耗还是很低的,测了一下,是11到12瓦左右。到了晚上升级了一些软件后发现本子又热了,测了下功耗是22到25。

请问:

1. 如何或如何确认关闭nvidia显卡;
2. 如何查找功耗提升的源头。
回复