Mini Skeen Menu
|
Network Links
|
Active Threads
|
|
 |
Xorg/Xf86 video driver for wii-linux |
 |

10-23-2008, 06:35 AM
|
|
mad poster
|
|
Join Date: Apr 2007
Posts: 106
|
|
Xorg/Xf86 video driver for wii-linux
Hello
Finally i was able to solve some errors with the xf86 driver for wii-linux. As some of the people that show my videos about t2-sde noticed, we have a problem with the fbdev: It only supports YUV2 colours, and the xserver draws in RGB. That means that the only usable driver (fbdev) works, but shows strange colours.
Here is an initial solution for that problem. This driver implements only the basics for the xserver to work with correct colours. It doesn't implements extensions like GLX, or Xvideo (maybe in a future...). This work is based on the Xf86 glide driver, and has parts taken from SDL-gclinux lib, fbdev xf86 driver and glide xf86 driver compatible with gc/wii-linux. The attached file includes the sources to build an xfree86 yuv2 framebuffer driver, and the driver ready to use.
This driver supports:
- 640x480-16bpp screen configuration
This driver lacks:
- Other screen configurations...
- Xvideo, XGL, and any other X extension...
- Problems in PAL consoles: As pal draws in 640x576, you will see a green line in the bottom of the screen. To solve, put the video mode in 480i/p/60Hz.
How to install:
- You need an already installed xorg-server enviroment. Download the attached file and copy the contents inside the "libs" directory (cube_drv.so, cube_drv.la) to the xserver drivers directory ("/usr/local/lib/xorg/modules/drivers", "/usr/lib/xorg/modules/drivers" or "/usr/X11R7/lib/xorg/modules/drivers")
How to configure "/etc/X11/xorg.conf":
Edit the file "/etc/X11/xorg.conf" and add a new video section:
Code:
Section "Device"
Identifier "WII/Gc Card"
Driver "cube"
EndSection
Edit the module section, and leave it as this:
Code:
Section "Module"
Load "dbe"
Load "ddc"
SubSection "extmod"
# Option "omit xfree86-dga"
# Option "omit XFree86-VidModeExtension"
EndSubSection
Load "type1"
Load "freetype"
Load "dri"
EndSection
Edit the screen section, and replace the next options:
Code:
Section "Screen"
....
Device "WII/Gc Card"
....
DefaultDepth 16
Subsection "Display"
->For NTSC users Modes "640x480"
->For PAL users Modes "640x576"
EndSubsection
EndSection
You can find the updated sourcecode here on the gc-linux project cvs :
http://gc-linux.cvs.sourceforge.net/...86-video-cube/
You can download it using these cvs commands:
Code:
cvs -d:pserver:anonymous@gc-linux.cvs.sourceforge.net:/cvsroot/gc-linux login
cvs -z3 -d:pserver:anonymous@gc-linux.cvs.sourceforge.net:/cvsroot/gc-linux co -P xf86-video-cube
Last edited by nuvalo; 11-05-2008 at 11:58 AM..
|

10-23-2008, 01:12 PM
|
|
member++
|
|
Join Date: Sep 2005
Posts: 89
|
|
this is a good update but i'm surprised that wii-linux hasn't been developed as much as it could. hopefully we'll be able to install a full distro with gui someday.
|

10-23-2008, 01:50 PM
|
|
new member
|
|
Join Date: Feb 2008
Posts: 5
|
|
Good thing even i dunno how to use ext3 partition under windows :S
|

10-23-2008, 04:16 PM
|
|
new member
|
|
Join Date: Feb 2008
Posts: 19
|
|
Quote:
|
You need an already installed xorg-server enviroment.
|
I assume this means getting the package and installing with dpkg, am I correct?
|

10-24-2008, 06:16 AM
|
|
mad poster
|
|
Join Date: Apr 2007
Posts: 106
|
|
Quote:
Quote:
You need an already installed xorg-server enviroment.
I assume this means getting the package and installing with dpkg, am I correct?
|
Yes, if you have installed debian-whiite, then you can use "apt-get xserver-xorg", that will solve all the dependencies.
|

