Xorg 7.3 for Xbox [Work in Progress]

There doesn't appear to be any recent updates to the Xbox-Xorg drivers in the Xbox-Linux CVS, Sourceforge, or any other sites that I've checked.

I did find a patch in the Patches section of the Xbox-Linux Project Site on Sourceforge, which supposedly upgrades the Xorg 6.8.1.0 driver (in CVS) up to being compatible with Xorg 7.1.  I'm not sure what's going on with that patch, though -- some messages I've read on the 'Net suggest that the "Upgraded" driver is a little broken - requiring an Option "NoAccel?" "1" in the Drivers section of xorg.conf., and citing problems with DMA transfers.  Aurrgh.

Spelunking further through the Xbox-Linux CVS revision history, I stumbled across a porting effort done by Ed Hucek in the Xorg tree, where all of the work done on the XFree86 nvxbox driver was applied to the nv driver provided by Xorg.  In the checkin log, Ed notes the following:

Attempt to port our changes to the real Xorg nv driver. It should not break the funktionality of the driver. I was not able to get the 2D acceleration to work. You have to set : Option "NoAccel?" "1" in the DeviceSection? of the driver.

Based on the CVS checkin message, I'm thinking the reported "broken" driver was based on that port.

I spent a few hours tonight trying to resolve the diffs between nv 6.8.1.0 (out of box), versus the nvxbox 6.8.1.0 code, and it was a freaking nightmare.  Blecch!!  So off to a fresh start I'll go -- armed with the Revision Logs and changes done by Oliver Schwartz, I think I can reconstruct what Oliver did to XFree86-4.2.0, and apply those changes "Clean-Room" to Xorg 7.3.

 


Xorg 7.3 FrameBuffer Problem

It looks like I'm running into the same bug as the OpenSUSE Team:

  https://bugzilla.novell.com/show_bug.cgi?id=285523#c59

Even if I use the "fbdev" driver in Xorg 7.3 instead of the "nvxbox" driver, I still receive these dreaded lines:

(EE) FBDEV(0): FBIOPUT_VSCREENINFO succeeded but modified mode
(EE) FBDEV(0): mode initialization failed

Fatal server error:
AddScreen/ScreenInit failed for driver 0

The OpenSUSE guys managed to isolate their problem and patch a workaround within the the X server code itself (in fbdevhw.c).  I was *REALLY* hoping to avoid messing with the X server code and providing another custom Xorg binary, but this problem is definitely a show-stopper.  Until I can get a better grasp of what's going on under the hood, I might need to take this route to get a working Xorg 7.3 solution.


fbdev...

I've just got to the same stage as you with a Gentoo xbox install - I'd prefer to use the current stable xorg-server-1.3 but I'm hitting the 'mode initialization failed' problem. I must admit to being quite low down on the learning curve so far as I thought that the nvxbox driver ran over the top of the fbdev one - I guess they are exclusive, in which case I need to look harder at the xorg.conf file example I have.

WRT the nvxbox driver, you say you've been looking at the commit messages - all I've found so far is on sourceforge and !404 which both have a last commit date of 3 years ago. Is this right? or am I looking in the wrong place.

I've wasted the best part of the 2 days I've spent on this project so far due to the default Gentoo kernel config not turning on hotplug so the udev deamon failed to start - no 'hda' entries in /dev (so no root filesystem!!) so I'm not as far on as I'd have liked.


Xorg CVS Commit Messages

That sounds about right. I was looking at the port to "nv" done by Ed some time ago.

Some time after I posted the log entry referencing the above, I found out by digging through the mailing list archives that Ed also did a more recent port to Xorg Modular. That's in the xf86-video-nvxbox branch of the Xbox-Linux CVS repository, and I think it works for Xorg 7.0. The datestamps and version stamps on the sources Ed committed place it somewhere between Xorg 6.8.2 (monolithic) and Xorg 7.0 (first modular version).

As part of my porting/upgrading effort, and to better understand what changes are necessary to maintain fbdev and Xorg moving forward, I went back to a plain out-of-box Kernel 2.6.10 and worked out the relevant diffs that Oliver Schwartz did when he last did a sync against the 2.6.10 Riva Driver. I reapplied those changes against the 2.6.22 Riva Driver, and it seems to work. I can use fbida to view images on the framebuffer just fine.

Despite having a clean-room Kernel FBDev driver working, I'm still encountering problems with Xorg 7.3. There's a new sanity check being enforced, so I need to figure out what's causing the failure, and make the appropriate change in the Kernel FBDev driver. Otherwise, I'll need to maintain a patch against the Xorg fbdevhw.c file to ignore that new sanity check.

I hope to have it figured out in another few days.


Xorg 7.2 Patch for Xbox

For those who aren't using Fedora, and are experiencing the above "FBIOPUT_VSCREENINFO succeeded but modified mode" error, the following patch is required to eliminate the problem. Apply to your xorg-xserver sources and recompile.


Xorg

Great work. I am still using your FC4 patches running off a nfsroot. Due to the rapid release cycle of fedora, I am trying to convert to gentoo. I am trying to avoid gentoox because of the nfsroot I use and would like to stay close to the core distribution as much as possible, plus I would like to keep the system as lean and light as possible. I have setup my new NFS root for testing and have run into issues with X.org. I have gotten to the point of getting X to start but the modelines are not what my FC4 installation uses. I dont know if this issue is specific to gentoo or the x.org version, I am leaning towards x.org since everything else works. Currently the gentoo installation uses more memory and CPU than my previous versions, I think it is because of the larger resolution. I would like to get it back to 640x480 but cannot for now using x.org 7.2 or 7.3. BTW thanks for the 7.2 patch. I am trying to get 6.8- 7.0 x.org built to see if it is really a x.org version issue. Anyway here are the modelines I am getting now. I dont know if you have run into the same issues. If I restart X the 800x600 modes dissappear.
(--) NVXBOX(0): Virtual size is 1152x768 (pitch 1152)
(**) NVXBOX(0): Default mode "1152x768": 65.0 MHz, 44.2 kHz, 54.8 Hz
(II) NVXBOX(0): Modeline "1152x768" 65.00 1152 1178 1314 1472 768 771 777 806 +hsync +vsync
(**) NVXBOX(0): Mode "1024x768_a": 65.0 MHz, 48.4 kHz, 60.0 Hz
(II) NVXBOX(0): Modeline "1024x768_a" 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
(**) NVXBOX(0): Default mode "1024x768": 65.0 MHz, 48.4 kHz, 60.0 Hz
(II) NVXBOX(0): Modeline "1024x768" 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
(**) NVXBOX(0): Default mode "800x600": 40.0 MHz, 37.9 kHz, 60.3 Hz
(II) NVXBOX(0): Modeline "800x600" 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync
(**) NVXBOX(0): Default mode "800x600": 36.0 MHz, 35.2 kHz, 56.2 Hz
(II) NVXBOX(0): Modeline "800x600" 36.00 800 824 896 1024 600 601 603 625 +hsync +vsync
(==) NVXBOX(0): DPI set to (75, 75)

Thanks again for the great work.

 

I'm getting the same results

I'm getting the same results as Raymond.  When I first start up X, I get 1152x768 with a few other options, but if I restart X the other options disappear from xrandr.   Any new developments on this?

Recent Versions of X.org cause errors for Xbox

Hi guys,

Yes, the problem is most likely in the Xorg server.  When I last looked at this (nearly a year ago), I found that my "upgrade system" (Fedora 7, I believe) had Xorg 7.2 pre-installed, but the nvxbox driver code in Xbox-Linux CVS was written for 7.11 or earlier.  That caused all kinds of problems, which drove me down the path of refactoring the diffs for the nvxbox driver and reapplying them to the nvidia driver bundled with Xorg 7.2.  There's another nvxbox driver floating around in the Xbox-Linux SourceForge forums in the patch area, I believe.

The nvxbox driver has detection routines to find an Xbox graphics chip like the Conexant chip, and when found, it sets up some sane values that are useful for Xbox display.  You also need to use the Kernel's FrameBuffer driver to display the graphics data -- going direct to hardware just never worked for the Xbox as far as I recall.

My 7.2 "port" kind of worked, but I never quite got the hardware cursor working right -- which was a bit of a nuisance.  After a while, that effort got kicked to the curb, since my machine was already bogging down the onboard 64 Megs of RAM with just "Text Mode" linux.

what to do

What would you recommend doing (on gentoo, I know you're more focused on Fedora but I'm really stuck here).  I loosely followed the script from Gentoox for installing xorg, and that fixed it at first.  I then installed a few unrelated things (linux-headers, alsa, lirc, bazaar, mednafen) and then the screen went back to this mess.  I retried following the script with no luck.   Should I try going to a different version of xorg? xserver? different nvidia driver?  im very lost and very frustrated, any help would be greatly appreciated

The easiest way to get Xorg

The easiest way to get Xorg running on Xbox-Linux is to stick with the older versions -- at least for the time being, and quite possibly for a few months more.  You might have better luck posting on the Xbox-Linux Developer's list to see if any of the original developers (gimli, or aothenio) would have time to freshen up the nvxbox driver for current versions of Xorg. 

I'm booked solid with my Startup business, and don't see any opportunity to take a crack at this until at least late November, sorry.