Bumblebee 與 nvidia-331-更新。使用“--driver nvidia”但不會作為服務工作

Bumblebee 與 nvidia-331-更新。使用“--driver nvidia”但不會作為服務工作

我嘗試在 ubuntu 12.04 上設定 bumblebee。我還使用最後一個 nvidia 驅動程序,因為 319 不再可用。

這是我的設定檔:

/etc/bumblebee/bumblebee.conf:

    # Configuration file for Bumblebee. Values should **not** be put between quotes

## Server options. Any change made in this section will need a server restart
# to take effect.
[bumblebeed]
# The secondary Xorg server DISPLAY number
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=false
# The name of the Bumbleblee server group name (GID name)
ServerGroup=bumblebee
# Card power state at exit. Set to false if the card shoud be ON when Bumblebee
# server exits.
TurnCardOffAtExit=false
# The default behavior of '-f' option on optirun. If set to "true", '-f' will
# be ignored.
NoEcoModeOverride=false
# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=nvidia 
# Directory with a dummy config file to pass as a -configdir to secondary X
XorgConfDir=/etc/bumblebee/xorg.conf.d

## Client options. Will take effect on the next optirun executed.
[optirun]
# Acceleration/ rendering bridge, possible values are auto, virtualgl and
# primus.
Bridge=auto
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy
# List of paths which are searched for the primus libGL.so.1 when using
# the primus bridge
PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
# Should the program run under optirun even if Bumblebee server or nvidia card
# is not available?
AllowFallbackToIGC=false


# Driver-specific settings are grouped under [driver-NAME]. The sections are
# parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
# detection resolves to NAME).
# PMMethod: method to use for saving power by disabling the nvidia card, valid
# values are: auto - automatically detect which PM method to use
#         bbswitch - new in BB 3, recommended if available
#       switcheroo - vga_switcheroo method, use at your own risk
#             none - disable PM completely
# https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods

## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia-331-updates
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-331-updates:/usr/lib32/nvidia-331-updates
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-331-updates/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

## Section with nouveau driver specific options, only parsed if Driver=nouveau
[driver-nouveau]
KernelDriver=nouveau
PMMethod=auto
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau

/etc/bumblebee/xorg.conf.nvidia:

Section "ServerLayout"
    Identifier  "Layout0"
    Option      "AutoAddDevices" "false"
    Option      "AutoAddGPU" "false"
EndSection

Section "Device"
    Identifier  "DiscreteNvidia"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"

#   If the X server does not automatically detect your VGA device,
#   you can manually set it here.
#   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
#   as you see in the commented example.
#   This Setting may be needed in some platforms with more than one
#   nvidia card, which may confuse the proprietary driver (e.g.,
#   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
#   BusID "PCI:01:00:0"

#   Setting ProbeAllGpus to false prevents the new proprietary driver
#   instance spawned to try to control the integrated graphics card,
#   which is already being managed outside bumblebee.
#   This option doesn't hurt and it is required on platforms running
#   more than one nvidia graphics card with the proprietary driver.
#   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
#   If this option is not set, the new Xorg may blacken the screen and
#   render it unusable (unless you have some way to run killall Xorg).
    Option "ProbeAllGpus" "false"

    Option "NoLogo" "true"
    Option "UseEDID" "false"
    Option "UseDisplayDevice" "none"
EndSection

然後我向您展示一些神秘的東西:

第一個命令:

    $ sudo /usr/sbin/bumblebeed -vv
[ 4828.053052] [DEBUG]Found card: 01:00.0 (discrete)
[ 4828.053093] [DEBUG]Found card: 00:02.0 (integrated)
[ 4828.053103] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 4828.053656] [INFO]Configured driver: nvidia 
[ 4828.053678] [DEBUG]Skipping auto-detection, using configured driver 'nvidia '
[ 4828.053743] [DEBUG]bbswitch has been detected.
[ 4828.053753] [INFO]Switching method 'bbswitch' is available and will be used.
[ 4828.053762] [DEBUG]Active configuration:
[ 4828.053770] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 4828.053778] [DEBUG] X display: :8
[ 4828.053786] [DEBUG] LD_LIBRARY_PATH: 
[ 4828.053794] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 4828.053802] [DEBUG] pidfile: /var/run/bumblebeed.pid
[ 4828.053810] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.DRIVER
[ 4828.053818] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d
[ 4828.053826] [DEBUG] ModulePath: 
[ 4828.053833] [DEBUG] GID name: bumblebee
[ 4828.053841] [DEBUG] Power method: auto
[ 4828.053849] [DEBUG] Stop X on exit: 1
[ 4828.053857] [DEBUG] Driver: nvidia 
[ 4828.053865] [DEBUG] Driver module: nvidia 
[ 4828.053872] [DEBUG] Card shutdown state: 1
[ 4828.054045] [DEBUG]Process /sbin/modprobe started, PID 3031.
[ 4828.054143] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[ 4828.056711] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 4828.056777] [ERROR]Module 'nvidia ' is not found.

