WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Xorg black screen NVidia problem  (Read 24600 times)

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Re: Xorg black screen NVidia problem
« Reply #30 on: July 03, 2012, 09:14:40 AM »
Yeah, I didn't get a chance to test it last night.  Yesterday I realized that I am special, as I forgot my laptop at work  ::)

I have one or two more things that I plan on testing today, then I will attempt Bumblebee.

Offline Capodastro

  • Newbie
  • *
  • Posts: 33
Re: Xorg black screen NVidia problem
« Reply #31 on: July 05, 2012, 07:54:38 PM »
Hi KHarvey!
Concerning my active help, the only issue is that I know this distribution since 5 days. I am a tc illiterate!
On the other hand I have here an optimus perfectly equipped with suse, it belongs to my wife, and I can use it of course for tc installation purposes. As additional issue, I was hoping in a quiet rest time for my brain but i see the stars decided differently.  :-\
Assuming we will do this work together, i start talking more precisely. i consider optimus a big progress in the laptop technology: dramatic reduction in power consumption, the machine has a lot of power and great graphic. the production costs are lower and the price is also much more reasonable. The battery life increases also dramatically. ok, but HOW IT WORKS?

The laptop has 2 graphic cards,  intel and  nvidia, so, both drivers are required! The two cards are "married" together. the intel card has no 3d accel., but borrows partially this power from the nvidia card without starting the strongly power consuming nvidia gpu. the intel card borrows  just what you need for compiz, a pinguin race or my great chessmaster. if required, $$ndows switches automatically, starts the powerful nvidia gpu and provides a huge amount of 3d accel. under linux that must be done manually by starting the consuming application with the prefix "optirun", ex. "optirun vlc". of course vlc doesn't requires to be started in optirun! finally, i can assure you that bumbleweed works 100%.

THE PROBLEM:
To make this wonder possible, the kernel must provide the same buffer for both cards. the intel driver is opensource, the nvidia one is proprietary. and now the legal problem: nvidia exiges a legal proprietary coverage for such a buffer. the kernel programmers advise that nvidia should finally make open source drivers, the kernel is entirely gpl and they will never change the legal status of the linux kernel, even partially.
On the other side, we, common people, are needing the linux modules for our optima laptops. For this reason our ubuntu heroes are reverse engineering the nvidia releases and use the code to build linux versions. Graciously nvidia ignores this professional hacking operation of and here we are!

OUR WORK:
- 1) install first the intel drivers
- 2) only after that install the nvidia drivers, not so simple but i have a couple of ideas!
- 3) install the compiler and backup the installation
- 4) compile the source, possibly from the ubuntu repo. we will need to try different versions
- 5) done!!!
I think we will land quite often on level 3, but we can make a liberal use of mc to delete extensions  :D
I will start on saturday /  sonday.
is that OK?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Xorg black screen NVidia problem
« Reply #32 on: July 06, 2012, 06:00:59 AM »
One correction, the Intel card does have 3d (and quite capable in Ivy Bridge, too).
The only barriers that can stop you are the ones you create yourself.

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Re: Xorg black screen NVidia problem
« Reply #33 on: July 06, 2012, 10:24:04 AM »
Wow, thanks for the lengthy reply Capodastro.

I was able to successfully build Bumblebee on TC the other day, but I was still having problems getting my card working.  It wasn't all that hard to get it to compile and install, but it did take installing some strange extensions.  Sorry it doesn't appear that I took very good notes.

The steps off the top of my head were:
Install Xorg-7.5
Install graphics-3.0.21-tinycore (Intel graphics with MUX error)
Xorg -configure
mv /root/xorg.conf.new /etc/X11/xorg.conf
echo etc/X11/xorg.conf >> /opt/.filetool.lst
Install compiletc
Install pci-utils
Install linux-headers-3.0.21-tinycore
Install glib-2.0-dev
Installing libX11 was where I had most of my problems as I couldn't find the correct extension.  I think I had to install libx11-xcb
Install libbsd
Install libbsd-dev

I then downloaded the NVidia driver shell script and ran that installing the drivers.  This is where I should have paid closer attention.
Once that was done I downloaded the Bumblebee source and compiled it (it took me around 4 tries before I had all the dependencies worked out).  From there I did the install.  But that was pretty much as far as I made it.