10-25-2008, 03:10 PM
|
|
new member
|
|
Join Date: Feb 2008
Posts: 19
|
|
Doesn't work.
Module ABI major version (0) doesn't match the server's version (1)
EDIT: I used the -ignoreABI flag, and now it's saying that /dev/fb0 doesn't exist.
Last edited by Muzer; 10-25-2008 at 03:45 PM..
|

10-25-2008, 05:55 PM
|
|
mad poster
|
|
Join Date: Apr 2007
Posts: 106
|
|
The framebuffer device is missing, type : "mknod /dev/fb0 c 29 0" to create it.
|

11-01-2008, 09:44 PM
|
|
member
|
|
Join Date: Nov 2008
Posts: 36
|
|
Great stuff! I can confirm this works on a PAL wii (whiite+debian) using the -ignoreABI switch.
I'm stuck with the green bar at the bottom (haven't tried 60hz yet), but otherwise everything seems to work fine. Works fine using usb kb + mouse, and bluetooth mouse as well!
Last edited by bertjan; 11-01-2008 at 09:58 PM..
|

11-05-2008, 11:41 AM
|
|
mad poster
|
|
Join Date: Apr 2007
Posts: 106
|
|
Hello.
I updated the sources, to add support for PAL graphics format (640x576). To use it, you have to set the resolution on the xorg.conf file as "640x576". I also rebuild it using the xorg sources v1.5.2, so it shouldn't ask for "Module ABI major version..." errors. You can download the new attached file on the first post, that contains the updated "cube_drv.so" and the sourcecode for it. The manpage for this modile was updated too.
I also uploaded the sourcecode to the gc-linux sourceforge cvs, so you can find the latest changes there. You can access from here:
http://gc-linux.cvs.sourceforge.net/...86-video-cube/
|

11-08-2008, 12:20 AM
|
|
new member
|
|
Join Date: Nov 2008
Posts: 1
|
|
Hi, I just got whiite-linux running today, and my main problem is that the bottom of the screen is cut off on my LCD TV.
I guess this is a known problem with most homebrew:
http://wiibrew.org/wiki/Homebrew_Cha..._Vertical_Bars
http://sourceforge.net/tracker/index...05&atid=668551
Anyway, how can I fix that? Would using this XFree86 driver work do you think?
I'm brand new to GC/Wii Linux. Could you please point me in the direction of a place where I can ask questions?
My main goal is to compile SheepShaver and try to run some Mac applications.
Thanks.
|
 |
Xorg? |
 |

11-10-2008, 09:06 PM
|
|
member
|
|
Join Date: Dec 2007
Posts: 34
|
|
Xorg?
Where can I get the xorg-enviornment? I have desktop Ubuntu. I don't have a LAN adapter for my wii, I use wireless. How can I get the package and put it on my SD card? When I try
Code:
sudo apt-get xserver- xorg
I get
Code:
E: Invalid operation xserver-xorg
When I try it with
Code:
sudo apt-get install xserver- xorg
I get
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
xserver-xorg is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I tried looking it up on google but I'm not sure what platform I'm to download it for:
alpha, amd64, arm, armel, hppa, hurd-i386, i386, ia64, kfreebsd-amd64, kfreebsd-i386, m68k, mips, mipsel, powerpc, s390, or sparc
Last edited by SDbinWiiEXE; 11-10-2008 at 09:15 PM..
|

11-11-2008, 07:08 AM
|
|
mad poster
|
|
Join Date: Apr 2007
Posts: 106
|
|
Quote:
Hi, I just got whiite-linux running today, and my main problem is that the bottom of the screen is cut off on my LCD TV.
....
Anyway, how can I fix that? Would using this XFree86 driver work do you think?
|
This driver is only for Xwindow servers (Xorg). You are in console mode, don't you? Are you using a Pal console? Then try to set it in 60Hz/480i, that worked for me.
Quote:
|
Where can I get the xorg-enviornment? I have desktop Ubuntu. I don't have a LAN adapter for my wii, I use wireless. How can I get the package and put it on my SD card? When I try
|
If you dont have the Lan adapter, then it will be difficult to install as you will have to download all the packages manually (the wireless adapter does not work). You have to download the packages for "powerpc", but each xorg package asks you for more packages. Try asking Muzer for a complete list, as he installed xorg in that way.
|

11-14-2008, 04:24 PM
|
|
new member
|
|
Join Date: Feb 2008
Posts: 19
|
|
I am going to release a distro with this included (you may have noticed the leak a few days ago). nuvalo: Does the latest version fix the overscan bug (where stuff it cut off the top, bottom and sides on CRT)?
BTW, it seems to run surprisingly well, I'm running xscreensaver here and the only screensaver I've noticed lag in is the fireworks one and you have to look really hard to see that. For a framebuffer driver, that's really quite excellent.
Last edited by Muzer; 11-14-2008 at 04:32 PM..
|

11-14-2008, 05:30 PM
|
|
new member
|
|
Join Date: Feb 2008
Posts: 19
|
|
I get a weird error with the latest release.
Xorg.log goes something like this
<seems to be working normally, all the normal messages etc>
<some sort of backtrace, tell me if you want this>
Fatal server error:
Caught signal 11. Server aborting.
|

11-14-2008, 05:55 PM
|
 |
Super Moderator
|
|
Join Date: Sep 2008
Location: england UK
Posts: 2,286
|
|
what will wiilinux actually gain??
|

11-17-2008, 02:51 AM
|
|
new member
|
|
Join Date: Nov 2008
Posts: 3
|
|
I tried this and got as far as Muzer reported a couple of days ago. First there was an ABI mismatch (module says 4, xorg says 1) that I told the server to ignore. Now the X server crashes when it tries to start.
This is the 2.6.27-isobel-wii kernel with version 7.1.1 of the xserver-xorg package from the debian etch ppc repositories.
I will watch for updates with interest. Thanks, Philip
|
 |
|
 |

11-23-2008, 06:29 PM
|
|
member
|
|
Join Date: Nov 2008
Posts: 36
|
|
I poked around a bit more.. Installed the updated cube driver from source (i couldn't get the binary since tehskeen was down) and tried out some modelines (i'm at PAL 640x576). I got x running quite well now on debian-whiite with fluxbox and wiimote (using cwiid with fastsync patch) as input device. Only problem is the screen size: it seems to be a bit too large (horizontal and vertical) for my tv. Overscan issue ?
I also noticed the new whiite kernel (2.6.27) runs a LOT faster .. For example, in 2.6.24, firefox took around 30 mins to start. In 2.6.27 it starts in a few secs, probably because of the larger amount of available memory. Firefox as well as opera are running pretty fast. Controlling them using the wiimote (cwiid ir_ptr) works like a charm.. you can even use the d-pad for scrolling
But .. the graphics (fb?) driver in 2.6.27 looks a bit broken. The screen doesn't seem to redraw properly, moving the mouse leaves a (slowly disappearing) trail on the screen. Anyone else experiencing this problem ? Looks like some stuff changed between 2.6.24 and 2.6.27..
Last edited by bertjan; 11-23-2008 at 06:34 PM..
|

11-23-2008, 06:31 PM
|
|
member
|
|
Join Date: Nov 2008
Posts: 36
|
|
Muzer, could you post X startup messages here ?
I'm curious what's going wrong on your installation; maybe i can help..
|
 |
|
 |

