Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: KHarvey on June 30, 2012, 04:19:47 PM

Title: Xorg black screen NVidia problem
Post by: KHarvey on June 30, 2012, 04:19:47 PM
I have been working on this for a couple of days, and I have finally narrowed down the problem, but I haven't quite figured out how to fix the problem.
I just received my new Alienware laptop with a NVidia Geforce GT 650M video card.  I have found that whenever I install the nvidia-glx drivers my screen goes black and no key combination will bring it back to live.  I am able to install Xorg (7.5) but the first time I reboot, the screen comes to a black screen and no matter what I do I can't bring it back to life without powering it off.

After much reading and trial and error I found that if I install Xorg from the CLI, I am able to successfully install Xorg.  But if I try and run startx the screen will go black and never come back.
But if I install Xorg from the CLI and then install nvidia-glx and run startx I get a GUI again, but it is split in half horizontally, and the top 20% of the screen I am unable to access.
Now when I install nvidia-glx or nvidia-settings I receive an error during the install that I haven't found a fix for yet:
Code: [Select]
graphics-3.0.21-tinycore.tcz: OK
Downloading: nvidia-module-3.0.21-tinycore.tcz
[drm:intel_dsm_platform_ux_info] *ERROR* MUX INFO call failed
Connecting to distrob.ibiblio.org(152.19.134.43:80)
nvidi-module-3.0.21 100%

I think it might have to do with the fact that I think my laptop has a Intel video card, and an NVidia video card in it.  But I am not really sure.

A working setting that I have found is if I install Xorg from the CLI, then I installed nvidia-settings (not nvida-glx) from the CLI, then I can run Xorg -configure and then startx.  When I do this the GUI opens up and looks the way that it is supposed to.  But if I try and run the nvidia-settings app, it says that I do not have my xorg configured for nvidia.  If I go back out to a CLI and run nvidia-xconfig then when I try and run startx I receive the error
Code: [Select]
failed in waitforX
When I dig through the xorg.log.0 the error states that no monitors were found.
When I did a comparison of the xorg.conf for both Xorg -configure and nvidia-xconfig I found the one line that appears to be causing the problem.
Here is my Xorg -configure
Code: [Select]
Section "ServerLayout"
Identifier     "X.org Configured"
Screen      0  "Screen0" 0 0
Screen      1  "Screen1" RightOf "Screen0"
InputDevice    "Mouse0" "CorePointer"
InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
ModulePath   "/usr/local/lib/X11/modules"
FontPath     "/usr/local/lib/X11/fonts/misc/"
FontPath     "/usr/local/lib/X11/fonts/TTF/"
FontPath     "/usr/local/lib/X11/fonts/OTF"
FontPath     "/usr/local/lib/X11/fonts/Type1/"
FontPath     "/usr/local/lib/X11/fonts/100dpi/"
FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
Load  "glx"
Load  "extmod"
Load  "dri2"
Load  "dri"
Load  "dbe"
EndSection

Section "InputDevice"
Identifier  "Keyboard0"
Driver      "kbd"
EndSection

Section "InputDevice"
Identifier  "Mouse0"
Driver      "mouse"
Option     "Protocol" "auto"
Option     "Device" "/dev/input/mice"
Option     "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
Identifier   "Monitor0"
VendorName   "Monitor Vendor"
ModelName    "Monitor Model"
EndSection

Section "Monitor"
Identifier   "Monitor1"
VendorName   "Monitor Vendor"
ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "SWcursor"            # [<bool>]
        #Option     "HWcursor"            # [<bool>]
        #Option     "NoAccel"            # [<bool>]
        #Option     "ShadowFB"            # [<bool>]
        #Option     "UseFBDev"            # [<bool>]
        #Option     "Rotate"              # [<str>]
        #Option     "VideoKey"            # <i>
        #Option     "FlatPanel"          # [<bool>]
        #Option     "FPDither"            # [<bool>]
        #Option     "CrtcNumber"          # <i>
        #Option     "FPScale"            # [<bool>]
        #Option     "FPTweak"            # <i>
        #Option     "DualHead"            # [<bool>]