When ever I tried to start bumbleweed (using verbose) I would receive an error that no driver was installed.  Pretty much the problem was I didn't know where I installed the NVidia drivers to  :-[

I have since installed TC without Bumblebee and I am attempting to just use the Intel drivers.  I know that I won't be able to setup the screens that I want by doing it this way, but at least it is functional.

If I get a chance this weekend, I will attempt to install Bumblebee again and see if I can get it working.  The big thing that I need to remember to do is to note the location of the files when I run the NVidia shell script:
conf_driver
conf_driver_module_nvidia
conf_ldpath_nvidia
conf_modpath_nvidia

I may get delayed by a few weeks though, as I still have a lot of prep before Defcon to do.  :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: Xorg black screen NVidia problem
« Reply #34 on: July 06, 2012, 12:54:05 PM »
Hi KHarvey
If you read this post:
http://forum.tinycorelinux.net/index.php/topic,12965.msg71304.html#msg71304
you will find a couple of scripts attached that you can use to locate and optionally package the Nvidia driver.
« Last Edit: July 06, 2012, 08:47:52 PM by Rich »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Xorg black screen NVidia problem
« Reply #35 on: July 06, 2012, 01:50:39 PM »
TC's run-in-ram nature makes it great for experiments like these: you can install anything anywhere and it'll all be clean and gone after a reboot.

For finding the nvidia files you could use the touch - find combination, as mentioned on the wiki on the creating extensions page.
The only barriers that can stop you are the ones you create yourself.

Offline Capodastro

  • Newbie
  • *
  • Posts: 33
Re: Xorg black screen NVidia problem
« Reply #36 on: July 07, 2012, 05:37:37 AM »
i have here an inferno, my wife doesn't give me peace and invited people. over night i installed the compiler but no idea what to do with the source in a such strange format.
i think you are right: as temporary solution no working "optirun". let split. if i remember well, in the opensuse - tumbleweed - bumbleweed - nvidia repo they putted fake drivers, just place holders. take a look. i will join you as soon as here the air gets clean.
curaga, i will need to stress your patience!  thanks in advance!

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Re: Xorg black screen NVidia problem
« Reply #37 on: July 08, 2012, 09:39:55 PM »
Okay, I have made it quite a ways, but I don't know if it works yet.  Basically I ran into a problem of applying a group permission without logging off.  More on this at the end.

Anyways here are the steps I followed to get Bumblebee installed and almost maybe running:
Here are all of the extensions that I found that need to be found:
Code: [Select]
linux-headers-3.0.21-tinycore.tcz
pci-utils.tcz
Xorg-7.5.tcz
graphics-3.0.21-tinycore.tcz
tar.tcz
glib2-dev.tcz
libbsd.tcz
libbsd-dev.tcz
help2man.tcz (supposedly optional, but you get a bunch of errors without it)
libx11-xcb.tcz
libxcb-dev.tcz
shadow-utils.tcz

*I think I should run Xorg -configure and copy over the xorg.conf file here.  It may solve my later issue*

Next I need to install the NVidia driver that I downloaded from the NVidia website.  The first problem is before you do the install you need to create a file so that you can do a comparison and find where the driver was installed.
Code: [Select]
touch /tmp/mark
sudo sh ./NVIDIA-Linux-x86-295.59.run
Accept
No

Now that the driver is installed, you need to search for all the files that were changed
Code: [Select]
find /usr -newer /tmp/mark > list.txt
find /lib -newer /tmp/mark > list2.txt

Here is the output from the two files for my computer, your files may be different:
list.txt
Code: [Select]
        /usr/lib/libnvcuvid.so