11-24-2008, 11:39 AM
|
|
mad poster
|
|
Join Date: Apr 2007
Posts: 106
|
|
Quote:
|
I poked around a bit more.. Installed the updated cube driver from source (i couldn't get the binary since tehskeen was down) and tried out some modelines (i'm at PAL 640x576). I got x running quite well now on debian-whiite with fluxbox and wiimote (using cwiid with fastsync patch) as input device. Only problem is the screen size: it seems to be a bit too large (horizontal and vertical) for my tv. Overscan issue ?
|
Some TV has overscan problems. I´m not sure how to solve that, but "fbset" would work.
Quote:
|
But .. the graphics (fb?) driver in 2.6.27 looks a bit broken. The screen doesn't seem to redraw properly, moving the mouse leaves a (slowly disappearing) trail on the screen. Anyone else experiencing this problem ? Looks like some stuff changed between 2.6.24 and 2.6.27
|
Didn´t notized about that problem, as i was not able to use 2.6.27 until today. Isobel has released a new kernel, that solves some problems with old broadway revisions (like mine), that prevented the kernel to boot. About the problem with fbdev, it might be caused by using MEM2 in Xorg, wich is slower than MEM1. Or maybe because the framebuffer is being cached (which should not happen). I´ll take a look as soon as posible.
Quote:
Muzer, could you post X startup messages here ?
I'm curious what's going wrong on your installation; maybe i can help..
|
The problem was that he had xserverR7 v1.1 installed (the debian stable package), and i was using 1.5.2 (the latest official release). He had to recompile the driver to make it work.
|

11-24-2008, 03:50 PM
|
|
member
|
|
Join Date: Nov 2008
Posts: 36
|
|
Quote:
Originally Posted by nuvalo
Some TV has overscan problems. I´m not sure how to solve that, but "fbset" would work.
|
OK, i'll try that. I thought fbset would only affect the console, but since x uses the fb driver, this might help ;-)
Quote:
Originally Posted by nuvalo
Didn´t notized about that problem, as i was not able to use 2.6.27 until today. Isobel has released a new kernel, that solves some problems with old broadway revisions (like mine), that prevented the kernel to boot. About the problem with fbdev, it might be caused by using MEM2 in Xorg, wich is slower than MEM1. Or maybe because the framebuffer is being cached (which should not happen). I´ll take a look as soon as posible.
|
Ah, great. About the new kernel, i assume this is 2.6.27a ? I'll check it out, too.
The fact that MEM2 is used could indeed be the problem; the screen does redraw, but pretty slow.
|

11-25-2008, 06:13 AM
|
|
mad poster
|
|
Join Date: Apr 2007
Posts: 106
|
|
Ok, i could boot and see that weird problem. It not only affect Xorg, it is a problem for every application that access to framebuffer (like SDL). I talked to isobel, and it seems that the framebuffer memory is being cached, so some lines aren´t update as fast as others. Before join mem1 and mem2, the framebuffer area was not mapped as usable RAM, but now the kernel assumes that the framebuffer memory range is cacheable. Isobel is taking care of that, so we will see a new kernel.
Quote:
|
i assume this is 2.6.27a ? I'll check it out, too.
|
Yes, that is the new kernel.
|
 |
|
 |

11-25-2008, 08:16 AM
|
|
member
|
|
Join Date: Nov 2008
Posts: 36
|
|
Ah, that's great news. Looking forward to the fix in the new kernel version!
About the image size/overscan issues: fbset doesn't seem to have any influence on the size of the screen in X.
The only way to change the screen size seems to be fiddling with modelines. The problem i'm experiencing is that parts of the top and bottom are not in the visual area of my tv. I'm on videomode PAL 50, because my tv doesn't handle PAL 60 correctly.
The part on the bottom of the screen that's missing is the main problem, because my fluxbox dock/menu bar isn't visible.
I was able to fix this by decreasing the vertical resolution to about 550 (so vidmode is 640x550). In order to do so, I had to patch your cube driver to remove the check on the videomode (without the patch, only 640x480 and 640x576 were accepted).
However, I'm still stuck with the top part of the screen being not visible. I haven't been able to change / move this using a different modeline. Any suggestions ?
|

11-25-2008, 06:47 PM
|
|
member
|
|
Join Date: Nov 2008
Posts: 36
|
|
I just noticed a new kernel version on sourceforge (2.6.27b), the fb problem is fixed in that version, great work!
|
 |
