xx_zz 发表于 2012-4-22 20:28:24

和打包没太大关系,主要是不能用NV闭源驱动的lib覆盖xorg的lib,要单独提取出来放在nvidia-current路径下

xx_zz 发表于 2012-4-22 21:26:54

[   133.641] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
[   133.641] (EE) NVIDIA(0):   log file that the GLX module has been loaded in your X
[   133.641] (EE) NVIDIA(0):   server, and that the module is the NVIDIA GLX module.If
[   133.641] (EE) NVIDIA(0):   you continue to encounter problems, Please try
[   133.641] (EE) NVIDIA(0):   reinstalling the NVIDIA driver.

看log还是有问题的,能给个libbsd和libbsd-dev么?

haulm 发表于 2012-4-23 13:53:28

ibbsd 和 libbsd-dev系统的源里就有了,源码来自曼德拉,我发现我快成了各大发行版的剽窃大王了。
污染一说是我自己瞎扯了,是 AMD 的驱动重装必需先卸载。。。

yankaiqian 发表于 2012-4-23 22:08:09

是的,基本上很多i5、i7的笔记本都是nvidia optimus吧,这个集显是不允许关闭的。

Linux为了省电和保护电脑就要在用不到时关掉独显,照网上折腾过,但效果不明显,Windows下平常用散热口都没有温度,甚至是冷风……,可Linux下总是烫得受不了,让人心疼。

双显卡和Linux支持相关的内容(新闻)可以参考(需-翻-墙):
http://linux-hybrid-graphics.blogspot.com/

大概Nvidia Optimus相关的是这些:
https://github.com/Bumblebee-Project/Bumblebee
https://github.com/MrMEEE/ironhide
https://github.com/mkottman/acpi_call

关于AMD(Intel) Hybird双显卡,新内核慢慢都会自带“vga_switcheroo”,好像目前是对AMD/Intel(hybird)双显卡支持的好些,不知道会对nvidia optimus支持得如何。

xx_zz 发表于 2012-4-29 12:23:58

1.安装bumblebee
# apt-get update
# apt-get install bumblebee
2.下载官方闭源驱动
http://www.nvidia.cn/Download/index.aspx?lang=cn

3.处理闭源驱动
# ./NVIDIA-Linux-x86-295.40.run -x
# cd NVIDIA-Linux-x86-295.40
# cd kernel

# make SYSSRC=/lib/modules/3.1.10/build/ module
# cp nvidia.ko /lib/modules/3.1.10/extra/nvidia.ko

# mkdir /usr/lib/nvidia-current/xorg
# mkdir /usr/lib/nvidia-current/xorg/modules
# mkdir /usr/lib/nvidia-current/xorg/modules/drivers
# mkdir /usr/lib/nvidia-current/xorg/modules/extensions

# cd ..
# cp nvidia_drv.so /usr/lib/nvidia-current/xorg/modules/drivers/nvidia_drv.so
# cp libglx.so.295.40 /usr/lib/nvidia-current/xorg/modules/extensions/libglx.so.295.40
# ln -s /usr/lib/nvidia-current/xorg/modules/extensions/libglx.so.295.40 /usr/lib/nvidia-current/xorg/modules/extensions/libglx.so
# cp libGL.so.295.40 /usr/lib/nvidia-current/libGL.so.295.40
# ln -s /usr/lib/nvidia-current/libGL.so.295.40 /usr/lib/nvidia-current/libGL.so
# ln -s /usr/lib/nvidia-current/libGL.so.295.40 /usr/lib/nvidia-current/libGL.so.1
# cp libnvidia-glcore.so.295.40 /usr/lib/libnvidia-glcore.so.295.40
# cp libXvMCNVIDIA.a /usr/lib/libXvMCNVIDIA.a
# cp libXvMCNVIDIA.so.295.40 /usr/lib/libXvMCNVIDIA.so.295.40
# cp libvdpau_nvidia.so.295.40 /usr/lib/vdpau/libvdpau_nvidia.so.295.40
# cp tls/libnvidia-tls.so.295.40 /usr/lib/libnvidia-tls.so.295.40
# cp libnvidia-cfg.so.295.40 /usr/lib/libnvidia-cfg.so.295.40
# cp libnvidia-ml.so.295.40 /usr/lib/libnvidia-ml.so.295.40

