Results 1 to 9 of 9

Thread: Nvidia optimus black screen

  1. #1

    Nvidia optimus black screen

    First off am new to kali, whilst some members will come out with "you shouldn't be using kali" I made the decision to start with kali not because it's easy or I want to hack everyone in my street but because I want to learn the basics of the tools and progress. Everyone runs into an issue on linux and needs help so it would still happen even if I was running ubuntu or another distro.

    Issue
    I have a HP-Envy laptop which has a nvidia optimus card. The card is a Geforce 840m and it switches between my intel card and the nvidia card. I wanted to get the Nvidia side working on laptop to try out cudahashcat. My cpu with aircrack was only managing 3700 keys per second and I wanted to speed that up.
    I followed the nvidia install page here and when I rebooted I got the black screen of death. I got the terminal working and someone mentioned on a ubuntu forum to purge the nvidia driver and in a similar thread someone suggested moving/renaming the xorg.conf file to "xorg.conf.blah" but to no avail. The operating system is not within a virtual machine, I had it installed on a seperate hard drive and within my own bios I cannot switch off the intel chip. I need to get back to using the intel drivers (I think) but not sure how to do that and I need to know if anyone knows a way to get my nvidia card working for cudahashcat? I have seen people on other sites using the 840m but am not sure and couldn't find their installation procedure. If anyone knows how or a guide to explain how that would be greatly appreciated. If I have to reinstall kali that's fine as I keep everything backed up on an encrypted usb. I just need to be able to get the graphics chip working as that's my main issue.

  2. #2
    Join Date
    2015-Oct
    Posts
    6
    Hi,

    First, I suggest you to perform a new fresh install to start on solid bases.

    - Edit your sources.list:

    leafpad /etc/apt/sources.list
    to have these repo:

    Code:
    # Regular repositories
    deb http://http.kali.org/kali sana main non-free contrib
    deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
    #Source repositories
    deb-src http://http.kali.org/kali sana main non-free contrib
    deb-src http://security.kali.org/kali-security/ sana/updates main contrib non-free
    - Update and upgrade:

    apt-get update && apt-get dist-upgrade
    - Install Bumblebee nvidia and activate it:

    apt-get install bumblebee-nvidia primus

    adduser $USER bumblebee (where $USER is your current session, mine is root)

    systemctl enable bumblebeed
    (it is the right name: "bumblebeed" )

    reboot (it could take a few seconds to reboot on your session, don't panic)

    - Test bumblebee:

    bumblebeed -vv
    your output should look like this:

    Code:
    root@Negatho:~# bumblebeed -vv
    [13443.577039] [DEBUG]Found card: 01:00.0 (discrete)
    [13443.577070] [DEBUG]Found card: 00:02.0 (integrated)
    [13443.577081] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
    [13443.577332] [INFO]Configured driver: nvidia
    [13443.577353] [DEBUG]Skipping auto-detection, using configured driver 'nvidia'
    [13443.577485] [DEBUG]Process /sbin/modprobe started, PID 30594.
    [13443.577552] [DEBUG]Hiding stderr for execution of /sbin/modprobe
    [13443.578789] [DEBUG]SIGCHILD received, but wait failed with No child processes
    [13443.578860] [DEBUG]bbswitch has been detected.
    [13443.578872] [INFO]Switching method 'bbswitch' is available and will be used.
    [13443.578882] [DEBUG]Active configuration:
    [13443.578892] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
    [13443.578901] [DEBUG] X display: :8
    [13443.578910] [DEBUG] LD_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/nvidia
    [13443.578920] [DEBUG] Socket path: /var/run/bumblebee.socket
    [13443.578930] [DEBUG] pidfile: /var/run/bumblebeed.pid
    [13443.578938] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.nvidia
    [13443.578947] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d
    [13443.578956] [DEBUG] ModulePath: /usr/lib/nvidia,/usr/lib/xorg/modules
    [13443.578964] [DEBUG] GID name: bumblebee
    [13443.578973] [DEBUG] Power method: auto
    [13443.578981] [DEBUG] Stop X on exit: 1
    [13443.578990] [DEBUG] Driver: nvidia
    [13443.578998] [DEBUG] Driver module: nvidia-current
    [13443.579007] [DEBUG] Card shutdown state: 1
    [13443.579125] [DEBUG]Process /sbin/modprobe started, PID 30595.
    [13443.579186] [DEBUG]Hiding stderr for execution of /sbin/modprobe
    [13443.580364] [DEBUG]SIGCHILD received, but wait failed with No child processes
    [13443.580389] [DEBUG]Configuration test passed.
    [13443.580437] [ERROR]Daemon already running, pid 820
    - Edit bumblebee .conf files:

    first xorg nvidia conf

    leafpad /etc/bumblebee/xorg.conf.nvidia
    It should look like this, if not edit it to have exactly the same as this:

    Code:
    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" (#WARNING HERE: do lspci to have the right BusID and respect the pattern, however the output look like PCI:00:00.0 but it does translate here as PCI 00:00:00)
    #   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
    second xorg nouveau conf

    leafpad /etc/bumblebee/xorg.conf.nouveau
    Code:
    Section "ServerLayout"
        Identifier  "Layout0"
        Option      "AutoAddDevices" "false"
        Option      "AutoAddGPU" "false"
    EndSection
    
    Section "Device"
        Identifier  "DiscreteNvidia"
        Driver      "nouveau"
    
    #   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 is needed on Ubuntu 13.04.
        BusID "PCI:01:00:0"(#same warning as nvidia.conf above)
    
    EndSection
    third bumblebee conf

    leafpad /etc/bumblebee/bumblebee.conf
    Code:
    # 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:/usr/lib/primus:/usr/lib32/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/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/nvidia
    # comma-separated path of the directory containing nvidia_drv.so and the
    # default Xorg modules path
    XorgModulePath=/usr/lib/nvidia,/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
    now reboot again

    install nvidia-settings
    apt-get install nvidia-settings
    you can now call nvidia settings with this command
    optirun nvidia-settings -c :8
    you're almost done
    now you need to install cuda tools

    apt-get install nvidia-cuda-toolkit
    then in order to add cuda for pyrit you have to install python dev and lib

    apt-get install python2.7-dev python2.7-libpcap libpcap-dev
    download cpyrit for cuda

    in order to build and install it you must install the missing libssl-dev

    apt-get install libssl-dev
    extract your cpyrit-cuda

    tar xzf cpyrit-cuda-0.4.0.tar.gz
    and move it to your /home
    navigate into the extracted folder and build/install it to add the module to pyrit

    cd cpyrit-cuda-0.4.0/
    python setup.py build
    python setup.py install
    now you can check if your nvidia cuda core is listed

    pyrit list_cores
    Et voilĂ* !!!

    pyrit benchmark
    I hope this tutorial will you
    Happy cracking !

    *edit: missing installation of nvidia-settings
    Last edited by Negatho; 2015-11-12 at 11:58.

  3. #3
    Join Date
    2015-Oct
    Posts
    6
    Edited my first post, so dismissed this one.
    Last edited by Negatho; 2015-11-12 at 11:57. Reason: error on my first post

  4. #4
    Join Date
    2015-Oct
    Posts
    6
    If this little tuto has helped you tell me
    If there is anything I've missed or you don't understand, feel free to ask me.

  5. #5
    Join Date
    2015-Sep
    Posts
    9
    Hi after following your instruction when i execute
    optirun nvidia-settings -c :8
    i get the followinf error:
    [ 729.918090] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver
    [ 729.918164] [ERROR]Aborting because fallback start is disabled.

  6. #6
    Join Date
    2015-Oct
    Posts
    6
    What is the output of your xorg.conf.nvidia ?
    In the same time what bumblebee is saying with the command bumblebeed -vv ?

  7. #7
    Join Date
    2015-Nov
    Posts
    2
    Hi
    I followed this guide and got nvidia driver installed but when i check for cores nvidia doesnt show up heres what i get
    root@kali:~# pyrit list_cores
    Pyrit 0.4.0 (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
    This code is distributed under the GNU General Public License v3+

    The following cores seem available...
    #1: 'CPU-Core (SSE2)'
    #2: 'CPU-Core (SSE2)'
    #3: 'CPU-Core (SSE2)'
    #4: 'CPU-Core (SSE2)'

    This are some errors that i get when installing pyrit

    root@kali:~# tar xzf cpyrit-cuda-0.4.0.tar.gz
    root@kali:~# cd cpyrit-cuda-0.4.0/ python setup.py build
    root@kali:~/cpyrit-cuda-0.4.0# python setup.py build
    The CUDA compiler and headers required to build kernel were not found. Trying to continue anyway...
    svn: E155007: '/root/cpyrit-cuda-0.4.0' is not a working copy
    running build
    running build_ext
    Compiling CUDA module using nvcc 6.0, V6.0.1...
    Executing 'nvcc -m64 --host-compilation C -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu'
    nvcc warning : option 'host-compilation' has been deprecated and is ignored
    nvcc warning : The 'compute_10' and 'sm_10' architectures are deprecated, and may be removed in a future release.
    Building modules...
    building 'cpyrit._cpyrit_cuda' extension
    creating build
    creating build/temp.linux-x86_64-2.7
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _cpyrit_cuda.c -o build/temp.linux-x86_64-2.7/_cpyrit_cuda.o -Wall -fno-strict-aliasing -DVERSION="0.4.0"
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/cpyrit
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_cpyrit_cuda.o -lcrypto -lcuda -lz -o build/lib.linux-x86_64-2.7/cpyrit/_cpyrit_cuda.so

    root@kali:~/cpyrit-cuda-0.4.0# python setup.py install
    The CUDA compiler and headers required to build kernel were not found. Trying to continue anyway...
    svn: E155007: '/root/cpyrit-cuda-0.4.0' is not a working copy
    running install
    running build
    running build_ext
    Skipping rebuild of Nvidia CUDA kernel ...
    Building modules...
    running install_lib
    copying build/lib.linux-x86_64-2.7/cpyrit/_cpyrit_cuda.so -> /usr/local/lib/python2.7/dist-packages/cpyrit
    running install_egg_info
    Removing /usr/local/lib/python2.7/dist-packages/cpyrit_cuda-0.4.0.egg-info
    Writing /usr/local/lib/python2.7/dist-packages/cpyrit_cuda-0.4.0.egg-info
    root@kali:~/cpyrit-cuda-0.4.0#

    is this normal or im doing something wrong?

  8. #8
    Join Date
    2015-Oct
    Posts
    1
    Quote Originally Posted by cartof View Post
    Hi
    I followed this guide and got nvidia driver installed but when i check for cores nvidia doesnt show up heres what i get
    root@kali:~# pyrit list_cores
    Pyrit 0.4.0 (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
    This code is distributed under the GNU General Public License v3+

    The following cores seem available...
    #1: 'CPU-Core (SSE2)'
    #2: 'CPU-Core (SSE2)'
    #3: 'CPU-Core (SSE2)'
    #4: 'CPU-Core (SSE2)'

    This are some errors that i get when installing pyrit

    root@kali:~# tar xzf cpyrit-cuda-0.4.0.tar.gz
    root@kali:~# cd cpyrit-cuda-0.4.0/ python setup.py build
    root@kali:~/cpyrit-cuda-0.4.0# python setup.py build
    The CUDA compiler and headers required to build kernel were not found. Trying to continue anyway...
    svn: E155007: '/root/cpyrit-cuda-0.4.0' is not a working copy
    running build
    running build_ext
    Compiling CUDA module using nvcc 6.0, V6.0.1...
    Executing 'nvcc -m64 --host-compilation C -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu'
    nvcc warning : option 'host-compilation' has been deprecated and is ignored
    nvcc warning : The 'compute_10' and 'sm_10' architectures are deprecated, and may be removed in a future release.
    Building modules...
    building 'cpyrit._cpyrit_cuda' extension
    creating build
    creating build/temp.linux-x86_64-2.7
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _cpyrit_cuda.c -o build/temp.linux-x86_64-2.7/_cpyrit_cuda.o -Wall -fno-strict-aliasing -DVERSION="0.4.0"
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/cpyrit
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_cpyrit_cuda.o -lcrypto -lcuda -lz -o build/lib.linux-x86_64-2.7/cpyrit/_cpyrit_cuda.so

    root@kali:~/cpyrit-cuda-0.4.0# python setup.py install
    The CUDA compiler and headers required to build kernel were not found. Trying to continue anyway...
    svn: E155007: '/root/cpyrit-cuda-0.4.0' is not a working copy
    running install
    running build
    running build_ext
    Skipping rebuild of Nvidia CUDA kernel ...
    Building modules...
    running install_lib
    copying build/lib.linux-x86_64-2.7/cpyrit/_cpyrit_cuda.so -> /usr/local/lib/python2.7/dist-packages/cpyrit
    running install_egg_info
    Removing /usr/local/lib/python2.7/dist-packages/cpyrit_cuda-0.4.0.egg-info
    Writing /usr/local/lib/python2.7/dist-packages/cpyrit_cuda-0.4.0.egg-info
    root@kali:~/cpyrit-cuda-0.4.0#

    is this normal or im doing something wrong?
    Hi, I also got the same output. i hope it is normal xD

  9. #9
    Join Date
    2016-Oct
    Posts
    1
    Quote Originally Posted by harry_arg View Post
    Hi after following your instruction when i execute i get the followinf error:
    i have the same problem.. anyone have any ideas?

Similar Threads

  1. Screen issues on a NVIDIA Optimus Laptop
    By Neotec00 in forum TroubleShooting Archive
    Replies: 2
    Last Post: 2016-10-14, 09:42
  2. Replies: 1
    Last Post: 2016-09-24, 07:25
  3. HeLp Me for NVIDIa Driver after installation black screen
    By netdestroyer in forum TroubleShooting Archive
    Replies: 6
    Last Post: 2014-02-25, 17:03
  4. Nvidia 460 gtx install driver + nvidia-settings black screen
    By zero-z in forum TroubleShooting Archive
    Replies: 3
    Last Post: 2013-08-28, 03:30

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •