SGX installation gives be black screen

Hi all,
I've got a BB xM with Ubuntu 10.10 installed. Worked fine so far,
until I tried installing the SGX acceleration, following
http://elinux.org/BeagleBoardUbuntu#SGX_Video_Acceleration
I followed all the steps and it seemed to go fine. But now on reboot
all I get for X display is a black screen (the text consoles work
fine).

Uname:
Linux mana 2.6.35.8-l7 #1 PREEMPT Wed Nov 10 12:12:44 UTC 2010 armv7l
GNU/Linux

dmesg:
http://pastebin.com/zguGyj46

Xorg log: http://pastebin.com/iRETKkF0

If I try to restart pvr, I do get the Stopping/Starting PVR, but it
doesn't fix the issue, and I see this in the dmesg:

[ 597.239746] ------------[ cut here ]------------
[ 597.239807] WARNING: at fs/proc/generic.c:810 remove_proc_entry
+0x284/0x2e8()
[ 597.239807] name 'mmap'
[ 597.239807] Modules linked in: binfmt_misc pvrsrvkm(C-) joydev
mailbox_mach smsc95xx usbhid rtc_twl mailbox rtc_core gpio_keys [last
unloaded: omaplfb]
[ 597.239898] [<c00512a0>] (unwind_backtrace+0x0/0x100) from
[<c06386f0>] (dump_stack+0x18/0x1c)
[ 597.239929] [<c06386f0>] (dump_stack+0x18/0x1c) from [<c0085818>]
(warn_slowpath_common+0x5c/
0x6c)
[ 597.239959] [<c0085818>] (warn_slowpath_common+0x5c/0x6c) from
[<c00858cc>] (warn_slowpath_fmt+0x38/0x40)
[ 597.239990] [<c00858cc>] (warn_slowpath_fmt+0x38/0x40) from
[<c01abe80>] (remove_proc_entry+0x284/0x2e8)
[ 597.240081] [<c01abe80>] (remove_proc_entry+0x284/0x2e8) from
[<bf097920>] (RemoveProcEntry+0x24/0x28 [pvrsrvkm])
[ 597.240173] [<bf097920>] (RemoveProcEntry+0x24/0x28 [pvrsrvkm])
from [<bf096f14>] (PVRMMapCleanup+0x64/0x80 [pvrsrvkm])
[ 597.240234] [<bf096f14>] (PVRMMapCleanup+0x64/0x80 [pvrsrvkm]) from
[<bf0a3970>] (PVRCore_Cleanup+0x5c/0x6c [pvrsrvkm])
[ 597.240234] unwind: Index not found bf0a3970
[ 597.240234] ---[ end trace 1b75b31a2719ed1e ]---
[ 597.261138] pvrsrvkm: module is from the staging directory, the
quality is unknown, you have been warned.
[ 597.296752] omaplfb: module is from the staging directory, the
quality is unknown, you have been warned.
[ 597.322296] bufferclass_ti: module is from the staging directory,
the quality is unknown, you have been warned.

Any clue someone? Did I do something wrong somewhere?

Cheers,
A.

Still work fine here, with my Bx, Cx and xM A with ubuntu 10.10...

So... Starting from the beginning what path did you take to get where you are?

Which Demo Image? (ubuntu-10.10-r4-minimal-armel.tar.7z)
What packages did you install? (xfce i'm guessing:
xfce4,gdm,xubuntu-gdm-theme,xubuntu-artwork)
Ran: create_sgx_package.sh
Copied: GFX_4_00_00_01_libs.tar.gz and GFX_Linux_SDK.tar.gz
Ran/scripts from: GFX_4_00_00_01_libs.tar.gz

Work for me...

Regards,

If I remember correctly, I started with ubuntu-10.10-r4-minimal-armel.tar.7z, then xfce, then went for the unity desktop interface. That’s when I tried to install SGX as you said: copied GFX files, ran install and then run, got the proper PowerVR messages (detecting ES5).
I re-downloaded the SGX files in case that may be a problem, but got the same md5 sum and same result so I’m assuming I have the proper binaries.