Identifier  "Card0"
Driver      "nv"
VendorName  "Unknown Vendor"
BoardName   "Unknown Board"
BusID       "PCI:1:0:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "ShadowFB"            # [<bool>]
        #Option     "Rotate"              # <str>
        #Option     "fbdev"              # <str>
        #Option     "debug"              # [<bool>]
Identifier  "Card1"
Driver      "fbdev"
VendorName  "Unknown Vendor"
BoardName   "Unknown Board"
BusID       "PCI:0:2:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device     "Card0"
Monitor    "Monitor0"
SubSection "Display"
Viewport   0 0
Depth     1
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     4
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     8
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     15
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     16
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     24
EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device     "Card1"
Monitor    "Monitor1"
SubSection "Display"
Viewport   0 0
Depth     1
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     4
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     8
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     15
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     16
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     24
EndSubSection
EndSection
Here is my nvidia-xconfig
Code: [Select]
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 280.13  (buildmeister@swio-display-x86-rhel47-05.nvidia.com)  Wed Jul 27 17:18:55 PDT 2011

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
    ModulePath      "/usr/local/lib/X11/modules"
    FontPath        "/usr/local/lib/X11/fonts/misc/"
    FontPath        "/usr/local/lib/X11/fonts/TTF/"
    FontPath        "/usr/local/lib/X11/fonts/OTF"
    FontPath        "/usr/local/lib/X11/fonts/Type1/"
    FontPath        "/usr/local/lib/X11/fonts/100dpi/"
    FontPath        "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
    Load           "glx"
    Load           "extmod"
    Load           "dri2"
    Load           "dbe"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Monitor Vendor"
    ModelName      "Monitor Model"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Monitor Vendor"
    ModelName      "Monitor Model"
EndSection

Section "Device"

        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "SWcursor"            # [<bool>]
        #Option     "HWcursor"            # [<bool>]
        #Option     "NoAccel"            # [<bool>]
        #Option     "ShadowFB"            # [<bool>]
        #Option     "UseFBDev"            # [<bool>]
        #Option     "Rotate"              # [<str>]
        #Option     "VideoKey"            # <i>
        #Option     "FlatPanel"          # [<bool>]
        #Option     "FPDither"            # [<bool>]
        #Option     "CrtcNumber"          # <i>
        #Option     "FPScale"            # [<bool>]
        #Option     "FPTweak"            # <i>
        #Option     "DualHead"            # [<bool>]
    Identifier     "Card0"
    Driver         "nvidia"
    VendorName     "Unknown Vendor"
    BoardName      "Unknown Board"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"

        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "ShadowFB"            # [<bool>]
        #Option     "Rotate"              # <str>
        #Option     "fbdev"              # <str>
        #Option     "debug"              # [<bool>]
    Identifier     "Card1"
    Driver         "nvidia"
    VendorName     "Unknown Vendor"
    BoardName      "Unknown Board"
    BusID          "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Card0"
    Monitor        "Monitor0"
    SubSection     "Display"
        Viewport    0 0
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       4
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       8
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       15
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       16
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Card1"
    Monitor        "Monitor1"
    SubSection     "Display"
        Viewport    0 0
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       4
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       8
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       15
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       16
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       24
    EndSubSection
EndSection

The first thing that I noticed is that in the Screen section I don't have a Depth of 1, so I added that into the nvidia-xconfig but I still received the failed in waitforX.  I then added in the Load "dri" but still no go.
The line that is causing all of my problems is in the second Device section.  The driver says "nvidia" in the nvidia-xconfig, but in the Xorg -configure it says "fbdev".  I found that if I change the nvidia-xconfig version to just have the fbdev then it works, but nvidia-settings still states that I am not using my nvidia driver and need to run nvidia-xconfig

Now on this laptop I have video outputs for:
Laptop screen
VGA
HDMI
DisplayPort

