Bug 2664 - nvidia-current module version 325.15-2 crashes after first run through bumblebee
: nvidia-current module version 325.15-2 crashes after first run through bumblebee
Status: RESOLVED FIXED
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Main Packages
: Fresh
: x86_64 Linux
: Normal normal
: ---
Assigned To: ROSA Linux Bugs
: ROSA Linux Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-07 11:52 MSD by Eugene Budanov
Modified: 2013-09-11 02:17 MSD (History)
2 users (show)

See Also:
RPM Package:
ISO-related:
Bad POT generating:
Upstream:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Budanov 2013-09-07 11:52:45 MSD
Description of problem:
After first run of any opengl application using optirun command, nvidia kernel module crashed with error:

bash-4.2$ optirun glxgears
[  143.218285] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the

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


Version-Release number of selected component (if applicable):
dkms-nvidia-current-325.15-2-rosa2012.1.x86_64
x11-driver-video-nvidia-current-325.15-2-rosa2012.1.x86_64

rpm -qa | grep bumblebee
bumblebee-3.0.1-3-rosa2012.1.x86_64

How reproducible:
Type in terminal emulator: optirun glxgears. This command will open window with test opengl app. Close it and type optirun glxgears agian.
Comment 1 Eugene Budanov 2013-09-07 14:26:51 MSD
Additional info:
Unloading and loading kernel has no effect. nvidia-current working after reboot only.
Comment 2 Eugene Budanov 2013-09-07 14:27:21 MSD
loading kernel module of course.
Comment 3 Aleksandr Kazantcev 2013-09-07 15:05:36 MSD
Dkms build only after reboot.
Comment 4 Eugene Budanov 2013-09-07 15:35:39 MSD
Just for test I reinstall dkms and nvidia kernel module. Same problem. No effect at all. As I remember, problem appeared after kernel update to 3.10.9-nrj-desktop-1rosa x86_64 GNU/Linux.
Comment 5 Postnikov Dmitry 2013-09-07 15:47:58 MSD
What sequence of actions needed to Optimus check on this? I then yourself to check it out.
Comment 6 Eugene Budanov 2013-09-07 16:39:44 MSD
(In reply to comment #5)
> What sequence of actions needed to Optimus check on this? I then yourself to
> check it out.

Look at first message.

"How reproducible:

Type in terminal emulator: optirun glxgears. This command will open window with test opengl app. Close it and type optirun glxgears agian."
Comment 7 Postnikov Dmitry 2013-09-07 16:48:45 MSD
I understand how to run. What packages should be install before this? bumblebee and all?
Comment 8 Eugene Budanov 2013-09-07 17:20:40 MSD
(In reply to comment #7)
> I understand how to run. What packages should be install before this?
> bumblebee and all?

You need this packages:

dkms-nvidia-current-325.15-2-rosa2012.1.x86_64
x11-driver-video-nvidia-current-325.15-2-rosa2012.1.x86_64
bumblebee-3.0.1-3-rosa2012.1.x86_64
dkms-bbswitch-v0.4-2-rosa2012.1.noarch
Comment 9 Postnikov Dmitry 2013-09-08 03:16:17 MSD
I think the problem is in the naming of the driver. If configuration file bumblebee write "nvidia" daemon does not start. If you write "nvidia-current" starts but when you start optirun errors.
==========
[pastordi@mindlife2 ~]$ optirun glxgears
[  118.080231] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver

[  118.080268] [ERROR]Aborting because fallback start is disabled.
[pastordi@mindlife2 ~]$
[root@mindlife2 pastordi]# systemctl status bumblebeed
bumblebeed.service - Bumblebee C Daemon
          Loaded: loaded (/lib/systemd/system/bumblebeed.service; enabled)
          Active: active (running) since Sun, 08 Sep 2013 03:09:04 +0400; 2min 47s ago
        Main PID: 3555 (bumblebeed)
          CGroup: name=systemd:/system/bumblebeed.service
                  ├ 3555 /usr/sbin/bumblebeed
                  └ 4957 rmmod --wait nvidia

Sep 08 03:09:04 mindlife2 systemd[1]: Started Bumblebee C Daemon.
Sep 08 03:09:09 mindlife2 bumblebeed[3555]: [   24.306192] [INFO]/usr/sbin/bumblebeed 3.0.1 started
Sep 08 03:10:42 mindlife2 bumblebeed[3555]: [  118.058386] [WARN]The PCI config space could not be written fully at offset 0x1; 0 bytes have been written; error: Resource temporarily unavailable[  118.080177] [ERROR]Module nvidia-current could not be loaded (timeout?)
Sep 08 03:10:42 mindlife2 bumblebeed[3555]: [  118.080200] [ERROR]Could not load GPU driver
Sep 08 03:11:38 mindlife2 bumblebeed[3555]: [  173.346828] [ERROR]Unloading nvidia driver timed out.
[root@mindlife2 pastordi]#
[root@mindlife2 pastordi]# lsmod | grep nvi
nvidia               9366209  1 
drm                   294245  5 i915,drm_kms_helper,nvidia
i2c_core               40536  7 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit,nvidia,videodev
[root@mindlife2 pastordi]#
================
[root@mindlife2 pastordi]# lspci -vnn | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:1140] (rev a1) (prog-if 00 [VGA controller])
[root@mindlife2 pastordi]#
===============
Comment 10 Postnikov Dmitry 2013-09-09 02:01:17 MSD
Managed to reproduce the situation. First time it is run perfectly, and the second time error.
Service bumblebee wait operation "rmmod --wait nvidia". 
========================
[pastordi@mindlife2 ~]$ optirun -vvv glxgears
[  642.513581] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[  642.514111] [INFO]Configured driver: nvidia
[  642.691278] [DEBUG]optirun version 3.0.1 starting...
[  642.691317] [DEBUG]Active configuration:
[  642.691326] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[  642.691334] [DEBUG] X display: :8
[  642.691340] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-current:/usr/lib64/nvidia-current
[  642.691346] [DEBUG] Socket path: /var/run/bumblebee.socket
[  642.691353] [DEBUG] VGL Compression: proxy
[  645.449816] [INFO]Response: Yes. X is active.

[  645.449854] [INFO]Running application through vglrun.
[  645.450062] [DEBUG]Process vglrun started, PID 17058.
3699 frames in 5.0 seconds = 739.673 FPS
3717 frames in 5.0 seconds = 743.225 FPS
3765 frames in 5.0 seconds = 752.911 FPS
3688 frames in 5.0 seconds = 737.529 FPS
3678 frames in 5.0 seconds = 735.413 FPS
3764 frames in 5.0 seconds = 752.795 FPS
3680 frames in 5.0 seconds = 735.893 FPS
[VGL] ERROR: in readback--
[VGL]    241: Window has been deleted by window manager
[  682.112227] [DEBUG]SIGCHILD received, but wait failed with No child processes
[  682.112270] [DEBUG]Socket closed.
[  682.112295] [DEBUG]Killing all remaining processes.
[pastordi@mindlife2 ~]$ optirun -vvv glxgears
[  716.680534] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[  716.680927] [INFO]Configured driver: nvidia
[  716.817790] [DEBUG]optirun version 3.0.1 starting...
[  716.817825] [DEBUG]Active configuration:
[  716.817832] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[  716.817839] [DEBUG] X display: :8
[  716.817845] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-current:/usr/lib64/nvidia-current
[  716.817851] [DEBUG] Socket path: /var/run/bumblebee.socket
[  716.817857] [DEBUG] VGL Compression: proxy
[  716.942122] [INFO]Response: No - error: [XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the

[  716.942137] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the

[  716.942142] [DEBUG]Socket closed.
[  716.942153] [ERROR]Aborting because fallback start is disabled.
[  716.942157] [DEBUG]Killing all remaining processes.
[pastordi@mindlife2 ~]$
============================
[root@mindlife2 pastordi]# systemctl status bumblebeed
bumblebeed.service - Bumblebee C Daemon
          Loaded: loaded (/lib/systemd/system/bumblebeed.service; enabled)
          Active: active (running) since Mon, 09 Sep 2013 01:39:56 +0400; 12min ago
        Main PID: 3418 (bumblebeed)
          CGroup: name=systemd:/system/bumblebeed.service
                  ├  3418 /usr/sbin/bumblebeed
                  └ 17352 rmmod --wait nvidia

Sep 09 01:51:33 mindlife2 bumblebeed[3418]: [  716.941994] [ERROR][XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the
Sep 09 01:51:33 mindlife2 bumblebeed[3418]: [  716.942056] [ERROR][XORG] (EE) NVIDIA(0):     system's kernel log for additional error messages and
Sep 09 01:51:33 mindlife2 bumblebeed[3418]: [  716.942063] [ERROR][XORG] (EE) NVIDIA(0):     consult the NVIDIA README for details.
Sep 09 01:51:33 mindlife2 bumblebeed[3418]: [  716.942067] [ERROR][XORG] (EE) NVIDIA(0):  *** Aborting ***
Sep 09 01:51:33 mindlife2 bumblebeed[3418]: [  716.942073] [ERROR][XORG] (EE) NVIDIA(0): Failing initialization of X screen 0
Sep 09 01:51:33 mindlife2 bumblebeed[3418]: [  716.942078] [ERROR][XORG] (EE) Screen(s) found, but none have a usable configuration.
Sep 09 01:51:33 mindlife2 bumblebeed[3418]: [  716.942082] [ERROR][XORG] (EE)
Sep 09 01:51:33 mindlife2 bumblebeed[3418]: [  716.942086] [ERROR][XORG] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
Sep 09 01:51:33 mindlife2 bumblebeed[3418]: [  716.942089] [ERROR][XORG] (EE)
Sep 09 01:51:33 mindlife2 bumblebeed[3418]: [  716.942092] [ERROR]X did not start properly
[root@mindlife2 pastordi]# 
========================
Comment 11 Postnikov Dmitry 2013-09-09 04:06:24 MSD
Wow! I succeeded! :)

http://yadi.sk/d/odruhwaI8vtbi
or
http://cdn.2safe.com/22284033760/screen1.mov

To run the configuration file:
/etc/bumblebee/xorg.conf.nvidia
================================
Section "ServerLayout"
    Identifier "Layout0"
    Option "AutoAddDevices" "true"
    Option "AutoAddGPU" "true"
EndSection

Section "Device"
    Identifier "Device1"
    Driver "nvidia"
    BusID  "PCI:01:00:0"
    VendorName "NVIDIA Corporation"
    Option "NoLogo" "true"
    Option "UseEDID" "false"
#    Option "UseDisplayDevice" "none"
    Option "DPMS"
    Option "DynamicTwinView" "false"
    Option "AddARGBGLXVisuals
    Option "ConnectedMonitor" "DFP"
EndSection
===============================

And changed some settings in the main configuration file:
/etc/bumblebee/bumblebee.conf
===============================
KeepUnusedXServer=true
TurnCardOffAtExit=true
VGLTransport=yuv
KernelDriver=nvidia-current
#Module=nvidia-current
PMMethod=bbswitch
==============================
The other default settings.
Comment 12 Eugene Budanov 2013-09-09 09:29:58 MSD
Wow! Respect for you. 

I test this settings. If will be good for me, I change bug status as "resolved".
Comment 13 Eugene Budanov 2013-09-11 02:17:22 MSD
Thanks for hint, Dmitry!

I found a problem. For solving problem need to change bumblebee.conf:

KeepUnusedXServer=true
TurnCardOffAtExit=true
#Module=nvidia-current

Any other options I leave as is.

Editing of /etc/bumblebee/xorg.conf.nvidia is not neccessary.