Do you know the actual package name for unity?

It's worth a shot.. (i've tried to replicate this about half a dozen
times this week..)

Regards,

Ahh. i see the issue now... There's really nothing we can do about it..

Other then your display NOT working (which is a different bug), it
actually doesn't seem to effect the sgx graphics core.

For example, after restarting it (and getting that same error) i can
still fire up one of the OGLES demos's just fine..

http://rcn-ee.homeip.net:81/testing/sgx-2.6.37-xm/screenshot.jpg

BTW: this might have been fixed in the SGX 4.03.00.01 release, but
since i haven't got that working yet i don't know..

Regards,

and then i found Ricardo's 2 line patch, it's fixed..

http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/natty/powervr-omap3/natty/view/head:/debian/patches/03-fixing-remove-proc-without-debug.patch

Regards,

I forgot to add that I tried one of the pvr test executables from my console shell and it did seem to work (displayed some image of a car on a white background). But that was directly over the console display, not through the X display.
Are you saying there’s a patch out there that fixes this issue? Should I try to recompile my kernel with that patch, or install a different kernel version?
Cheers,
A.

I forgot to add that I tried one of the pvr test executables from my console
shell and it did seem to work (displayed some image of a car on a white
background). But that was directly over the console display, not through the
X display.

There's both console and X11 based demo's in the SDK..

Are you saying there's a patch out there that fixes this issue? Should I try
to recompile my kernel with that patch, or install a different kernel
version?

Yes, there is a patch:

diff --git a/drivers/staging/omap3-sgx/services4/srvkm/env/linux/mmap.c
b/drivers/staging/omap3-sgx/services4/srvkm/env/linux/mmap.c
index 774d5ea..0372148 100644
--- a/drivers/staging/omap3-sgx/services4/srvkm/env/linux/mmap.c
+++ b/drivers/staging/omap3-sgx/services4/srvkm/env/linux/mmap.c
@@ -978,7 +978,9 @@ PVRMMapCleanup(IMG_VOID)
     }
     PVR_ASSERT(list_empty((&g_sMMapAreaList)));

+#if defined(DEBUG_LINUX_MMAP_AREAS)
     RemoveProcEntry("mmap");
