Форум русскоязычного сообщества Ubuntu


Увидели сообщение с непонятной ссылкой, спам, непристойность или оскорбление?
Воспользуйтесь ссылкой «Сообщить модератору» рядом с сообщением!

Автор Тема: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0  (Прочитано 826679 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн Grayscale

  • Активист
  • *
  • Сообщений: 573
    • Просмотр профиля
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2145 : 27 Января 2014, 17:35:32 »
Ребят, а у меня primus сломался.
запускаю
vblankmode=0 primusrun glxgears, показывает фпс в 2 раза ниже, чем optirun, хотя буквально неделю назад проверял, ФПС был запредельный, %на 30-40 выше, чем если через optirun
sudo dpkg -l | grep primus
(Нажмите, чтобы показать/скрыть)
« Последнее редактирование: 27 Января 2014, 17:37:11 от Grayscale »
В мире столько разнообразной фигни.. И в каждой найдется специалист
ASUS K46CB(S46CB) i7-3537U @ 2.0GHz 8Gb RAM + SSD 64 Gb + Manjaro Linux

Оффлайн vasyl

  • Старожил
  • *
  • Сообщений: 1724
    • Просмотр профиля
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2146 : 27 Января 2014, 17:39:25 »
sashk0,
cat /etc/bumblebee/bumblebee.conf ?
Ubuntu Mate 16.04 + Windows 10

Оффлайн Grayscale

  • Активист
  • *
  • Сообщений: 573
    • Просмотр профиля
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2147 : 27 Января 2014, 17:42:44 »
починил. Помогла переустановка primus primus-libs
В мире столько разнообразной фигни.. И в каждой найдется специалист
ASUS K46CB(S46CB) i7-3537U @ 2.0GHz 8Gb RAM + SSD 64 Gb + Manjaro Linux

Оффлайн sashk0

  • Новичок
  • *
  • Сообщений: 47
    • Просмотр профиля
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2148 : 27 Января 2014, 17:46:54 »
sashk0,
cat /etc/bumblebee/bumblebee.conf ?

sashko@sashko-Aspire-V7-582PG:~$ cat /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=
# 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-current
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-current:/usr/lib32/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

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

Оффлайн vasyl

  • Старожил
  • *
  • Сообщений: 1724
    • Просмотр профиля
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2149 : 27 Января 2014, 18:16:23 »
Цитировать
Driver=
?
(Нажмите, чтобы показать/скрыть)
Ubuntu Mate 16.04 + Windows 10

Оффлайн Grayscale

  • Активист
  • *
  • Сообщений: 573
    • Просмотр профиля
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2150 : 27 Января 2014, 18:26:46 »
vasyl,
да там bbswitch не заводится, не поможет этому правка конфигов bumblebee
В мире столько разнообразной фигни.. И в каждой найдется специалист
ASUS K46CB(S46CB) i7-3537U @ 2.0GHz 8Gb RAM + SSD 64 Gb + Manjaro Linux

Оффлайн sashk0

  • Новичок
  • *
  • Сообщений: 47
    • Просмотр профиля
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2151 : 27 Января 2014, 18:39:40 »
vasyl,
да там bbswitch не заводится, не поможет этому правка конфигов bumblebee

Именно в этом дело. Попробую сейчас обновить ядро, потом bbswitch установить.

Пользователь решил продолжить мысль 27 Января 2014, 22:17:25:
Добил я таки этот bbswitch, сейчас он у меня работает!

Установил последнюю версию ядра 3.13 отсюда http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-trusty/

Скачал пакеты:
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-trusty/linux-headers-3.13.0-031300-generic_3.13.0-031300.201401192235_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-trusty/linux-headers-3.13.0-031300_3.13.0-031300.201401192235_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-trusty/linux-image-3.13.0-031300-generic_3.13.0-031300.201401192235_amd64.deb

И установил:
sudo dpkg -i linux-headers-3.13.*.deb linux-image-3.13.*.deb
Далее подключил репозиторий xorg и установил драйвера 331.38:
sudo apt-add-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-331 nvidia-settings

Подключил репозиторий ppa:bumblebee/stable, дабы установить новую версию bbswitch, установил bumblebee с primus:
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia primus primus-libs-ia32:i386

Удалил репозиторий xorg:
sudo apt-add-repository -r ppa:xorg-edgers/ppa
sudo apt-get update

Всё встало:
sashko@sashko-Aspire-V7-582PG:~$ dkms status
bbswitch, 0.8, 3.13.0-031300-generic, x86_64: installed
nvidia-331, 331.38, 3.13.0-031300-generic, x86_64: installed

Но у меня драйвера не определялись, пришлось править руками bumblebee.conf
sudo gedit /etc/bumblebee/bumblebee.conf
Название драйвера не встало и пути неправильно были указаны, вот что у меня получилось в итоге:
sashko@sashko-Aspire-V7-582PG:~$ cat /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
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-331:/usr/lib32/nvidia-331
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-331/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

bbswitch грузится, пути на месте:
sashko@sashko-Aspire-V7-582PG:~$ cat /proc/acpi/bbswitch
0000:01:00.0 ON

sashko@sashko-Aspire-V7-582PG:~$ sudo bumblebeed --debug
[ 1926.423890] [DEBUG]bbswitch has been detected.
[ 1926.423907] [INFO]Switching method 'bbswitch' is available and will be used.
[ 1926.423911] [DEBUG]Active configuration:
[ 1926.423914] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 1926.423916] [DEBUG] X display: :8
[ 1926.423919] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-331:/usr/lib32/nvidia-331
[ 1926.423922] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 1926.423925] [DEBUG] pidfile: /var/run/bumblebeed.pid
[ 1926.423928] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.nvidia
[ 1926.423931] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d
[ 1926.423933] [DEBUG] ModulePath: /usr/lib/nvidia-331/xorg,/usr/lib/xorg/modules
[ 1926.423936] [DEBUG] GID name: bumblebee
[ 1926.423939] [DEBUG] Power method: auto
[ 1926.423942] [DEBUG] Stop X on exit: 1
[ 1926.423945] [DEBUG] Driver: nvidia
[ 1926.423948] [DEBUG] Driver module: nvidia-331
[ 1926.423950] [DEBUG] Card shutdown state: 1
[ 1926.424035] [DEBUG]Process /sbin/modprobe started, PID 4021.
[ 1926.424065] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[ 1926.425353] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 1926.425368] [DEBUG]Configuration test passed.
[ 1926.425416] [ERROR]Daemon already running, pid 3969