# cp nvidia-xconfig /usr/bin/nvidia-xconfig
# cp nvidia-xconfig.1.gz /usr/share/man/man1/nvidia-xconfig.1.gz
# cp nvidia-settings /usr/bin/nvidia-settings
# cp nvidia-settings.1.gz /usr/share/man/man1/nvidia-settings.1.gz
# cp nvidia-settings.desktop /usr/share/applications/nvidia-settings.desktop
# cp nvidia-settings.png /usr/share/pixmaps/nvidia-settings.png
# cp nvidia-bug-report.sh /usr/bin/nvidia-bug-report.sh
# cp nvidia-smi /usr/bin/nvidia-smi
# cp nvidia-smi.1.gz /usr/share/man/man1/nvidia-smi.1.gz
# mkdir /usr/share/licenses
# mkdir /usr/share/licenses/nvidia
# cp LICENSE /usr/share/licenses/nvidia/LICENSE
# ln -s /usr/share/licenses/nvidia /usr/share/licenses/nvidia-utils
# mkdir /usr/share/doc/nvidia
# cp README.txt /usr/share/doc/nvidia/README
# cp NVIDIA_Changelog /usr/share/doc/nvidia/NVIDIA_Changelog
# ln -s /usr/share/doc/nvidia /usr/share/doc/nvidia-utils
4.修改配置文件
修改/etc/bumblebee/bumblebee.conf

将段内容改为
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia
Module=nvidia
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-current
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-current/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
5.重启电脑reboot

6.手动打开服务
# bumblebeed --daemon
7.测试
# optirun glxspheres
如能正常运行测试,并且有“OpenGL Renderer: GeForce GT 540M/PCIe/SSE2”类似的正常显卡识别信息则表示成功。

8.如需系统启动自动打开bumblebee服务,可以下载下面附件,解压缩得到bumblebeed脚本,将脚本复制到/etc/init.d目录下,赋予可执行权限,然后# chkconfig --add bumblebeed9.调用独显运行程序optirun <program-name>
optirun wine <program-name>
...


[ 本帖最后由 xx_zz 于 2012-4-29 12:30 编辑 ]

xx_zz 发表于 2012-4-29 12:39:08

test test

yankaiqian 发表于 2012-5-13 22:19:26

哇,写得真详细,你和linux人上的asdfgh是同一个人不?不久前他也发了一个详细的过程。
这个过程都是在2.5.13的MagicLinux上做的?

hxcan 发表于 2012-7-31 17:33:15

sourceforge上的那个源里好像已经没有bumblebee这个包了,不知haulm哥哥自己电脑上有没有存货呢?
本座刚入手一台双显卡的笔记本,需要这个东西来运行游戏。

haulm 发表于 2012-7-31 18:44:12

我好象是打过包了,源里找找吧。

hxcan 发表于 2012-8-1 08:55:47

已经找到,并且安装上去。