/usr/lib/libnvcuvid.so.1
/usr/lib/libvdpau_nvidia.so
/usr/lib/libvdpau_trace.so
/usr/lib/libvdpau.so
/usr/lib/libvdpau.so.1
/usr/lib/libOpenCL.so
/usr/lib/libOpenCL.so.1
/usr/lib/libOpenCL.so.1.0
/usr/lib/libcuda.so
/usr/lib/libcuda.so.1
/usr/lib/libnvidia-cfg.so
/usr/lib/libnvidia-cfg.so.1
/usr/lib/libnvidia-ml.so
/usr/lib/libnvidia-ml.so.1
/usr/lib/libGL.so
/usr/lib/libGL.so.1
/usr/lib/libGL.so.la
/usr/lib/libnvcuvid.so.295.59
/usr/lib/vdpau/libvdpau_nvidia.so.1
/usr/lib/vdpau/libvdpau_trace.so.1
/usr/lib/vdpau/libvdpau_nvidia.so.295.59
/usr/lib/vdpau/libvdpau_trace.so.295.59
/usr/lib/libvdpau.so.295.59
/usr/lib/libnvidia-compiler.so.295.59
/usr/lib/libOpenCL.so.1.0.0
/usr/lib/libcuda.so.295.59
/usr/lib/libnvidia-cfg.so.295.59
/usr/lib/libnvidia-ml.so.295.59
/usr/lib/tls/libnvidia-tls.so.295.59
/usr/lib/libnvidia-tls.so.295.59
/usr/lib/libGL.so.295.59
/usr/lib/libnvidia-glcore.so.295.59
/usr/local/lib/libXvMCNVIDIA_dynamic.so
/usr/local/lib/libXvMCNVIDIA_dynamic.so.1
/usr/local/lib/libXvMCNVIDIA.so.295.59
/usr/local/lib/libXvMCNVIDIA.a
/usr/local/lib/X11/modules/libnvidia-wfb.so.1
/usr/local/lib/X11/modules/libnvidia-wfb.so.295.59
/usr/local/lib/X11/modules/extensions/libglx.so
/usr/local/lib/X11/modules/extensions/libglx.so.259.59
/usr/local/lib/X11/modules/drivers/nvidia_drv.so
/usr/bin/nvidia-uninstall
/usr/bin/nvidia-installer
/usr/bin/nvidia-bug-report.sh
/usr/bin/nvidia-setttings
/usr/bin/nvidia-xconfig
/usr/bin/nvidia-debugdump
/usr/bin/nvidia-smi

list2.txt
Code: [Select]
        /lib/modules/3.09.21-tinycore/modules.alias
/lib/modules/3.0.21-tinycore/kernel/drivers/video
/lib/modules/3.0.21-tinycore/kernel/drivers/video/nvidia.ko
/lib/modules/3.0.21-tinycore/modules.dep
/lib/modules/3.0.21-tinycore/modules.symbols

Now bbswitch needs to be downloaded and installed, you can pull this from the Bumblebee project website
Code: [Select]
        unzip Bumblebee-Project-bbswitch-v0.4.2-0-g979fbcf.zip
cd Bumblebee-Project-bbswitch-v0.4.2-0-g979fbcf
sudo make
sudo make load

And finally you in theory can now install Bumblee
Code: [Select]
        tar xf bumblebee-3.0.tar.gz
cd bumblebee-3.0.tar.gz
./configure
make
make install
sudo addgroup bumblebee
sudo usermod -a -G bumblebee $USER

This is where I got stuck last time, as everytime I ran bumblebeed -v I would receive an error that the driver could not be found.  But since I now know where the files are at, I can edit the /usr/local/etc/bumblebee/bumblebee.conf
These are the settings that I setup in the [driver-nvidia] section
Code: [Select]
        KernelDriver=nvidia
Module=nvidia
LibraryPath=/usr/lib:/usr/local/lib
XorgModulePath=/usr/local/lib/X11/modules/drivers/nvidia_drv.so
XorgConfFile=/usr/local/etc/bumblebee/xorg.conf.nvidia

Once again try testing bumblebeed by running sudo bumblebeed -v
If bumblebeed starts without errors then you're doing good.  Just Ctrl+C out of it and then run
sudo bumblebeed --daemon

Now you should in theory be able to run optirun startx and everything should work.  But you will receive errors that your user is not part of the bumblebee group.
I attempted to run su - tc, but when I did that it kicked off startx for me, and pretty much crashed my system.  Basically the video wasn't working properly as I didn't have a properly configured xorg.conf, and I wasn't using bumblebee (optirun) for startx.  In theory if I setup my original xorg.conf with the fbdev driver then it wouldn't have crashed. 