|
 |

11-26-2008, 01:38 AM
|
|
new member
|
|
Join Date: Nov 2008
Posts: 3
|
|
I have very basic questions. Any help or pointers would be appreciated. I am a happy user of the 2.6.27b kernel version. (Thanks isobel!) My wii is plugged into an NTSC television receiver, using an RF cable. I have installed the standard Debian-based whiite-linux distribution, upgraded everything but ssh, and added X.
My framebuffer console characters and X pictures look very blurry, and when things get maximized to "full screen" they extend outside the boundaries of the physical display. Could this be caused by a PAL/NTSC misunderstanding? If so, how do I make the whiite-linux display driver emit NTSC? (Must I recompile the kernel with explicit startup flags? Are there some magic numbers I can supply to a framebuffer control script? Other ideas?)
The colours in X are all wrong, and I would like to fix that, too. Others on this list have succeeded. But, as noted in my previous post, the simple solution of downloading something precompiled has not yet worked for me. I am now trying to set up a cross-compiler in case that helps me attack one or more of these issues.
Thanks, Philip
|
 |
|
 |

12-02-2008, 02:59 AM
|
|
new member
|
|
Join Date: Nov 2008
Posts: 3
|
|
I got the new video driver described in Post #1 of this thread to work, thanks to Johnx, Bertjan, and Muzer on irc. Other posts in this thread suggested compiling the driver locally. Then Johnx supplied the idea of installing a basic set of compiler tools on the wii so it could compile its own binaries. The first few attempts at 'make' gave a new complaint each time about a missing development library. I ended up using apt to install these debian etch packages on the wii: module-init-tools, pkg-config, xserver-xorg-dev, x11proto-randr-dev, libxrandr-dev, x11proto-video-dev, x11proto-fonts-dev. (I list these because the names don't match the ones that 'make' specifies, but these ones work.) An important fact from Muzer was needed at the very end: when compilation has finished successfully, saying 'make install' puts the brand-new binary in the wrong directory. It has to be moved from a sublocation of /usr/local/lib to the corresponding spot in the /usr/lib branch. (During this process, Bertjan sent me some other cool stuff.) Closing: Thanks to all who helped, and good luck to the next person who tries this. I hope these notes are of some use to you.
An unrelated note: I wanted to change the boot-command string supplied to the kernel at startup, and recompiled the whole kernel just to do it. Later I said 'cat /proc/cmdline' and realized there was probably an easier way.  The wii took about 45 minutes to compile its own 2.6.27b kernel. (I started with Isobel's handcrafted .config file in /proc/config.gz, and supplied the fully-patched kernel source tree to the wii over NFS.)
|

12-21-2008, 08:09 PM
|
|
new member
|
|
Join Date: Dec 2008
Posts: 1
|
|
If I try to "startx"
I have the following problem:
(EE) /usr/lib/xorg/modules/drivers/cube_drv.so is an unrecognized module type
(EE) Failed to load module "cube" (unknown module type, 6)
(EE) No drivers available
-----
of course I changed everything, like it is explained above, in the xorg.conf
Last edited by flippy1337; 12-23-2008 at 07:52 PM..
|

06-30-2009, 03:05 PM
|
|
new member
|
|
Join Date: Jun 2009
Posts: 1
|
|
Can everybody help me 
I wanted to do this on my wii but it didn't work.
I haven't got the Wii Lan Adapter, so I tried to download the Xorg from the debian site , but I didn't know what I need for this, which Packages I have to download 
Can you give me an Instruction 
Sorry if my English isn't as good as yours. 
|

09-12-2009, 02:09 PM
|
|
new member
|
|
Join Date: Jan 2008
Posts: 2
|
|
Still need some help here, when i load i get the ABI error, then with -ignoreABI it fails with fatal error 11, what am i doing wrong ....
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
All times are GMT -4. The time now is 03:04 PM. |
|
|