第二條指令:

    $ sudo /usr/sbin/bumblebeed -vv --driver nvidia
[ 4742.214895] [DEBUG]Found card: 01:00.0 (discrete)
[ 4742.214970] [DEBUG]Found card: 00:02.0 (integrated)
[ 4742.215000] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 4742.215609] [INFO]Configured driver: nvidia 
[ 4742.215660] [DEBUG]Skipping auto-detection, using configured driver 'nvidia'
[ 4742.215885] [DEBUG]Process /sbin/modprobe started, PID 3023.
[ 4742.215981] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[ 4742.218520] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 4742.218667] [DEBUG]bbswitch has been detected.
[ 4742.218730] [INFO]Switching method 'bbswitch' is available and will be used.
[ 4742.218769] [DEBUG]Active configuration:
[ 4742.218805] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 4742.218834] [DEBUG] X display: :8
[ 4742.218871] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-331-updates:/usr/lib32/nvidia-331-updates
[ 4742.218908] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 4742.218949] [DEBUG] pidfile: /var/run/bumblebeed.pid
[ 4742.218981] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.nvidia
[ 4742.219010] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d
[ 4742.219040] [DEBUG] ModulePath: /usr/lib/nvidia-331-updates/xorg,/usr/lib/xorg/modules
[ 4742.219074] [DEBUG] GID name: bumblebee
[ 4742.219102] [DEBUG] Power method: auto
[ 4742.219136] [DEBUG] Stop X on exit: 1
[ 4742.219172] [DEBUG] Driver: nvidia
[ 4742.219202] [DEBUG] Driver module: nvidia-331-updates
[ 4742.219238] [DEBUG] Card shutdown state: 1
[ 4742.219431] [DEBUG]Process /sbin/modprobe started, PID 3024.
[ 4742.219517] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[ 4742.221990] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 4742.222054] [DEBUG]Configuration test passed.
[ 4742.222937] [INFO]/usr/sbin/bumblebeed 3.2.1 started
[ 4742.223214] [INFO]Switching dedicated card OFF [bbswitch]
[ 4742.404703] [INFO]Initialization completed - now handling client requests

這是工作!

我不明白為什麼第一個命令不起作用。在 bumblebee.conf 中,「driver」值為「nvidia」。為什麼在第一個命令中它嘗試載入驅動程式模組“nvidia”而不是“nvidia-331-updates”?兩個命令都必須有效或無效。一起。如何解決這個問題?

答案1

LibraryPath=/usr/lib/nvidia-331-updates:/usr/lib32/nvidia-331-updates改成 LibraryPath=/usr/lib/nvidia-current:/usr/lib32/nvidia-current

[driver-nvidia]改成

Driver=nvidia [driver-nvidia]

[driver-nouveau]改成

Driver=nouveau [driver-nouveau]

更改KernelDriver=nvidia-331-updatesKernelDriver=nvidia_331_updatesKernelDriver=nvidia

這個邏輯大黃蜂-.-

更新 試試這個:更改LibraryPath=/usr/lib/nvidia-331-updates,/usr/lib32/nvidia-331-updatesLibraryPath=/usr/lib/nvidia-331-updates,/usr/lib32/nvidia-331-updates

我的大黃蜂配置:

# Bumblebee 的設定檔。值**不**放在引號之間

## 伺服器選項。本節中所做的任何更改都需要重新啟動伺服器
# 生效。
[大黃蜂]
# 輔助 Xorg 伺服器 DISPLAY 編號
虛擬顯示=:8
# 未使用的 Xorg 伺服器是否應該繼續運作?如果等待則將其設為 true
# X 準備就緒的時間太長,根本不需要電源管理。
KeepUnusedXServer=false
# Bumbleblee伺服器群組名稱(GID名稱)
伺服器群組=大黃蜂
# 退出時卡片的電源狀態。如果卡在 Bumblebee 時應打開,則設定為 false
# 伺服器退出。
TurnCardOffAtExit=假
# optirun 上「-f」選項的預設行為。如果設定為“true”,“-f”將
# 被忽略。
NoEcoModeOverride=假
# Bumblebee 伺服器使用的驅動程式。如果該值未設定(或為空),
# 執行自動偵測。可用的驅動程式有 nvidia 和 nouveau
#(另請參閱下面特定於驅動程式的部分)
司機=
# 有虛擬設定檔的目錄,作為 -configdir 傳遞到輔助 X
XorgConfDir=/etc/bumblebee/xorg.conf.d

## 客戶端選項。將在下次執行 optirun 時生效。
[優化運行]
# 加速/渲染橋,可能的值為 auto、virtualgl 和
# 普里姆斯。
橋=自動
# VirtualGL 用於在 X 伺服器之間傳輸幀的方法。
# 可能的值為 proxy、jpeg、rgb、xv 和 yuv。
VGLTransport=代理
# 使用時搜尋 primus libGL.so.1 的路徑列表
# 普里默斯橋
PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
# 即使 Bumblebee 伺服器或 nvidia 卡,程式是否應該在 optirun 下運行
# 不可用?
允許FallbackToIGC = false