+#endif

     if(g_psMemmapCache)
     {

I pushed it to my tree:
https://code.launchpad.net/~beagleboard-kernel/+junk/2.6-stable

In the end it's just a warning, when restarting the sgx drivers.... So
you can rebuild it if you want..

Regards,

The pvrtest2d binary doesnt use the 3d pipeline, so it can even work without 3d drivers (the image of the car displayed in the framebuffer is not an indication of a working sgx path)

In the SGX SDK tools there are other binaries to test the sgx initialization, have you tested them?

what are the contents of your powervr.ini file?

Lioric

Hi Robert,

I pulled your tree and compiled it following the readme by running build_kernel, however I’m not quite sure what to do with the result.

I’ve tried running tools/load_uImage on my current sd card but the result doesn’t seem to be right. Half of the time it says it could not mount the root fs (and half the time it seems to find it, but still spits out messages like “Could not load /lib/modules/2.6.37-x2.1/modules.dep” in the boot log that I then don’t see in dmesg). I have tried rebuilding uInitrd and boot.scr as well but this did not seem to have an effect. I have tried running build_deb and then installing the packages on the BB but it doesn’t seem very successful (the image package complains about the headers package missing, and the firmware package complains that there is another firmware package in the way).

Is there something else that I should do with the newly compiled kernel? Sorry if that sound like stupid questions, but I’m not exactly an expert in this, although the existing scripts do help a lot.

Apart from that, in the cases where I managed to get the 2.6.37 kernel booting (although I’m not confident it was all clean), that message did indeed disappear when trying to restart pvr, but I am still faced with a black screen in lieu of an X session. My display is otherwise working fine in text mode and was working like a charm with the default display drivers. Also, running /usr/bin/ES5.0/pvr2d_test does display an image over my console screen, so somehow it feels like the display is not to blame. Am I wrong?

Thanks a lot for your help,
A.

Hi Robert,
I pulled your tree and compiled it following the readme by running
build_kernel, however I'm not quite sure what to do with the result.
I've tried running tools/load_uImage on my current sd card but the result
doesn't seem to be right. Half of the time it says it could not mount the
root fs (and half the time it seems to find it, but still spits out messages
like "Could not load /lib/modules/2.6.37-x2.1/modules.dep" in the boot log
that I then don't see in dmesg).

I'm worried about the, 'could not mount the rootfs' the modules.dep is
fine, and normal.. ("sudo depmod -a" on target would fix it.. kinda
impossible from the development pc"

I have tried rebuilding uInitrd and
boot.scr as well but this did not seem to have an effect. I have tried
running build_deb and then installing the packages on the BB but it doesn't
seem very successful (the image package complains about the headers package
missing, and the firmware package complains that there is another firmware
package in the way).

The image package shouldn't care for the headers, i never install
them.. The firmware *.deb is worthless since very little firmware is
in linux-2.6 anymore.. (just because deb-pkg auto generates them,
doesn't me we should use them)

Is there something else that I should do with the newly compiled kernel?
Sorry if that sound like stupid questions, but I'm not exactly an expert in
this, although the existing scripts do help a lot.

The 'fix' is also in this kernel:

http://rcn-ee.net/deb/maverick/v2.6.37.1-x2/

so on the beagle: "wget
http://rcn-ee.net/deb/maverick/v2.6.37.1-x2/install-me.sh&quot;

run: "/bin/bash install-me.sh"

Reboot

Apart from that, in the cases where I managed to get the 2.6.37 kernel
booting (although I'm not confident it was all clean), that message did
indeed disappear when trying to restart pvr, but I am still faced with a
black screen in lieu of an X session. My display is otherwise working fine
in text mode and was working like a charm with the default display drivers.
Also, running /usr/bin/ES5.0/pvr2d_test does display an image over my
console screen, so somehow it feels like the display is not to blame. Am I
wrong?

Maybe i'm missing a small detail from the previous emails, but what
"display driver" are you actually running??

With my directions, i'm recommending you install
"xserver-xorg-video-omap3" which is only a fake/neon/framebuffer
driver.. The sgx drivers are only for 3d, so they shouldn't touch the
framebuffer till you start up a 3d application.. So the blank x11
screen on startup is weird, because "you've just installed the sgx
drivers" makes no sense.. something seems to be causign that.. can you
dump for your full ".deb" installed list.. "dpkg -l > package.list" to
pastebin.com.. (it's way to big for this list..)

Reference: http://rcn-ee.homeip.net:81/testing/sgx-2.6.37-xm/package.list

Regards,

Hi Robert,
I pulled your tree and compiled it following the readme by running
build_kernel, however I’m not quite sure what to do with the result.
I’ve tried running tools/load_uImage on my current sd card but the result
doesn’t seem to be right. Half of the time it says it could not mount the
root fs (and half the time it seems to find it, but still spits out messages
like “Could not load /lib/modules/2.6.37-x2.1/modules.dep” in the boot log
that I then don’t see in dmesg).

I’m worried about the, ‘could not mount the rootfs’ the modules.dep is
fine, and normal… (“sudo depmod -a” on target would fix it… kinda
impossible from the development pc"

I have tried rebuilding uInitrd and
boot.scr as well but this did not seem to have an effect. I have tried
running build_deb and then installing the packages on the BB but it doesn’t
seem very successful (the image package complains about the headers package
missing, and the firmware package complains that there is another firmware
package in the way).

The image package shouldn’t care for the headers, i never install
them… The firmware *.deb is worthless since very little firmware is
in linux-2.6 anymore… (just because deb-pkg auto generates them,
doesn’t me we should use them)

Is there something else that I should do with the newly compiled kernel?
Sorry if that sound like stupid questions, but I’m not exactly an expert in
this, although the existing scripts do help a lot.

The ‘fix’ is also in this kernel:

http://rcn-ee.net/deb/maverick/v2.6.37.1-x2/

so on the beagle: “wget
http://rcn-ee.net/deb/maverick/v2.6.37.1-x2/install-me.sh

run: “/bin/bash install-me.sh”

Reboot

Ok, I’ll try that. I’ve reverted to 2.6.35 for now, trying to tackle one problem at a time.

Apart from that, in the cases where I managed to get the 2.6.37 kernel
booting (although I’m not confident it was all clean), that message did
indeed disappear when trying to restart pvr, but I am still faced with a
black screen in lieu of an X session. My display is otherwise working fine
in text mode and was working like a charm with the default display drivers.
Also, running /usr/bin/ES5.0/pvr2d_test does display an image over my
console screen, so somehow it feels like the display is not to blame. Am I
wrong?

Maybe i’m missing a small detail from the previous emails, but what
“display driver” are you actually running??

With my directions, i’m recommending you install
“xserver-xorg-video-omap3” which is only a fake/neon/framebuffer
driver… The sgx drivers are only for 3d, so they shouldn’t touch the
framebuffer till you start up a 3d application… So the blank x11
screen on startup is weird, because “you’ve just installed the sgx
drivers” makes no sense… something seems to be causign that…

Indeed what you say makes total sense. And I’ve only ever used xserver-xorg-video-omap3 AFAIK.
Here is the dpkg -l dump: http://pastebin.com/QeAMNGHP
Now I’m just remembering that the unity-netbook system has a mode where it tried to use “graphics acceleration” (meaning opengl if I understood correctly) to display the desktop. I’m pretty sure I did disable that (since it couldn’t work on the bb) and set unity-desktop as default (which is supposed to be purely 2d as opposed to netbook), but still this seems to me the most likely cause at the moment.
In addition, I just tried disabling PVR (sudo update-rc.d pvr disable) and the problem still persists. I’m wondering if, seeing GL libraries, unity doesn’t try to start in 3D mode or something along those lines…

Tried ‘uninstalling’ SGX by removing the files installed by install-SGX.sh… didn’t change anything.
Tried disabling AIGLX in xorg.conf… didn’t change anything.
Tried changing the resolution in boot.cmd… didn’t fix the problem.
Tried switching between xserver-xorg-video-omap3 and xserver-video-omapfb… didn’t fix the problem.
Tried purging unity, gdm and xfce4 before reinstalling gdm+xfce as per the BeagleBoardUbuntu wiki page…Still getting a black screen!

I’m not quite sure what else to try here, apart from wiping the SD card and starting fresh. Still, I’d like to understand what went wrong… Anyone got any fresh idea?

Now I can see this at the end of the Xorg log after I try switching back and forth between the console screen and the X screen, don’t know if it’s related to anything at this point:

[ 17.691] (NI) OMAPFBSaveScreen: Dim backlight?
[ 188.150] (NI) OMAPFBLeaveVT
[ 189.670] (NI) OMAPFBEnterVT
[ 189.670]
Fatal server error:
[ 189.670] EnterVT failed for screen 0
[ 189.670]
[ 189.670]
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 189.670] Please also check the log file at “/var/log/Xorg.0.log” for additional information.
[ 189.670]
[ 189.671] (II) twl4030_pwrbutton: Close
[ 189.671] (II) UnloadModule: “evdev”
[ 189.672] (II) HID Keyboard Device: Close
[ 189.672] (II) UnloadModule: “evdev”
[ 189.672] (II) HID Keyboard Device: Close
[ 189.672] (II) UnloadModule: “evdev”
[ 189.672] (NI) OMAPFBLeaveVT
[ 189.681] ddxSigGiveUp: Closing log

Okay, looking at the package list, i see a potential problem..

ii libegl1-sgx-omap3 3.01.00.07-0ubuntu2
ii libgles1-sgx-omap3 3.01.00.07-0ubuntu2
ii libgles2-sgx-omap3 3.01.00.07-0ubuntu2
ii opengles-sgx-omap3 3.01.00.07-0ubuntu2

^^^ these are for Ubuntu's omap kernel.. (my script install's sgx
version: 4.00.00.01)

ii linux-image-2.6.35-22-omap 2.6.35-22.35
ii linux-image-2.6.37-x2.1 1.0cross

^^ some bits of Ubuntu's kernel are still there.

This is a situation, i've hoped no one would try. (i've never tested
it myself..) Your going to have to start from scratch, right now your
sd card, either install Ubuntu's sgx implementation with 2.6.35 or
mine with 2.6.37 "not both"..

Regards,

I've seen this issue with another user, it also happens in lucid..
Haven't really had a free moment to test with Angstrom.. but i'm
guessing either an ddx-omap3 bug or it's just not implemented.. Also
haven't tried just using a pure fbdev over omap3 driver..

Regards,

Hi Robert,
I just restarted from scratch as you suggested:

  • Downloaded you latest ‘minimal’ archive
  • Extracted, launched setup_sdcard over the old one
  • Copied some /etc files back from the backup for network config etc.
  • Booted with the new card, went fine
  • Installed xfce4 etc as per the wiki
  • Rebooted, got the proper gnome login screen into xfce4, could sign in fine
  • Copied, extracted and run the SGX install
  • After running install_sgx, run_sgx gave me an error message (something like ‘could not find powervr-srv’), so I thought I might need to reboot
  • After reboot… black screen again in lieu of X display!
  • run_sgx doesn’t complain this time, but that obviously doesn’t fix the problem.
    I’m kinda lost here… Could this be a hardware issue? Should I try with another distribution, or with some debug kernel?

Dmesg: http://pastebin.com/2zgrjMcq
Xorg.0.log: http://pastebin.com/6XERv4u4
dpkg -l: http://pastebin.com/H7Ty5gLj

Cheers,
A.

Hi Robert,
I just restarted from scratch as you suggested:

Downloaded you latest 'minimal' archive
Extracted, launched setup_sdcard over the old one
Copied some /etc files back from the backup for network config etc.
Booted with the new card, went fine
Installed xfce4 etc as per the wiki
Rebooted, got the proper gnome login screen into xfce4, could sign in fine
Copied, extracted and run the SGX install
After running install_sgx, run_sgx gave me an error message (something like
'could not find powervr-srv'), so I thought I might need to reboot
After reboot... black screen again in lieu of X display!
run_sgx doesn't complain this time, but that obviously doesn't fix the
problem.

I'm kinda lost here... Could this be a hardware issue? Should I try with
another distribution, or with some debug kernel?
Dmesg: http://pastebin.com/2zgrjMcq

humm, interesting... you got one of those new "xM A's" OMAP3630 ES1.1
(the original A's where ES1.0's which are the only ones i have at
home..)

Anywho, brought home my xM B from work (ES1.1) so back to retesting..

Xorg.0.log: http://pastebin.com/6XERv4u4
dpkg -l: http://pastebin.com/H7Ty5gLj

Regards,

Okay, that wasn't it either.. I'm very stumped..

Same exact deb packages (minus 3-4 differences):
http://rcn-ee.homeip.net:81/testing/sgx-2.6.37-xm/antoine.diff

Image of the sgx working:
http://rcn-ee.homeip.net:81/testing/sgx-2.6.37-xm/xMB-OMAP3630-ES1.1.jpg

and the exact step-by-step instructions i did tonight..
http://rcn-ee.homeip.net:81/testing/sgx-2.6.37-xm/step-by-step.txt

Usually these are pretty simple.. Maybe bad voodoo this month.. or
something. :wink:

I very much doubt the hardware is an issue.. it's always safe to
double check angstrom's.. but the blank screen is just weird..

Regards,

Hey Robert,
I finally had some time to come back to this. I did a fresh re-install (on the very same hardware) using the natty netinstall from the BeagleboardUbuntu wiki, and used the latest SGX package. This time it worked like a charm. So I have no idea was was going wrong before, but I’m glad it’s working now!
Cheers,
A.