Но ошибка всё равно есть:
sashko@sashko-Aspire-V7-582PG:~$ sudo optirun nvidia-settings -c :8
[ 1841.717009] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA GPU at PCI:1:0:0.  Please

[ 1841.717056] [ERROR]Aborting because fallback start is disabled.

Не знаю что ещё можно проверить...

Пользователь решил продолжить мысль 27 Января 2014, 22:20:11:
Настройки /etc/bumblebee/xorg.conf.nvidia:
sashko@sashko-Aspire-V7-582PG:~$ cat /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
« Последнее редактирование: 27 Января 2014, 22:20:11 от sashk0 »

Оффлайн neon1ks

  • Старожил
  • *
  • Сообщений: 1183
    • Просмотр профиля
    • Блог молодого разработчика
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2152 : 28 Января 2014, 09:40:14 »
sashk0,
Цитировать
bbswitch грузится, пути на месте:
sashko@sashko-Aspire-V7-582PG:~$ cat /proc/acpi/bbswitch
0000:01:00.0 ON

А должно быть по умолчанию:
0000:01:00.0 OFF
Попробуй установить драйвер nvidia-319 (или nvidia-304) с откатом обратно на ядро 3.11.0-15 (только можно наверное не удалять bbswitch)
https://forum.ubuntu.ru/index.php?topic=190100.msg1868302#msg1868302

Писали же, что на французском форуме - установка nvidia-319 помогла.
« Последнее редактирование: 28 Января 2014, 09:44:24 от neon1ks »

Оффлайн sashk0

  • Новичок
  • *
  • Сообщений: 47
    • Просмотр профиля
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2153 : 28 Января 2014, 13:40:42 »
neon1ks,
На других ядрах у меня не работает bbswitch (ни 0.7 версии, ни 0.8 версии). Он запустился только на ядре 13.3
Попробую установить драйвера 319.

Тут ещё читал, что подобную проблему решали при помощи установки параметров в grud для acpi, вот так:
GRUB_CMDLINE_LINUX="acpi=force"
Но мне это не помогло.

Поэтому, попробую на драйверах постарше.

Оффлайн Grayscale

  • Активист
  • *
  • Сообщений: 573
    • Просмотр профиля
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2154 : 28 Января 2014, 14:44:14 »
sashk0,
надо же, ну прям точно как у меня проблема на ubuntu 13.04... Пару раз я все-таки заводил Bumblebee, но через какое-то время он снова отваливался. Помучившись, каким-то образом добился того, чтобы bbswitch выключал карточку, ну и на этом я остановился до выхода 13.10. Сейчас с дровами проблем не имею.
И еще замечание: после неудачного запуска optirun, bbswitch включает карточку и не отключает.
Вы когда cat /proc/acpi/bbswitchпроверяли, перед этим запускали optirun? Если да, то попробуйте перезагрузиться и снова проверить состояние bbswitch
В мире столько разнообразной фигни.. И в каждой найдется специалист
ASUS K46CB(S46CB) i7-3537U @ 2.0GHz 8Gb RAM + SSD 64 Gb + Manjaro Linux