optirun glxgears时,在鼠标光标还存在的情况下黑屏,终端显示这样一段调试信息,这段信息是后来从系统日志里找到的:
Jul 31 19:37:14 MagicLinux bumblebeed: bumblebeed 3.0 started
Jul 31 19:37:14 MagicLinux kernel: bbswitch: disabling discrete graphics
Jul 31 19:37:14 MagicLinux kernel: pci 0000:01:00.0: Refused to change power state, currently in D0
Jul 31 19:37:14 MagicLinux kernel: pci 0000:01:00.0: power state changed by ACPI to D3
Jul 31 19:37:38 MagicLinux kernel: bbswitch: enabling discrete graphics
Jul 31 19:37:38 MagicLinux kernel: pci 0000:01:00.0: power state changed by ACPI to D0
Jul 31 19:37:38 MagicLinux kernel: pci 0000:01:00.0: power state changed by ACPI to D0
Jul 31 19:37:38 MagicLinux kernel: pci 0000:01:00.0: power state changed by ACPI to D0
Jul 31 19:37:38 MagicLinux kernel: pci 0000:01:00.0: power state changed by ACPI to D0
Jul 31 19:37:38 MagicLinux kernel: nvidia 0000:01:00.0: power state changed by ACPI to D0
Jul 31 19:37:38 MagicLinux kernel: nvidia 0000:01:00.0: power state changed by ACPI to D0
Jul 31 19:37:38 MagicLinux kernel: NVRM: loading NVIDIA UNIX x86 Kernel Module295.59Wed Jun6 21:24:41 PDT 2012
Jul 31 19:37:39 MagicLinux kernel: vgaarb: this pci device is not a vga device
Jul 31 19:37:39 MagicLinux kernel: BUG: unable to handle kernel NULL pointer dereference at 00000018
Jul 31 19:37:39 MagicLinux kernel: IP: [<fbdce8f5>] _nv001088rm+0x173/0x6db
Jul 31 19:37:39 MagicLinux kernel: *pdpt = 0000000031195001 *pde = 0000000000000000
Jul 31 19:37:39 MagicLinux kernel: Oops: 0000 [#1] SMP
Jul 31 19:37:39 MagicLinux kernel: Modules linked in: nvidia(PO) aes_i586 aes_generic sunrpc ipv6 sbs sbshc pci_slot ec_sys bbswitch(O) acpi_pad uinput snd_hda_codec_hdmi snd_hda_codec_realtek uvcvideo videobuf2_core videodev videobuf2_vmalloc videobuf2_memops arc4 snd_hda_intel snd_hda_codec snd_hwdep snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq ath9k(O) snd_seq_device snd_pcm_oss snd_mixer_oss mac80211(O) ath9k_common(O) ath9k_hw(O) ath(O) i915 cfg80211(O) snd_pcm acer_wmi rtc_cmos sparse_keymap rfkill serio_raw crc32c_intel mac_hid r8169 coretemp iTCO_wdt drm_kms_helper compat(O) snd_timer snd snd_page_alloc wmi iTCO_vendor_support joydev i2c_i801 intel_agp intel_gtt microcode video uhci_hcd ohci_hcd ehci_hcd
Jul 31 19:37:39 MagicLinux kernel:
Jul 31 19:37:39 MagicLinux kernel: Pid: 3537, comm: Xorg Tainted: P         O 3.4.4 #1 Acer Aspire E1-471G/EA40_HC
Jul 31 19:37:39 MagicLinux kernel: EIP: 0060:[<fbdce8f5>] EFLAGS: 00013286 CPU: 3
Jul 31 19:37:39 MagicLinux kernel: EIP is at _nv001088rm+0x173/0x6db
Jul 31 19:37:39 MagicLinux kernel: EAX: 00000000 EBX: f12f5400 ECX: 00000001 EDX: 00000000
Jul 31 19:37:39 MagicLinux kernel: ESI: f1082004 EDI: f9000000 EBP: f2c03fb4 ESP: f1069cf0
Jul 31 19:37:39 MagicLinux kernel: DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Jul 31 19:37:39 MagicLinux kernel: CR0: 80050033 CR2: 00000018 CR3: 31194000 CR4: 000407f0
Jul 31 19:37:39 MagicLinux kernel: DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
Jul 31 19:37:39 MagicLinux kernel: DR6: ffff0ff0 DR7: 00000400
Jul 31 19:37:39 MagicLinux kernel: Process Xorg (pid: 3537, ti=f1068000 task=f2988b70 task.ti=f1068000)
Jul 31 19:37:39 MagicLinux kernel: Stack:
Jul 31 19:37:39 MagicLinux kernel: 00000000 00000049 00000000 00000000 f2c02000 f3858004 f12f5400 fbdc590e
Jul 31 19:37:39 MagicLinux kernel: f12f5400 00000001 00000000 00000000 00000000 00000000 00000000 00000000
Jul 31 19:37:39 MagicLinux kernel: f1069df0 00000000 00000000 00000dd1 00000000 e4f73ef0 12a60ed7 d37f4590
Jul 31 19:37:39 MagicLinux kernel: Call Trace:
Jul 31 19:37:39 MagicLinux kernel: [<fbdc590e>] ? rm_init_adapter+0xa1/0x1b0
Jul 31 19:37:39 MagicLinux kernel: [<fbdeb420>] ? nv_kern_open+0x440/0x7f0
Jul 31 19:37:39 MagicLinux kernel: [<c111159a>] ? chrdev_open+0x8a/0x150
Jul 31 19:37:39 MagicLinux kernel: [<c110c3fe>] ? __dentry_open+0x1ee/0x2a0
Jul 31 19:37:39 MagicLinux kernel: [<c110c586>] ? nameidata_to_filp+0x66/0x70
Jul 31 19:37:39 MagicLinux kernel: [<c1111510>] ? cdev_put+0x20/0x20
Jul 31 19:37:39 MagicLinux kernel: [<c111a372>] ? do_last+0xc2/0x7d0
Jul 31 19:37:39 MagicLinux kernel: [<c111ab20>] ? path_openat+0xa0/0x340
Jul 31 19:37:39 MagicLinux kernel: [<c111aea0>] ? do_filp_open+0x30/0x80
Jul 31 19:37:39 MagicLinux kernel: [<c1125af7>] ? alloc_fd+0xb7/0xf0
Jul 31 19:37:39 MagicLinux kernel: [<c1117cfd>] ? getname_flags+0xbd/0x130
Jul 31 19:37:39 MagicLinux kernel: [<c110bf6d>] ? do_sys_open+0xed/0x1c0
Jul 31 19:37:39 MagicLinux kernel: [<c1127a33>] ? mntput_no_expire+0x43/0x140
Jul 31 19:37:39 MagicLinux kernel: [<c110c0ad>] ? sys_open+0x2d/0x40
Jul 31 19:37:39 MagicLinux kernel: [<c19a44df>] ? sysenter_do_call+0x12/0x28
Jul 31 19:37:39 MagicLinux kernel: Code: 56 18 83 c4 10 89 45 00 8b 07 8b 55 18 89 42 28 81 63 08 7f ff ff ff 6a 00 6a 00 6a 15 56 ff 56 18 83 c4 10 6a 00 6a 00 6a 49 50 <ff> 50 18 83 c4 10 89 c7 f6 43 09 10 74 10 6a 01 68 bb 54 00 00
Jul 31 19:37:39 MagicLinux kernel: EIP: [<fbdce8f5>] _nv001088rm+0x173/0x6db SS:ESP 0068:f1069cf0
Jul 31 19:37:39 MagicLinux kernel: CR2: 0000000000000018
Jul 31 19:37:39 MagicLinux kernel: ---[ end trace 7e831b8f0fc6b1ad ]---
Jul 31 19:37:39 MagicLinux bumblebeed: X did not start properly


好像是说内核有点问题吧。

haulm 发表于 2012-8-1 09:45:32

原来是在 3.1.10 下面编译的,要不等晚上我再重新编译上传?

hxcan 发表于 2012-8-1 10:51:15

好的,haulm哥哥有心来研究这个问题的话,本座很愿意配合测试。

hxcan 发表于 2012-10-25 11:24:50

报告一下,使用更新源里最新的内核和bumblebee,再按照这里的教程来做,解决了问题。

hxcan 发表于 2013-4-3 21:16:38

最近升级到仓库里的3.4.24内核之后,按照这里的方法重新泡制了一遍,这次失败了。
手动运行bumblebeed时提示:
Module 'nvidia' is not found.
执行modinfo来找nvidia模块的时候也是说nvidia模块不存在。到/lib/modules/3.4.24/extra/下面去看的话,确实存在nvidia.ko,而且其日期也是今天的日期,说明确实是新编译出来的。

不知是否是需要把之前安装的驱动那些东西清理一遍。如果要清理的话,需要清理哪些东西?
请砖家指导。
另外,想尝试退回到之前双显卡可用状态的内核,不过好像仓库里已经没有3.4.7版本的内核了吧。

haulm 发表于 2013-4-4 00:52:53

cat /boot/config-3.4.38 |grep NVIDIA
CONFIG_NET_VENDOR_NVIDIA=y
CONFIG_AGP_NVIDIA=m
CONFIG_FB_NVIDIA=m
CONFIG_FB_NVIDIA_I2C=y
# CONFIG_FB_NVIDIA_DEBUG is not set
CONFIG_FB_NVIDIA_BACKLIGHT=y
要不接着再升级内核试一下吧,我没有改过 3.4 的内核配置。
页: 1 [2] 3
查看完整版本: 关于双显卡驱动问题的切换或解决。