我安装了带有 nvidia-331 的 bumblebee。我期望optirun glmark2运行 glmark2 但出现错误。
$ optirun glmark2
[ 785.642896] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA GPU at PCI:1:0:0. Please
[ 785.642945] [ERROR]Aborting because fallback start is disabled.
联想Y410P
VGA 兼容控制器
$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 755M] (rev a1)
kernal.log(部分)
Jan 22 16:17:49 Io kernel: [ 158.189147] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=none
Jan 22 16:17:49 Io kernel: [ 158.189256] [drm] Initialized nvidia-drm 0.0.0 20130102 for 0000:01:00.0 on minor 1
Jan 22 16:17:49 Io kernel: [ 158.189260] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 331.38 Wed Jan 8 19:32:30 PST 2014
Jan 22 16:17:50 Io kernel: [ 159.695466] nvidia 0000:01:00.0: irq 51 for MSI/MSI-X
Jan 22 16:17:50 Io kernel: [ 159.700843] NVRM: failed to copy vbios to system memory.
Jan 22 16:17:50 Io kernel: [ 159.703143] NVRM: RmInitAdapter failed! (0x30:0xffffffff:720)
Jan 22 16:17:50 Io kernel: [ 159.703148] NVRM: rm_init_adapter failed for device bearing minor number 0
Jan 22 16:17:50 Io kernel: [ 159.703165] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5
Jan 22 16:19:25 Io kernel: [ 253.931260] nvidia 0000:01:00.0: irq 51 for MSI/MSI-X
Jan 22 16:19:25 Io kernel: [ 253.936524] NVRM: failed to copy vbios to system memory.
Jan 22 16:19:25 Io kernel: [ 253.938816] NVRM: RmInitAdapter failed! (0x30:0xffffffff:720)
Jan 22 16:19:25 Io kernel: [ 253.938822] NVRM: rm_init_adapter failed for device bearing minor number 0
Jan 22 16:19:25 Io kernel: [ 253.938840] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5
Xorg.8.log
[ 253.727]
X.Org X Server 1.14.5
Release Date: 2013-12-12
[ 253.727] X Protocol Version 11, Revision 0
[ 253.727] Build Operating System: Linux 3.2.0-54-generic x86_64 Ubuntu
[ 253.727] Current Operating System: Linux Io 3.13.0-4-generic #19-Ubuntu SMP Thu Jan 16 18:10:11 UTC 2014 x86_64
[ 253.727] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.13.0-4-generic.efi.signed root=UUID=5b9b1a5b-a812-4478-9e57-49679c2d4cfa ro acpi=force quiet splash vt.handoff=7
[ 253.727] Build Date: 15 December 2013 09:53:45PM
[ 253.727] xorg-server 2:1.14.5-1ubuntu2 (For technical support please see http://www.ubuntu.com/support)
[ 253.727] Current version of pixman: 0.30.2
[ 253.727] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 253.727] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 253.727] (==) Log file: "/var/log/Xorg.8.log", Time: Wed Jan 22 16:19:24 2014
[ 253.728] (++) Using config file: "/etc/bumblebee/xorg.conf.nvidia"
[ 253.728] (++) Using config directory: "/etc/bumblebee/xorg.conf.d"
[ 253.728] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 253.728] (==) ServerLayout "Layout0"
[ 253.728] (**) |-->Screen "Default Screen" (0)
[ 253.728] (**) | |-->Monitor "Configured Monitor"
[ 253.729] (**) | |-->Device "Configured Video Device"
[ 253.729] (**) Option "AutoAddDevices" "false"
[ 253.729] (**) Option "AutoAddGPU" "false"
[ 253.729] (**) Not automatically adding devices
[ 253.729] (==) Automatically enabling devices
[ 253.729] (**) Not automatically adding GPU devices
[ 253.729] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 253.729] Entry deleted from font path.
[ 253.729] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 253.729] Entry deleted from font path.
[ 253.729] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 253.729] Entry deleted from font path.
[ 253.729] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 253.729] Entry deleted from font path.
[ 253.729] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 253.729] Entry deleted from font path.
[ 253.729] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[ 253.729] (++) ModulePath set to "/usr/lib/nvidia-331/xorg,/usr/lib/xorg/modules"
[ 253.729] (==) |-->Input Device "<default pointer>"
[ 253.729] (==) |-->Input Device "<default keyboard>"
[ 253.729] (==) The core pointer device wasn't specified explicitly in the layout.
Using the default mouse configuration.
[ 253.729] (==) The core keyboard device wasn't specified explicitly in the layout.
Using the default keyboard configuration.
[ 253.729] (II) Loader magic: 0x7f0ec6fc3d20
[ 253.729] (II) Module ABI versions:
[ 253.729] X.Org ANSI C Emulation: 0.4
[ 253.729] X.Org Video Driver: 14.1
[ 253.729] X.Org XInput driver : 19.1
[ 253.729] X.Org Server Extension : 7.0
[ 253.730] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 253.730] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 253.730] setversion 1.4 failed
[ 253.730] (II) config/udev: Ignoring already known drm device (/dev/dri/card0)
[ 253.732] (--) PCI:*(0:1:0:0) 10de:0fcd:17aa:3801 rev 161, Mem @ 0xc0000000/16777216, 0x90000000/268435456, 0xa0000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/524288
[ 253.732] (II) Open ACPI successful (/var/run/acpid.socket)
[ 253.732] Initializing built-in extension Generic Event Extension
[ 253.732] Initializing built-in extension SHAPE
[ 253.732] Initializing built-in extension MIT-SHM
[ 253.732] Initializing built-in extension XInputExtension
[ 253.732] Initializing built-in extension XTEST
[ 253.732] Initializing built-in extension BIG-REQUESTS
[ 253.732] Initializing built-in extension SYNC
[ 253.732] Initializing built-in extension XKEYBOARD
[ 253.732] Initializing built-in extension XC-MISC
[ 253.732] Initializing built-in extension SECURITY
[ 253.732] Initializing built-in extension XINERAMA
[ 253.732] Initializing built-in extension XFIXES
[ 253.732] Initializing built-in extension RENDER
[ 253.732] Initializing built-in extension RANDR
[ 253.732] Initializing built-in extension COMPOSITE
[ 253.732] Initializing built-in extension DAMAGE
[ 253.732] Initializing built-in extension MIT-SCREEN-SAVER
[ 253.732] Initializing built-in extension DOUBLE-BUFFER
[ 253.732] Initializing built-in extension RECORD
[ 253.732] Initializing built-in extension DPMS
[ 253.732] Initializing built-in extension X-Resource
[ 253.732] Initializing built-in extension XVideo
[ 253.732] Initializing built-in extension XVideo-MotionCompensation
[ 253.732] Initializing built-in extension SELinux
[ 253.732] Initializing built-in extension XFree86-VidModeExtension
[ 253.732] Initializing built-in extension XFree86-DGA
[ 253.732] Initializing built-in extension XFree86-DRI
[ 253.732] Initializing built-in extension DRI2
[ 253.732] (WW) "glamoregl" will not be loaded unless you've specified it to be loaded elsewhere.
[ 253.732] (II) "glx" will be loaded by default.
[ 253.732] (WW) "xmir" is not to be loaded by default. Skipping.
[ 253.732] (II) LoadModule: "glx"
[ 253.733] (II) Loading /usr/lib/nvidia-331/xorg/libglx.so
[ 253.751] (II) Module glx: vendor="NVIDIA Corporation"
[ 253.751] compiled for 4.0.2, module version = 1.0.0
[ 253.751] Module class: X.Org Server Extension
[ 253.751] (II) NVIDIA GLX Module 331.38 Wed Jan 8 19:10:17 PST 2014
[ 253.751] Loading extension GLX
[ 253.751] (==) Matched nvidia as autoconfigured driver 0
[ 253.751] (==) Matched nouveau as autoconfigured driver 1
[ 253.751] (==) Matched nvidia as autoconfigured driver 2
[ 253.751] (==) Matched nouveau as autoconfigured driver 3
[ 253.751] (==) Matched vesa as autoconfigured driver 4
[ 253.751] (==) Matched modesetting as autoconfigured driver 5
[ 253.751] (==) Matched fbdev as autoconfigured driver 6
[ 253.752] (==) Assigned the driver to the xf86ConfigLayout
[ 253.752] (II) LoadModule: "nvidia"
[ 253.752] (II) Loading /usr/lib/nvidia-331/xorg/nvidia_drv.so
[ 253.752] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 253.752] compiled for 4.0.2, module version = 1.0.0
[ 253.752] Module class: X.Org Video Driver
[ 253.752] (II) LoadModule: "nouveau"
[ 253.752] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so
[ 253.752] (II) Module nouveau: vendor="X.Org Foundation"
[ 253.752] compiled for 1.14.3, module version = 1.0.10
[ 253.752] Module class: X.Org Video Driver
[ 253.752] ABI class: X.Org Video Driver, version 14.1
[ 253.752] (II) LoadModule: "vesa"
[ 253.752] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[ 253.752] (II) Module vesa: vendor="X.Org Foundation"
[ 253.752] compiled for 1.14.3, module version = 2.3.3
[ 253.752] Module class: X.Org Video Driver
[ 253.752] ABI class: X.Org Video Driver, version 14.1
[ 253.752] (II) LoadModule: "modesetting"
[ 253.752] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 253.752] (II) Module modesetting: vendor="X.Org Foundation"
[ 253.752] compiled for 1.14.3, module version = 0.8.1
[ 253.752] Module class: X.Org Video Driver
[ 253.752] ABI class: X.Org Video Driver, version 14.1
[ 253.752] (II) LoadModule: "fbdev"
[ 253.753] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 253.753] (II) Module fbdev: vendor="X.Org Foundation"
[ 253.753] compiled for 1.14.5, module version = 0.4.4
[ 253.753] Module class: X.Org Video Driver
[ 253.753] ABI class: X.Org Video Driver, version 14.1
[ 253.753] (II) LoadModule: "mouse"
[ 253.753] (II) Loading /usr/lib/xorg/modules/input/mouse_drv.so
[ 253.753] (II) Module mouse: vendor="X.Org Foundation"
[ 253.753] compiled for 1.14.3, module version = 1.9.0
[ 253.753] Module class: X.Org XInput Driver
[ 253.753] ABI class: X.Org XInput driver, version 19.1
[ 253.753] (II) LoadModule: "kbd"
[ 253.753] (WW) Warning, couldn't open module kbd
[ 253.753] (II) UnloadModule: "kbd"
[ 253.753] (II) Unloading kbd
[ 253.753] (EE) Failed to load module "kbd" (module does not exist, 0)
[ 253.753] (II) NVIDIA dlloader X Driver 331.38 Wed Jan 8 18:51:00 PST 2014
[ 253.753] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 253.753] (II) NOUVEAU driver Date: Thu Nov 7 14:56:48 2013 +1000
[ 253.753] (II) NOUVEAU driver for NVIDIA chipset families :
[ 253.753] RIVA TNT (NV04)
[ 253.753] RIVA TNT2 (NV05)
[ 253.753] GeForce 256 (NV10)
[ 253.753] GeForce 2 (NV11, NV15)
[ 253.753] GeForce 4MX (NV17, NV18)
[ 253.753] GeForce 3 (NV20)
[ 253.753] GeForce 4Ti (NV25, NV28)
[ 253.753] GeForce FX (NV3x)
[ 253.753] GeForce 6 (NV4x)
[ 253.753] GeForce 7 (G7x)
[ 253.753] GeForce 8 (G8x)
[ 253.753] GeForce GTX 200 (NVA0)
[ 253.753] GeForce GTX 400 (NVC0)
[ 253.753] (II) VESA: driver for VESA chipsets: vesa
[ 253.753] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 253.753] (II) FBDEV: driver for framebuffer: fbdev
[ 253.753] (--) using VT number 7
[ 253.753] (II) Loading sub module "fb"
[ 253.753] (II) LoadModule: "fb"
[ 253.753] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 253.754] (II) Module fb: vendor="X.Org Foundation"
[ 253.754] compiled for 1.14.5, module version = 1.0.0
[ 253.754] ABI class: X.Org ANSI C Emulation, version 0.4
[ 253.754] (WW) Unresolved symbol: fbGetGCPrivateKey
[ 253.754] (II) Loading sub module "wfb"
[ 253.754] (II) LoadModule: "wfb"
[ 253.754] (II) Loading /usr/lib/xorg/modules/libwfb.so
[ 253.754] (II) Module wfb: vendor="X.Org Foundation"
[ 253.754] compiled for 1.14.5, module version = 1.0.0
[ 253.754] ABI class: X.Org ANSI C Emulation, version 0.4
[ 253.754] (II) Loading sub module "ramdac"
[ 253.754] (II) LoadModule: "ramdac"
[ 253.754] (II) Module "ramdac" already built-in
[ 253.754] (WW) Falling back to old probe method for vesa
[ 253.754] (WW) Falling back to old probe method for modesetting
[ 253.754] (WW) Falling back to old probe method for fbdev
[ 253.754] (II) Loading sub module "fbdevhw"
[ 253.754] (II) LoadModule: "fbdevhw"
[ 253.754] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 253.754] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 253.754] compiled for 1.14.5, module version = 0.0.2
[ 253.754] ABI class: X.Org Video Driver, version 14.1
[ 253.754] (II) NVIDIA(0): Creating default Display subsection in Screen section
"Default Screen" for depth/fbbpp 24/32
[ 253.754] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[ 253.754] (==) NVIDIA(0): RGB weight 888
[ 253.754] (==) NVIDIA(0): Default visual is TrueColor
[ 253.754] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[ 253.754] (**) NVIDIA(0): Enabling 2D acceleration
[ 253.762] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA GPU at PCI:1:0:0. Please
[ 253.762] (EE) NVIDIA(GPU-0): check your system's kernel log for additional error
[ 253.762] (EE) NVIDIA(GPU-0): messages and refer to Chapter 8: Common Problems in the
[ 253.762] (EE) NVIDIA(GPU-0): README for additional information.
[ 253.762] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA graphics device!
[ 253.762] (EE) NVIDIA(0): Failing initialization of X screen 0
[ 253.762] (II) UnloadModule: "nvidia"
[ 253.762] (II) UnloadSubModule: "wfbs"
[ 253.762] (II) UnloadSubModule: "fb"
[ 253.762] (EE) Screen(s) found, but none have a usable configuration.
[ 253.762] (EE)
Fatal server error:
[ 253.762] (EE) no screens found(EE)
[ 253.762] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 253.762] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
[ 253.762] (EE)
[ 253.762] (EE) Server terminated with error (1). Closing log file.
答案1
我做了一些挖掘,发现了这个有帮助的论坛,这使我能够大部分地编译它。
但编译是不够的,如果你想要工作最佳,你需要应用补丁描述在这里
尽管在论坛上看到很多令人困惑的信号,但并不确定在哪里应用什么补丁。
因此,为了您的方便,我已经从“原始” nvidia 源中找出了所需的补丁,并且我已经亲自测试并验证了它们可以Kernel 3.13
与OpenGL Renderer: GeForce GT 540M/PCIe/SSE2
补丁 1。
如果你编译正确,那么你可能已经获得了这个补丁,它来自rpmfusion 社区
补丁 2。
这不是我能在任何地方找到的补丁,而是我根据描述构建的这里
如果没有这个补丁,它就会失败,因为宏DEVICE_ACPI_HANDLE
不再被定义,所以它会回到条件#else
。这显然对除 optimus 用户之外的所有人都有效。
我所做的不仅仅是删除DEVICE_
前缀的简单建议,因为c
如果我碰巧使用较旧的内核,我希望生成的代码能够正常工作。
所以与其,
- 如果
DEVICE_ACPI_HANDLE
存在(3.13 之前),则使用它。 - 否则看看是否
ACPI_HANDLE
存在,然后尝试 - 否则,采用后备机制。
TL;DR。
- 应用补丁 1
- 应用补丁 2
- ???
- 要开心 :D