I am really not sure where to go from here.  I could probably manually edit my xorg.conf to make it do what I want in the future, but I would prefer to use the nvidia-settings (I'm kind of lazy).  Also I am not sure if everything is working properly since I am using the fbdev rather than nvidia.

I have a feeling that my video card may be a little too new for these drivers, and maybe I should try and download the Linux drivers from NVidia directly to try and get this to work.  But that may cause even more problems.

I am currently dual booting this laptop (Windows 7 and Backtrack), and that was a pain in itself to get working.  I would really like to use TC as my primary OS though.

All of this is running the TC 4.5.5 booted from the CD.  I have the same problem when I do the install, but testing from the CD is way faster to wipe and start over.

Does anyone have any suggestions?
Title: Re: Xorg black screen NVidia problem
Post by: curaga on June 30, 2012, 04:53:03 PM
Ouch, an Optimus laptop? Nvidia does not support Optimus on Linux.

In short, you can't control the Nvidia card properly (power saving etc), and can only run things on it with third-party hacks that may or may not work.
Title: Re: Xorg black screen NVidia problem
Post by: Rich on June 30, 2012, 05:18:55 PM
Hi KHarvey
If you can disable the video devices (maybe in the BIOS?) you could try setting them up one at a time and saving
the config files to new names. Then use the two config files to construct  a hopefully working one by hand.
The Nvidia config utility is misidentifying the Intel card as another Nvidia card.
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey on June 30, 2012, 06:12:52 PM
Ah crap, I completely forgot about Optimus.

I will continue to do some more reading on Optimus.

So basically the second device in the Xorg is the Intel video card.  When I run the nvidia-xconfig it is misinterpreting the Intel GPU as an NVidia GPU and assigning it an NVidia driver which is incorrect.  This is why I am unable to startx.
Now when I run the Xorg -configure it is still kind of misinterpreting the Intel GPU as it is adding it as a FrameBuffer (FBDev) driver rather than the Intel driver. 

I don't remember a setting in the BIOS for this, but I haven't rechecked it as of yet. 

While if I continue to run this way I will be running in a degraded state.  The question is how much of a degraded state will I be running in?  I would much rather use the NVidia GPU rather than the Intel GPU.
Power switching isn't that important to me.  My main goals will be standard desktop usage.  I am not really considered with 3D modeling, but I would very much like to use at least dual monitors (excluding laptop screen).

Eventually I would like to get into some CUDA development (one of the reasons I chose this card.....mistakenly) but I can always move that development into Windows if I must.

Title: Re: Xorg black screen NVidia problem
Post by: Rich on June 30, 2012, 08:29:39 PM
Hi KHarvey
Though it can be long and a bit tedious to look through, I would suggest you go through the /var/log/Xorg.0.log
file to get a better idea of what xorg thinks it sees when it makes decisions. If you can't disable a video card
any other way, removing references to the card you wish to disable in the xorg.conf file may be sufficient. That
way you figure out what it takes to get one card functioning correctly without the other one getting in the way.
Don't forget to modify the ServerLayout section to indicate only one screen instead of two.
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey on June 30, 2012, 08:35:29 PM
I figured out a little bit more.  When I run startx I am using the second screen section which is using Card0 which is the fbdev driver on Monitor1.  If I try to use Card0 for Monitor1 then I receive an error that no monitors could be found.

So it appears that I may not be able to use my nvidia card at all.  I am running at my max resolution on TC though, even though I am using fbdev.  I guess this means that my battery life will be longer.

Is there anyway for me to switch over to the NVidia GPU?

I will keep reading and trying more things to see if I can figure this out.
Title: Re: Xorg black screen NVidia problem
Post by: Rich on June 30, 2012, 09:42:56 PM
Hi KHarvey
According to the nvidia-xconfig
Quote
# nvidia-xconfig:  version 280.13 ...
But if you check:
Quote
http://www.nvidia.com/object/linux-display-amd64-280.13-driver.html
It does not list the GT650M as one of the supported cards. According to Nvidia, you want:
http://www.nvidia.com/object/linux-display-ia32-295.59-driver.html
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey on June 30, 2012, 09:51:51 PM
Okay I have combed through every line in my Xorg.0.log (thanks Rich).  I think reading each line put me on the right track.  I believe I am farther away than what I originally thought.

According to the Xorg.0.log it failed to load the NVIDIA kernel module.  So I then checked DMESG and read through every line on there.  If I would have been smart I would have just tailed DMESG and found what I needed, but oh well.
Inside DMESG I show that the Intel GPU is loaded without issue:  (well minus the MUX error)
Code: [Select]
Linux agpgart interface v0.103
agpgart-intel 0000:00:00.0:  Intel Ivybridge Chipset
agpgart-intel 0000:00:00.0:  detected gtt size:  2097152K total, 262144K mappable
agpgart-intel 0000:00:00.0:  detected 65536K stolen memory
agpgart-intel 0000:00:00.0:  AGP aperture is 256M @ 0xc0000000
[drm] Initialized drm 1.1.0 20060810
i915 0000:00:02.0:  PCI INT A -> GSI 16 (level, low) -> IRQ 16
i915 0000:00:02.0:  setting latency timer to 64
mtrr:  no more MTRRs available
[drm] MTRR allocation failed.  Graphics performance may suffer.
i915 0000:00:02.0:  irq 44 for MSI/MSI-X
[drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[drm] Driver supports precise vblank timestamp query.
[drm:intel_dsm_platform_mux_info] *ERROR* MUX INFO call failed
vgaarb:  device changed decodes:  PCI:0000:00:02.0,olddecodes=io*mem,decodes=none:owns=io+mem
vgaarb:  transferring owner from PCI:0000:00:02.0 to PCI:0000:01:00.0
fbcon:  inteldrmfb (fb0) is primary device
Console:  switching to colour frame buffer device 200x56
fb0:  inteldrmfb frame buffer device
drm:  registered panic notifier
[For,ware Big]:  ACP(PEGP) defines _DOD but not _DOS
acpi device:3c:  registered as cooling_device13
input:  Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:3a/LNXVIDEO:00/input/input7
ACPI:  Video Device [PEGP] (multi-head:  yeas  rom:  yes  post:  no)
acpi device:48:  registered as cooling_device14
input:  Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIEDEO:01/input/input8
ACPI:  Video Device [GFX0] (multi-head:  yes  rom:  no post:  no)
[drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
nvidia 0000:01:00.0:  power state changed by ACPI to D0
nvidia 0000:01:00.0:  power state changed by ACPI to D0
nvidia 0000:01:00.0:  enabling device (0006 -> 0007)
nvidia 0000:01:00.0:  PCI INT A -> GSI 16 (level, low) -> IRQ 16
nvidia 0000:01:00.0:  setting latency timer to 64

But here is where the problem lies.  I am failing to load the NVDIA GPU:
Code: [Select]
[drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
nvidia 0000:01:00.0:  power state changed by ACPI to D0
nvidia 0000:01:00.0:  power state changed by ACPI to D0
nvidia 0000:01:00.0:  enabling device (0006 -> 0007)
nvidia 0000:01:00.0:  PCI INT A -> GSI 16 (level, low) -> IRQ 16
nvidia 0000:01:00.0:  setting latency timer to 64
vgaarb:  device changed decodes:  PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=none
NRM:  The NVIDIA GPU 0000:01:00.0 (PCI ID:  10de:0fd1) installed
NVRM:  in this system is not supported by the 280.13 NVIDIA Linux
NVRM:  graphics driver release.  Please see 'Appendix A -
NVRM:  Supported NVIDIA GPU Products' in this release's README,
NVRM:  available on the Linux graphics driver download page at
NVRM:  www.nvidia.com
nvidia 0000:01:00.0:  PCI INT A disabled
nvidia:  probe of 0000:01:00.0 failed with error -1
NVRM:  The NVIDIA probe routine failed for 1 device(s)
NVRM:  None of the NVIDIA graphics adapters were initialized!

So my thought is that I don't have the proper NVIDIA driver for this GPU.  I am going to try and download the NVIDIA driver direct and see if loading that might solve my current issue. 
Unless someone else has a better suggestion?   :)

Worst case I may just build this using the Intel GPU and see how it performs.  But I will try to leave that as a worst case option.
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey on June 30, 2012, 09:53:38 PM
Hi KHarvey
According to the nvidia-xconfig
Quote
# nvidia-xconfig:  version 280.13 ...
But if you check:
Quote
http://www.nvidia.com/object/linux-display-amd64-280.13-driver.html
It does not list the GT650M as one of the supported cards. According to Nvidia, you want:
http://www.nvidia.com/object/linux-display-ia32-295.59-driver.html

LOL, thanks for the reply.  You seem to only reply while I am typing up my reply  ;)
I guess I need to learn to type faster.

So from my last post it does appear that I need to try the driver directly from NVIDIA.  I will attempt to load that now, and I will post back my findings.  Once again thank you for your help with this.  I swear I am getting smarter, and am able to solve some of my own issues  ;)
Title: Re: Xorg black screen NVidia problem
Post by: Rich on June 30, 2012, 10:17:31 PM
Hi KHarvey
Please read the following thread for an exciting preview of what you may be in for:
http://forum.tinycorelinux.net/index.php/topic,12965.msg71206.html#msg71206
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey on June 30, 2012, 10:31:17 PM
I read that thread a little bit earlier.  I'm currently re-reading it, thanks.

I was trying to follow the directions from Arslan S. in this thread:
http://forum.tinycorelinux.net/index.php/topic,2635.msg19712.html#msg19712
But the first problem that I ran into appears that the Linux Headers in the repository are from an older version of TC.  Or at least I am receiving mismatch errors when I try to run the NVIDIAxxx.run
I tried it using the linux-headers-3.0.3-tinycore.tcz

I just rebooted, and I am attempting again using the linux-headers-3.0.21-tinycore.tcz to see if that works.  If that doesn't work, I will reboot again and try again with the linux-3.0.1_api_headers.tcz

Is there a way for me to uninstall using "ab" that way I don't have to reboot each time and reinstall everything?
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey on June 30, 2012, 10:42:21 PM
I guess I should have ran a uname first.  uname -r shoes 3.0.21-tinycore, so I should have started with linux-headers-3.0.21-tinycore.tcz

Installing everything again now.  I should be able to post my results in another 10 - 15 minutes.
Title: Re: Xorg black screen NVidia problem
Post by: Rich on June 30, 2012, 10:57:59 PM
Hi KHarvey
Quote
Is there a way for me to uninstall using "ab" that way I don't have to reboot each time and reinstall everything?
No, AppBrowser marks extensions for removal but does not actually remove them until you reboot. You might
want to plug in a thumb drive to use as temporary persistent storage.
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey on July 01, 2012, 01:24:23 AM
I apologize for the late response.  After 12 straight hours I needed a break.

So I was correct, when I used linux-headers-3.0.21-tinycore.tcz I was able to make it past the headers error.  Although it failed again, because of a similar error with the GCC not matching up.  But I found the fix for that, I had to run the command:
Code: [Select]
sudo sh /.NVIDIAxxxx.run -k $(uname -r)

Once I ran that it compiled and installed without issue.

My xorg.conf is quite a bit smaller this time, I only have the NVidia stuff in it.  But when I try to startx it pauses for several seconds and then says failed in waitforx. 
When I check Xorg.0.log it appears it still can't load the driver:
Code: [Select]
(EE) NVIDIA:  Failed to load the NVIDIA kernel module
(II) UnloadModule:  "nvidia"
(II) Unloading /usr/local/lib/X11/modules/drivers/nvidia_drv.so
(EE) Failed to load module "nvidia" (module-specific error, 0)
(EE) No drivers available
Fatal server error:  no screens found

When I check dmesg it appears the driver loaded properly this go around.  But at the bottom I have numerous errors that say:
Code: [Select]
nvidia:  Unknown symbol agp_bridges (err 0)
nvidia:  Unknown symbol agp_free_memory (err 0)
nvidia:  Unknown symbol agp_allocate_memory (err 0)
nvidia:  Unknown symbol agp_unbind_memory (err 0)
nvidia:  Unknown symbol agp_copy_info (err 0)
nvidia:  Unknown symbol agp_backend_release (err 0)
nvidia:  Unknown symbol agp_bind_memory (err 0)
nvidia:  Unknown symbol agp_enable (err 0)
nvidia:  Unknown symbol agp_backend_acquire (err 0)

Well, back to Googling some more.

*Edit*
Sorry, I forgot to put that I can't modprobe agpgart
Code: [Select]
modprobe:  module agpgart not found in modules.dep
Also I couldn't modprobe nvidia:
Code: [Select]
modprobe:  can't load module nvidia (kernel/drivers/video/nvidia.ko):  unknown symbol in module, or unknown parameter
Title: Re: Xorg black screen NVidia problem
Post by: Juanito on July 01, 2012, 01:29:12 AM
When I check dmesg it appears the driver loaded properly this go around.  But at the bottom I have numerous errors that say...

Those errors look like they occur because the agp driver is not loaded
Title: Re: Xorg black screen NVidia problem
Post by: Rich on July 01, 2012, 01:30:03 AM
Hi KHarvey
Does running:
Code: [Select]
ldd /usr/local/lib/X11/modules/drivers/nvidia_drv.soreveal anything interesting?
Title: Re: Xorg black screen NVidia problem
Post by: Rich on July 01, 2012, 01:35:48 AM
Hi KHarvey
Quote
modprobe:  module agpgart not found in modules.dep
Is  graphics-3.0.21-tinycore.tcz  loaded?
Title: Re: Xorg black screen NVidia problem
Post by: curaga on July 01, 2012, 06:53:13 AM
In a typical Optimus setup, all screens are connected to the Intel card. On linux, due to Nvidia's lack of support, the Nvidia card is always running, costing you battery life. And you can't even use it with all apps (the bumblebee hack doesn't really work with every app). Also due to that lack of support, you can't install the Nvidia driver manually, you must use the bumblebee script.

As for why Xorg loaded fbdev instead of intel, your chip is very new, in fact it's surprising it even runs with a 3.0 kernel.


--

In short, for using the Nv card, especially on battery, you don't really have a choice other than Windows. Linux distros will run on the Intel card, with the Nvidia card still using battery on the background.

With bumblebee you may be able to run some apps on the Nv card while still outputting to the Intel card. But it's a hack, in the bad sense.
Title: Re: Xorg black screen NVidia problem
Post by: Juanito on July 01, 2012, 06:58:07 AM
If you can manage a (u)efi boot, you may be able to turn off the nvidia card using a "setpci" command - this seems to be possible on the mac minis with dual video cards...
Title: Re: Xorg black screen NVidia problem
Post by: Rich on July 01, 2012, 08:52:08 AM
Hi KHarvey
This may be of some help:
http://us.download.nvidia.com/XFree86/Linux-x86/295.59/README/optimus.html
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey on July 01, 2012, 01:16:43 PM
Well, it doesn't appear to look good. for the NVidia drivers.  :'(

I made it to a point late last night where I wasn't really getting any errors, it just wasn't working.
It just kept saying no screens found, but there really wasn't anything else in dmesg or the Xorg.0.log.

I'll go ahead and setup my laptop with TC using the drivers I already have, and run with it.  I need to buy a couple of cables to test out the dual monitor support.  If I am able to get that working then I should be able to run with it.  As I said before I will be tri-booting this with Windows 7, Backtrack and Tiny Core.

I will also try and file some complaints with NVidia to see if they will actually write a driver.  While my complaint will probably insignificant, the more people that complain the more the demand will be driven up, and in theory the sooner they will come up with some drivers.

Thank you all for your help with this.  I realized once the word Optimus was spoken that I was most likely screwed, but I wanted to at least try.  Once again thank you all for helping me on this.
Title: Re: Xorg black screen NVidia problem
Post by: Rich on July 01, 2012, 01:23:30 PM
Hi KHarvey
Quote
It just kept saying no screens found,
Quote
I need to buy a couple of cables to test out the dual monitor support.
You might be getting the no screens message because the second monitor is not connected?
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey on July 01, 2012, 01:34:44 PM
Hi KHarvey
Quote
It just kept saying no screens found,
Quote
I need to buy a couple of cables to test out the dual monitor support.
You might be getting the no screens message because the second monitor is not connected?

Yeah, my baseless assumption is that the NVidia drivers will run the external monitors while the Intel drivers will run the screen.  My next problem is I am not really sure how to install the Intel drivers now, since I am not using the nvidia-glx.tcz the Intel drivers never appeared.
I will dig through the dependencies on nvidia-glx.tcz to see if I can find the right package to get the fbdev drivers installed.  I think that I would prefer to run with the NVidia drivers that I was able to get compiled and working last night, rather than just the nvidia-glx.  But that will depend on how far I am able to go with it.
Title: Re: Xorg black screen NVidia problem
Post by: Rich on July 01, 2012, 01:45:33 PM
Hi KHarvey
Did you read the link in reply # 19 about installing on Optimus?
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey on July 01, 2012, 02:15:50 PM
Yup, I have read the link.  When I tried nvidia-xconfig --query-gpu-info it just flat crashed the laptop, and the whole thing shutdown.  That has been the first time that has happened to me while using TC.
Title: Linux supports Optimus
Post by: Capodastro on July 02, 2012, 06:24:43 AM
Hi, I am new here and still no idea about installing nvidia drivers in tc!
However I can provide some infos about optimus and linux: I mantain linux on machines of my friends (addefinitely  I have too many friends) and some laptops are new.
First of all. LINUX SUPPORTS OPTIMUS!!!
The project name is Bumblebee, originally started by Ubuntu, but a few days ago I installed Opensuse on an Optimus laptop. The system works 100%, compiz, se7en on vmplayer and little opengl games included. No idea about big games. The best results are on Ubuntu, Bumblebee v.3 installed. Opensuse has a solid tradition concerning bugs, so, the only working version in the Suse repos was 1.7. Perhaps meantime the made corrections but I don't belive. I fully understand our moderator, linux evolves quite fast and I had to google desesperately before finding the repos. In my impression tc should prepare quickly such packages because since many months all laptops with nvidia  cards are optimus!
About nvidia that doesn't support optimus on linux, the reason is the disagreement between nvidia and linux kernel programmers concernig gpl versus proprietary. I save you the technical details.
Title: Re: Linux supports Optimus
Post by: Juanito on July 02, 2012, 06:49:09 AM
In my impression tc should prepare quickly such packages because since many months all laptops with nvidia  cards are optimus!

I'm sure a contributed extension would be much appreciated  ;)
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey on July 02, 2012, 03:41:24 PM
I'm almost to the point of sending the laptop back and trying to find something that will more closely suit my needs.

I am now running fbdev and the updated NVIDIA drivers, so far without issues. 
The laptop has 4 video outputs:
Laptop Screen
VGA
HDMI
DP

From what I can tell the HDMI and DP are attached to the NVIDIA GPU while the VGA and the laptop screen are attached to the Intel GPU.

I would love to get this thing running with 2 external monitors (excluding the laptop screen).  But that is probably just a pipe dream.
Currently I am able to get the laptop screen to work, and a VGA monitor to work at the same time.  The problem is though that they are clones of each other.  If I run xrandr -q it only shows that 1 screen (laptop) is connected.
I tried adding:
Option "Xinerama" "on"
Option "Clone" "off"
to my xorg.conf, but there was no change.

When I check lspci I show that I have 2 VGA's
00:02.0 VGA Intel Device 0166 (rev 09)
01:00.0 VGA nVidia Device ofd1 (rev a1)

I'll continue reading, but any direction would be greatly appreciated.
Title: Re: Linux supports Optimus
Post by: KHarvey on July 02, 2012, 04:12:01 PM
In my impression tc should prepare quickly such packages because since many months all laptops with nvidia  cards are optimus!

I'm sure a contributed extension would be much appreciated  ;)

If I get a chance tonight, I will try downloading it and see what it takes to get it working.  If I can get it working, then I'll try to create an extension for it.
Capodastro, unless you are more adept at creating extensions than I am  ;)
Title: Re: Xorg black screen NVidia problem
Post by: Capodastro on July 03, 2012, 09:05:43 AM
ehi, I wrote you I am a complete newby!  :)
however, I will be glad to do what I can to help you!
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey 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.
Title: Re: Xorg black screen NVidia problem
Post by: Capodastro 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?
Title: Re: Xorg black screen NVidia problem
Post by: curaga on July 06, 2012, 06:00:59 AM
One correction, the Intel card does have 3d (and quite capable in Ivy Bridge, too).
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey 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.  :)
Title: Re: Xorg black screen NVidia problem
Post by: Rich 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.
Title: Re: Xorg black screen NVidia problem
Post by: curaga 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.
Title: Re: Xorg black screen NVidia problem
Post by: Capodastro 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!
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey 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.
Title: Re: Xorg black screen NVidia problem
Post by: Rich 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
Title: Re: Xorg black screen NVidia problem
Post by: KHarvey 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.
Title: Re: Xorg black screen NVidia problem
Post by: Pseudoman 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.
Title: Re: Xorg black screen NVidia problem
Post by: defcronyke 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.