# 特定於驅動程式的設定分組在 [driver-NAME] 下。這些部分是
# 如果 [bumblebeed] 中的驅動程式設定為 NAME(或如果自動
# 檢測解析為 NAME)。
# PMMethod:透過停用nvidia卡來節省電量的方法,有效
# 值為:auto - 自動偵測使用哪一種 PM 方法
# bbswitch - BB 3 中的新功能,推薦(如果有)
# switcheroo - vga_switcheroo 方法,使用風險自負
# none - 完全停用 PM
# https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods

## 包含 nvidia 驅動程式特定選項的部分,僅在 Driver=nvidia 時進行解析
[驅動程式-nvidia]
# 要載入的模組名稱,如果為空或未設置,則預設為 Driver
核心驅動程式=nvidia_331_updates
PM方法=自動
# nvidia 庫的冒號分隔路徑
LibraryPath=/usr/lib/nvidia-331-updates,/usr/lib32/nvidia-331-updates
# 包含 nvidia_drv.so 的目錄的逗號分隔路徑和
# 預設 Xorg 模組路徑
XorgModulePath=/usr/lib/nvidia-331-updates/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

## 包含 nouveau 驅動程式特定選項的部分,僅在 Driver=nouveau 時才解析
[新手駕駛]
內核驅動=nouveau
PM方法=自動
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau

我的 xorg.conf.nvidia:

# nvidia-settings:nvidia-settings產生的X設定檔
# nvidia-settings:版本 331.20 (buildd@roseapple) 2014 年 2 月 3 日星期一 15:07:22 UTC 2014

“伺服器佈局”部分
    識別碼“佈局0”
    螢幕 0 “螢幕 0” 0 0
    輸入裝置“鍵盤0”“核心鍵盤”
    輸入裝置“Mouse0”“CorePointer”
    選項“自動新增設備”“假”
    選項“AutoAddGPU”“假”
    選項“Xinerama”“0”
結束部分

“輸入設備”部分
    # 從預設生成
    標識符“鍵盤0”
    驅動程式“kbd”
結束部分

“輸入設備”部分
    # 從預設生成
    標識符“滑鼠0”
    驅動“滑鼠”
    選項“協定”“自動”
    選項“設備”“/dev/psaux”
    選項“Emulate3Buttons”“否”
    選項“ZAxisMapping”“4 5”
結束部分

“設備”部分

# 如果 X 伺服器沒有自動偵測到您的 VGA 設備,
# 你可以在這裡手動設定。
# 若要取得 BusID 屬性,請執行 `lspci | egrep 'VGA|3D'` 並輸入數據
# 正如您在註釋範例中看到的那樣。
# 在某些具有多個的平台上可能需要此設置
# nvidia 卡,這可能會混淆專有驅動程式(例如,
# 嘗試取得錯誤裝置的所有權)。 Ubuntu 13.04 上也需要。
# 將 ProbeAllGpus 設定為 false 可防止新的專有驅動程式
# 產生實例來嘗試控制整合式顯示卡,
# 已經在 bumblebee 之外進行管理。
# 這個選項沒有什麼壞處,並且在運行的平台上是必需的
# 多個具有專有驅動程式的 nvidia 顯示卡。
#(例如 2010 年之前的 Macbook Pro,配備 nVidia 9400M + 9600M GT)。
# 如果不設定該選項,新的Xorg可能會黑屏並
# 使其無法使用(除非你有某種方法來運行killall Xorg)。
    標識符“DiscreteNvidia”
    驅動程式“nvidia”
    供應商名稱“NVIDIA Corporation”
    選項“ProbeAllGpus”“假”
    選項“NoLogo”“true”
    選項“UseEDID”“假”
    選項“UseDisplayDevice”“無”
    總線 ID“PCI:01:00:0”
結束部分

“設備”部分
    識別碼“設備0”
    驅動程式“nvidia”
    供應商名稱“NVIDIA Corporation”
    主機板名稱“GeForce GT 540M”
結束部分

「螢幕」部分
    標識符“預設螢幕”
    設備“DiscreteNvidia”
結束部分

「螢幕」部分
    標識符“Screen0”
    設備“設備0”
    預設深度 24
    選項“UseDisplayDevice”“無”
    “顯示”小節
        虛擬 1600 900
        深度24
    結束小節
結束部分

全新安裝 Bumblebee、Nvidia 和 DKMS 等後。

  1. 建立備份(如果存在檔案)sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

  2. 輸入optirun -b none nvidia-settings -c :8配置 xorg 並將其儲存到/etc/bumblebee/xorg.conf.nvidia

  3. nvidia-settings不保存到/etc/bumblebee/xorg.conf.nvidia.配置 nvidia-settings已儲存至/etc/X11/xorg.conf

    您必須將此檔案移至 bumblebee xorg-nvidia 設定。類型sudo rm /etc/bumblebee/xorg.conf.nvidia && sudo mv /etc/X11/xorg.conf /etc/bumblebee/xorg.conf.nvidia

  4. 重啟 ;)

這個對我有用

相關內容