Оффлайн sashk0

  • Новичок
  • *
  • Сообщений: 47
    • Просмотр профиля
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2155 : 28 Января 2014, 18:07:05 »
Grayscale,
1. После включения ноут стоял какое-то время, минут 20 включенным
sashko@sashko-Aspire-V7-582PG:~$ cat /proc/acpi/bbswitch
0000:01:00.0 OFF

2. Запускаем optirun --status
sashko@sashko-Aspire-V7-582PG:~$ optirun --status
Bumblebee status: Ready (3.2.1). X inactive. Discrete video card is off.

3. Запускаем optirun nvidia-settings -c :8
sashko@sashko-Aspire-V7-582PG:~$ optirun nvidia-settings -c :8
[ 2221.798197] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver
[ 2221.798239] [ERROR]Aborting because fallback start is disabled.

4. Снова запускаем cat /proc/acpi/bbswitch
sashko@sashko-Aspire-V7-582PG:~$ cat /proc/acpi/bbswitch
0000:01:00.0 ON

5. Пробуем запустить optirun --status
sashko@sashko-Aspire-V7-582PG:~$ optirun --status
Bumblebee status: Error (3.2.1): Could not load GPU driver

Замечу, что это всё на драйверах 331, драйвера 319 у меня не встали, в процессе установки он сругнулся на то, что не поддерживается данным ядром.

Оффлайн neon1ks

  • Старожил
  • *
  • Сообщений: 1183
    • Просмотр профиля
    • Блог молодого разработчика
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2156 : 28 Января 2014, 19:22:45 »
sashk0,
Не установлен заголовочный файл ядра - установи его.
Пакет называется у меня так - linux-headers-3.11.0-15-generic (linux-headers-generic)
У тебя версия может быть другая.

Оффлайн Grayscale

  • Активист
  • *
  • Сообщений: 573
    • Просмотр профиля
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2157 : 28 Января 2014, 19:35:21 »
sashk0,
Не установлен заголовочный файл ядра - установи его.
Пакет называется у меня так - linux-headers-3.11.0-15-generic (linux-headers-generic)
У тебя версия может быть другая.
ага, я уже делал предположение, только на тот момент хэдерзы от 3.11 у него были ???
В мире столько разнообразной фигни.. И в каждой найдется специалист
ASUS K46CB(S46CB) i7-3537U @ 2.0GHz 8Gb RAM + SSD 64 Gb + Manjaro Linux

Оффлайн neon1ks

  • Старожил
  • *
  • Сообщений: 1183
    • Просмотр профиля
    • Блог молодого разработчика
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2158 : 28 Января 2014, 19:41:12 »
[ERROR]Cannot access secondary GPU - error: Could not load GPU driver
[ERROR]Aborting because fallback start is disabled.
Данная ошибка возникает, когда не установлен заголовочный файл ядра.

sashk0,
uname -r -v
dpkg -l | grep linux-headers
« Последнее редактирование: 28 Января 2014, 19:51:06 от neon1ks »

Оффлайн sashk0

  • Новичок
  • *
  • Сообщений: 47
    • Просмотр профиля
Re: nVidia Optimus (Гибридная графика nVidia + Intel) [Wiki] v2.0
« Ответ #2159 : 28 Января 2014, 21:06:49 »
uname -r -v

sashko@sashko-Aspire-V7-582PG:~$ uname -r -v
3.13.0-031300-generic #201401192235 SMP Mon Jan 20 03:36:48 UTC 2014

dpkg -l | grep linux-headers

sashko@sashko-Aspire-V7-582PG:~$ dpkg -l | grep linux-headers
ii  linux-headers-3.11.0-12                   3.11.0-12.19                             all          Header files related to Linux kernel version 3.11.0
ii  linux-headers-3.11.0-12-generic           3.11.0-12.19                             amd64        Linux kernel headers for version 3.11.0 on 64 bit x86 SMP
ii  linux-headers-3.11.0-15                   3.11.0-15.23                             all          Header files related to Linux kernel version 3.11.0
ii  linux-headers-3.11.0-15-generic           3.11.0-15.23                             amd64        Linux kernel headers for version 3.11.0 on 64 bit x86 SMP
ii  linux-headers-3.13.0-031300               3.13.0-031300.201401192235               all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-031300-generic       3.13.0-031300.201401192235               amd64        Linux kernel headers for version 3.13.0 on 64 bit x86 SMP
ii  linux-headers-generic                     3.11.0.15.16                             amd64        Generic Linux kernel headers

 

Страница сгенерирована за 0.025 секунд. Запросов: 22.