Tomorrow I will attempt this again following these instructions, and in theory I will be able to keep from crashing my laptop before I can run through a real test.

I hope this helps.  Now that I think about it, I could create the bumblebee group before I really start, run the su - tc while still using xvesa and then starting the rest of the process.  I think that may work the best.

Let me know if you have any questions, or if you have any suggestions.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: Xorg black screen NVidia problem
« Reply #38 on: July 08, 2012, 11:44:24 PM »
Hi KHarvey
Quote
find /lib -newer /tmp/mark > list2.txt
You should make that  find  command more restrictive, you only want the driver (nvidia.ko). For example:
Code: [Select]
find /lib -newer NOW -not -type d | grep /lib/modules/`uname -r`/kernel/drivers/ > list.txt

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Re: Xorg black screen NVidia problem
« Reply #39 on: July 09, 2012, 02:04:48 PM »
Hi KHarvey
Quote
find /lib -newer /tmp/mark > list2.txt
You should make that  find  command more restrictive, you only want the driver (nvidia.ko). For example:
Code: [Select]
find /lib -newer NOW -not -type d | grep /lib/modules/`uname -r`/kernel/drivers/ > list.txt

LOL, more restrictive?  The first time that I did the find I just did find / -newer /temp/mark  needless to say I learned my lesson.  Thanks for the tip though.

Okay so I have been beating my head against this thing for a couple hours now and I haven't made any progress.  First I left out a dependency in my post above.  I just flat out forgot that I installed compiletc, so I will edit my post and add that.
I was also correct in the last part of my post, if I just create the bumblebee group at the beginning and do the su - tc then I am able to join the group without crashing the system.  Meaning install shadow-utils first, create the group, add the user to the group, switch to tc and then you're done.

On to my new found "technical difficulties".  So I am able to bumblebeed to run, but when I try to run optirun startx I receive the following error:
Code: [Select]
[ERROR] Cannot access secondary GPU - error:  [XORG] (EE) Failed to load module "extmod" (module does not exist, 0)
[ERROR] Aborting because fall back start is disabled

After some Googling the problem is that Xorg cannot find the proper driver and that is why I am receiving the error.  After attempting a handful of modprobes I still did not have any luck.  So then I started removing those modules from my xorg.conf.  At first I thought that I was on to something as every time I removed a module from Xorg I would receive an error with a different module name. 
Code: [Select]
Section "Module"
Load  "glx"
Load  "extmod"
Load  "dri2"
Load  "dri"
Load  "dbe"
EndSection

I have since removed all modules from my Xorg (one at a time I might add).  But now I am back to the first error about extmod.  I have checked all of the bumblebee.conf and xorg.conf's that I am able to find and I do not see any references to extmod.  Even if I change back to the original bumblebee/xorg.conf.nvidia I still receive the same error.

I think I have hit a wall.  Unless anyone has any bright ideas, I'm kind of stuck.

Pseudoman

  • Guest
Re: Xorg black screen NVidia problem
« Reply #40 on: July 09, 2012, 04:56:45 PM »
I don't know if this is necessarily related to your issue, but it might help:
On my own system, the Nvidia drivers load up without a problem. Loading the graphics drivers (as depended upon by Xorg-7.5-3d.tcz) causes similar symptoms to those you described, e.g. the black screen and unresponsiveness. It might be something to take a look at.

Offline defcronyke

  • Newbie
  • *
  • Posts: 1
Re: Xorg black screen NVidia problem
« Reply #41 on: August 14, 2012, 01:16:52 PM »
Hey TC peoples,
I don't know anything about Tiny Core Linux (except that it looks pretty awesome), but I thought you might want to see how I got the GT650M working with Bumblebee on Mint 13 and Ubuntu, as it may shed some light on the procedure you need to follow to make a TC solution. I'm sure you'll have to change the procedure a bit, but here's how I did it: (I can't post a link so google the terms: gt650m linux tutorial) My tutorial should be near the top of the google results, and it's called "Hybrid Graphics Tutorial - NVidia Optimus GT650M on Linux".

I hope that helps a bit, and sorry if Mint is just too different for the procedure to be at all applicable to your distro.