RSX PS3 << need help >>

Investigation into how Linux on the PS3 might lead to homebrew development.

Moderators: cheriff, emoon

Nodnol212
Posts: 13
Joined: Sat Jan 05, 2008 8:29 am

RSX PS3 << need help >>

Post by Nodnol212 »

edited out random problems running Linux...
Last edited by Nodnol212 on Sun Jan 06, 2008 4:37 am, edited 1 time in total.
Nodnol212
Posts: 13
Joined: Sat Jan 05, 2008 8:29 am

Post by Nodnol212 »

ok so i guess 7.10 with rsx > 7.04 with rsx?

i hate how elitist most linux users are. there is a mentality "if you cant do it your screwed" no one wants to help out a novice. i mean its a ps3 for pete sake. its not like i have been doing linux servers or using linux as my main staple operating system.

so here are my questions

is 7.10 with rsx the direction i want to go? if not whats the best option for video playback of mkv's at 720p / 1080i

what otheros file do i need to do 7.10 with linux?

what distro of 7.10 should i use?(the first time i tryed a 7.10 it didn't install)

when 7.10 is installed how do i make it the right kernal to add rsx support? / does the instructions here work with the 7.10 ubuntu?

once i am at the right kernel how do i install a deb package file for rsx support?

when i am done with that what do i change in the "still need to be manually edited" files?

my desire is help getting Linux that runs mplayer with a full codec support for mkv's and avi's for video playback.

it would be nice if there was a cd that just installed a fully working os on the ps3... with rsx support.

edited for use in updating the status i am at...

i decided to get the iso of ubuntu 7.10 here
http://psubuntu.com/installation-instructions/

and grabed the proper loader. (the one on the DVD of the os... dosnt work)

installing it now...
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

In case ubuntu is too hard for noobs, you can try fedora 7

Fedora Core 7 tutorials (how to turn on 2D hardware acceleration and more)
This has been PM'ed to oobles (ps3rsx tutorial is from Boxbuilder in html)
http://home.tele2.fr/~fr-51785/rsxkit/fc7_rsx.zip
So, consider it as a temporary draft.
Nodnol212
Posts: 13
Joined: Sat Jan 05, 2008 8:29 am

Post by Nodnol212 »

thanks for the offer but i would rather stick with Ubuntu. mainly because it has the whole psubuntu.com community. and fedora dosnt seem to have a organized following for the ps3 as much. (if i am wrong please link me to the website dedicated to such things)

in any case finaly got ubuntu working. the problem was i was following the guide 80% using a different iso of linux because i wanted a gui install...

using the iso they linked to with the text based install installed without second thought.

so now i have 7.10 (which even without rsx is surprisingly useful)

so now all ihave to do is figure out what kernal i am using / how to build my own kernal.

install the program mplayer (i am guessing with the sudo apget function)

but again thanks for responding... i didnt think any one was going to.
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

Thread "PS3RSX Binary driver support" is still your best friend, since hints about what needs to be done under ubuntu has been posted there.
But you can still read boxbuilder's tutorial for fedora, because many things are similar among the various Linux distros.

It's important to separate the 2D acceleration step and the 3D acceleration step.

The 2D acceleration step implies to compile a module, not the whole kernel. But module still probably needs to match the kernel version and you almost need every file and package you would need to recompile the whole kernel (it seems, see the fc7 tutorials for noobs)
Once ps3rsx.ko is done for your kernel version, comes the time to find the way to insmod it (insmod tells the kernel to use the module) at each boot time. For now I don't know how to do it automatically under fedora core 7, but for ubuntu, in the other thread, I think the hint has been given.
Once the module is loaded, and before x11 is started (command startx), x11 server configuration has to be changed so the module is used.
I think the module accelerates x11 transparently, so any program using standard calls will get benefit from it. Boxbuilder's explain how to watch a movie and measure the impressive change (all work done by GPU).
Of course, that means you know how to prevent linux from starting x11 too early with wrong config.

The 3D acceleration step, for now, requires to recompile completely a custom version of kernel. You have 2 choices :
1) Do it. For FC7 it seems easy now thx to Boxbuilder's config file. For other distros I dunno.
2) Wait. I think it's quite possible a future module (like the one for 2D acceleration) appears offering 3D API's. While waiting for it, you can already have much fun with 2D acceleration, watching movies, 2D x11 based emulators etc...

I can't answer question about 3D part yet. I haven't found free time to enter it yet, but other site users have, so feel free to ask anyway.
Last edited by ps2devman on Mon Jan 07, 2008 6:49 am, edited 1 time in total.
Nodnol212
Posts: 13
Joined: Sat Jan 05, 2008 8:29 am

Post by Nodnol212 »

... there is 3d suport? i was under the impression only 2d framebuffers where improved.

i got it working using the PS3RSX Binary driver support.

thank you for your help ^^
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

Iron peter created a low level api that allows to control 70% of RSX 3D horsepower. You can comiple demos that shows 3D penguins and trolls.
Whereas 2D acceleration is transparent for applications, 3D (for now) is not. Many will think also (me included), that it's a too ingrate task to make it transparent : insane work, for a loss in efficiency... If a coder makes the effort to code at low level, he gets in no time something incredibly efficient. But of course, non coders will ask again and again something allowing immediate port of existing sources, requiring high level apis.
Same problem exists on 360.
ldesnogu
Posts: 94
Joined: Sat Apr 17, 2004 10:37 pm

Post by ldesnogu »

ps2devman wrote:If a coder makes the effort to code at low level, he gets in no time something incredibly efficient. But of course, non coders will ask again and again something allowing immediate port of existing sources, requiring high level apis.
Yeah real coders only talk to baremetal in assembly language :)
Laurent
embrion
Posts: 7
Joined: Mon Jan 07, 2008 8:27 pm

Post by embrion »

ps2devman wrote:Iron peter created a low level api that allows to control 70% of RSX 3D horsepower. You can comiple demos that shows 3D penguins and trolls.
Whereas 2D acceleration is transparent for applications, 3D (for now) is not. Many will think also (me included), that it's a too ingrate task to make it transparent : insane work, for a loss in efficiency... If a coder makes the effort to code at low level, he gets in no time something incredibly efficient. But of course, non coders will ask again and again something allowing immediate port of existing sources, requiring high level apis.
Same problem exists on 360.
So to sort things out :)

If I'm only interested in using PS3 as Media Center connected via Gbit to my LAN, I only use 2D ?
All I want is playing up to x264 mkv/mp4 1080p with high bitrates without problems so:

1. Do I only need 2D performance? (decoding + deinterlacing, upscaling etc)
2. Does newest 2.1 firmware also breaks 2D performace? Any performace differences between pre and post 2.1 in my case?
3. Are there any problems with codecs or containers?
4. Coul I send someone a sample of very demanfing clip to test it for me? :)
Greets,
Embrion
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

IronPeter said that, theoretically, only 3D is killed by 2.10, but in practice, even the 2D acceleration is killed since I haven't seen anyone posting a successfull revival report (may still happen in future, but risky to count on it, since we don't know all the changes brought by fw 2.10).

Upscaling is probably done with bitblt operation with a strectching factor and some filtering. Glaurung's module ps3rsx.ko, asks RSX do this operation. For now it's possible only on fw<2.10 (and I suggest to consider, for safety, that it will be always the case, so don't do a bet and upgrade to fw 2.10 by mistake, for now).

The choice between <2.10 and >=2.10 depends on what you want on Sony game os side. 2.10 brings bluray 1.1 compatibility, divx, etc...

If you rather like counting on Linux devs for enhancing your applications, keep fw<2.10.
If you rather like counting on Sony devs for enhancing XMB features, upgrade madly (and say farewell to accelerated Linux).

Choose your side. Actually, if you don't plan to code yourself a lot, both should end in some serious fun anyway (but Linux side will be cheaper).
Last edited by ps2devman on Wed Jan 09, 2008 7:05 pm, edited 1 time in total.
d-range
Posts: 60
Joined: Fri Oct 26, 2007 8:22 pm

Post by d-range »

ps2devman wrote:The choice between <2.10 and >=2.10 depends on what you want on Sony game os side. 2.10 brings bluray 1.1 compatibility, divx, etc...

If you rather like count on Linux devs for enhancing your applications, keep fw<2.10.
If you rather like count on Sony devs for enhancing XMB features, upgrade madly (and say farewell to accelerated Linux).
You might need to add that PSN is out if you don't setup a fake update server, and new games are likely to carry 2.10+ firmware as well. So if you decide to stay with <= 2.01 you will not be able to play new PS3 games anymore at some point in the future. Unless there is a reason why Sony will never redistribute and force a specific fw version on game discs, that is. Xbox 360 games carry firmware updates, so I assume PS3 games will as well.
bocaJ
Posts: 6
Joined: Thu Dec 20, 2007 7:17 am

Post by bocaJ »

d-range wrote:Xbox 360 games carry firmware updates, so I assume PS3 games will as well.
Confirmed (at least somewhat): When I ran Uncharted it required me to update to firmware 1.9.
embrion
Posts: 7
Joined: Mon Jan 07, 2008 8:27 pm

Post by embrion »

Thanks for answers.

I'm not going to play any games as I'm not going to buy any :)
Greets,
Embrion
Nodnol212
Posts: 13
Joined: Sat Jan 05, 2008 8:29 am

Post by Nodnol212 »

i have only a 780p 1080i tv. and i got "rsx" to work on it. using a proxy to keep it at 2.01 because at 2.10 rsx is crippled.

i have yet to get mplayer on it.

its taken quite some time but when i get it up and working i dont know if it will playback mkv's at a decent rate because of the compression.

at its current state 720p video playback in the movie player that comes with ubuntu was chopy after downloading the codecs.

id almost say i did it worng because there is next to no noticable diffrence in linux at all "with rsx"

i used the first of the 2 rsx drivers sence i have no idea what kernal i am using.

i edited the xorg.conf file to use the "ps3" driver...

even then video playback seems the same and chopy
trying to run a 720p mkv on linux. on par with my laptop or my Xbox1 running xbmc

i have to be doing somthing wrong. there is no way the ps3 is as slow as a orginal xbox.
infiniterb
Posts: 3
Joined: Sat Dec 29, 2007 8:42 pm

Post by infiniterb »

Nodnol212 wrote:i have only a 780p 1080i tv. and i got "rsx" to work on it. using a proxy to keep it at 2.01 because at 2.10 rsx is crippled.

i have yet to get mplayer on it.

its taken quite some time but when i get it up and working i dont know if it will playback mkv's at a decent rate because of the compression.

at its current state 720p video playback in the movie player that comes with ubuntu was chopy after downloading the codecs.

id almost say i did it worng because there is next to no noticable diffrence in linux at all "with rsx"

i used the first of the 2 rsx drivers sence i have no idea what kernal i am using.

i edited the xorg.conf file to use the "ps3" driver...

even then video playback seems the same and chopy
trying to run a 720p mkv on linux. on par with my laptop or my Xbox1 running xbmc

i have to be doing somthing wrong. there is no way the ps3 is as slow as a orginal xbox.
I noticed the same thing.
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

Without rsx module, just moving big windows around is slow.
With it, it becomes instant.
So if you ask RSX to move a rectangle, you win.

That's the kind of graphic things the module does.

Now you are talking about decoding a HD video stream.
I would say it depends what code is involved (which codec?).
For sure a graphic module won't allow you to have GPU be part of the decoding fun.

The PPU, the multi-purpose part of the PS3 processor has never been presented as the ultimate over powerful processor... The global performance of Cell is always depending on what you are doing with SPU's.

If a codec suffers a lot with just PPU, we will have to wait for a decoder that gets some help from 1 or more SPU's.

But there is another problem, even more simple. Compilation optimizations. It's easy to ruin the compilation of a codec and obtain something slow, just because compiler doesn't optimize correctly registers usage and ignores time dependencies between instructions.

Conclusion : you have to divide the time spent by a program into two parts. The display related stuff (you will definitely measure improvement) and the calculation related stuff (ps3rsx module won't improve it, for sure).

RSX hack is still wonderful, because it will allow to have more SPU's available for non pure graphic tasks.

If you suspect a codec to be very bad on PS3, name it clearly and specialists will give their opinion about it.
d-range
Posts: 60
Joined: Fri Oct 26, 2007 8:22 pm

Post by d-range »

ps2devman wrote:...

RSX hack is still wonderful, because it will allow to have more SPU's available for non pure graphic tasks.

If you suspect a codec to be very bad on PS3, name it clearly and specialists will give their opinion about it.
Playback of HD material encoded in H264 or other codecs of similar complexity is simply not possible with the current open-source implementations (which are mainly ffmpeg-based). They only run on the PPU and are optimized for PC-architectures (single or multple identical general-purpose out-of-order execution cores). A decent dual-core PC can barely pull off Full HD H264 decoding, and that is with GPU assistance for blitting/scaling/colorspace conversion. If you want smooth HD video playback on your PC you actually already want to have PureVideo (nVidia) or UVD (ATI) GPU decoding support with that. Try H264 decoding on a mac mini (C2D, 2Ghz) with intel integrated graphics, it won't cope.

Someone has to put in a lot of effort to either refactor/rewrite ffmpeg codecs to use the SPE's, or write new codecs specifically for Cell, and things will get much better. In theory I expect the PS3 to be able to do full HD decoding *and* scaling *and* blitting all without GPU assistance. Unfortunately ffmpeg is not easily ported to efficient code for a Cell-like architecture, and writing new codecs is pretty hard. I'm working on MPEG1/2 at the moment, and although that's coming along nicely it's not nearly done. Other people are working on SPE optimization of ffmpeg but I don't know what the current development state is.
embrion
Posts: 7
Joined: Mon Jan 07, 2008 8:27 pm

Post by embrion »

Actually C2D@~2,2GHz plays vedy demanding 35Mbps clip without GPU decoding assistance (Win XP, CoreAVC codec)
Sample: http://rapidshare.com/files/82525583/ki ... 4.mkv.html

I can't speak about Cell optimization but x86 works fine without GPU (I even lowered GPU Core and Mems of my Radeon from 560 / 765 to 155 / 198 to test it and CPU usage rised only about 3-4%). Again CoreAVC is pure software codec.
Greets,
Embrion
d-range
Posts: 60
Joined: Fri Oct 26, 2007 8:22 pm

Post by d-range »

embrion wrote:Actually C2D@~2,2GHz plays vedy demanding 35Mbps clip without GPU decoding assistance (Win XP, CoreAVC codec)
Sample: http://rapidshare.com/files/82525583/ki ... 4.mkv.html

I can't speak about Cell optimization but x86 works fine without GPU (I even lowered GPU Core and Mems of my Radeon from 560 / 765 to 155 / 198 to test it and CPU usage rised only about 3-4%). Again CoreAVC is pure software codec.
A software codec that uses your GPU to do colorspace conversion, blitting, scaling, clipping, and compositing of the video frames that is (actually, it's probably Windows itself that takes care of all that). There is no way that it does that in software as well on Windows, because that would be extremely stupid. The fact that downgrading your GPU does not really hurt performance just shows that 2D engines of new GPU's aren't really getting any faster anymore. You could probably get away with an S3 ViRGE GPU if you just need 2D.

Also, I can't tell from the fact that this is an H.264 file with a high bitrate that it is actually a 'very demanding' video file. It might use AVL instead of binary arithmetic coding for the entropy encoding, use fewer prediction frames, use no interlacing, etc. That would explain why the bitrate of the file is so high. Generally speaking, the lower the bitrate for high-quality video, the more likely it is that it will be demanding to decode, not the other way around.
embrion
Posts: 7
Joined: Mon Jan 07, 2008 8:27 pm

Post by embrion »

d-range wrote:
embrion wrote:Actually C2D@~2,2GHz plays vedy demanding 35Mbps clip without GPU decoding assistance (Win XP, CoreAVC codec)
Sample: http://rapidshare.com/files/82525583/ki ... 4.mkv.html

I can't speak about Cell optimization but x86 works fine without GPU (I even lowered GPU Core and Mems of my Radeon from 560 / 765 to 155 / 198 to test it and CPU usage rised only about 3-4%). Again CoreAVC is pure software codec.
A software codec that uses your GPU to do colorspace conversion, blitting, scaling, clipping, and compositing of the video frames that is (actually, it's probably Windows itself that takes care of all that). There is no way that it does that in software as well on Windows, because that would be extremely stupid. The fact that downgrading your GPU does not really hurt performance just shows that 2D engines of new GPU's aren't really getting any faster anymore. You could probably get away with an S3 ViRGE GPU if you just need 2D.

Also, I can't tell from the fact that this is an H.264 file with a high bitrate that it is actually a 'very demanding' video file. It might use AVL instead of binary arithmetic coding for the entropy encoding, use fewer prediction frames, use no interlacing, etc. That would explain why the bitrate of the file is so high. Generally speaking, the lower the bitrate for high-quality video, the more likely it is that it will be demanding to decode, not the other way around.
Thanks for replay. Yes, I know that bitrate is not everything but many times it tells us how complex clip will be to decode.
In this case for ex we got 35Mbps rip from HD DVD which can be 29.4MBps max in video part :) Strange, isn't it?

About GPU part of whole process, it is only postprocessing as far as I know and whole decoding is made by CPU (unless we speak about GPU assisted decoding with proper drivers and codecs but as far as I know there are still many probles with that like lack of proper mkv handling)
Greets,
Embrion
d-range
Posts: 60
Joined: Fri Oct 26, 2007 8:22 pm

Post by d-range »

embrion wrote:Thanks for replay. Yes, I know that bitrate is not everything but many times it tells us how complex clip will be to decode.
In this case for ex we got 35Mbps rip from HD DVD which can be 29.4MBps max in video part :) Strange, isn't it?

About GPU part of whole process, it is only postprocessing as far as I know and whole decoding is made by CPU (unless we speak about GPU assisted decoding with proper drivers and codecs but as far as I know there are still many probles with that like lack of proper mkv handling)
It's post-processing in the sense that it is not directly related to the decoding of the video stream, you're right about that. But don't underestimate proper YUYV->RGB conversion with (at least) bilinear scaling and blitting from software. On 1080p you already need a lot of CPU power to do this at 30 fps.

As for the bitrate of the RIP: is the rip an actual 1-to-1 copy of the video stream, or is the video sequence isolated from it and recontainered into an mkv? The original material might have used arithmetic coding, and your ripped version might be re-coded using AVL codes, which are somewhat less effective but are a lot less demanding to decode.
chrisPrice
Posts: 19
Joined: Fri Jan 25, 2008 9:03 pm

getting going

Post by chrisPrice »

'm finally attempting to get rsx going.

I've read the two tutorial notes
I'm doing the kernel compile for the 3D troll to appear.
So I have not done all the steps for the 2D. In particular I
have not put in the kernel headers.

I did compile the kernel with the suggested selections, got
it compiled and transfered to /boot and the kboot extra tab entry.
Did the /lib/modules link.

Anyway the error I get for ./mknods .sh and ./ps3gpu
is ...
failed to open RSX device: No such file or directory
Failed to initialize GPU.

Is there experience out there on this error?
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

Be much more precise please.
Distro name, kernel version, exact command to compile, .config contents, exact changes, tutorials names, etc... We can't guess what you are talking about.
chrisPrice
Posts: 19
Joined: Fri Jan 25, 2008 9:03 pm

Post by chrisPrice »

see my working install of possibly buggered fc6 linux2.6.16
Last edited by chrisPrice on Thu Jan 31, 2008 5:14 pm, edited 1 time in total.
chrisPrice
Posts: 19
Joined: Fri Jan 25, 2008 9:03 pm

Post by chrisPrice »

Code: Select all


This is a list of the menuconfig items selected that I guess to be relevant.
I have deleted the linux-2.6.23-date directory in /usr/src/kernel and re-detared to get the 
original config &#40;I presume that does it&#41;.


edited out

Last edited by chrisPrice on Tue Jan 29, 2008 12:55 pm, edited 1 time in total.
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

I have fc7, so I'm probably not the right person that will save your day.
Anyone managed to run IronPeter's 3D demos on fc6, with his kernel?
chrisPrice
Posts: 19
Joined: Fri Jan 25, 2008 9:03 pm

nutting out fc6

Post by chrisPrice »

I will attempt to debug this.

How can I get the equivalent of the kernel menuconfig
for the kernel that came with fc6?
chrisPrice
Posts: 19
Joined: Fri Jan 25, 2008 9:03 pm

Post by chrisPrice »

Can somebody with a working 3D troll please list their /dev

ls -l /dev/ps3*

first query is mine is a block (b in front) device should this
be a character (c) device as it is a display device?

I'm googling /dev etc.
chrisPrice
Posts: 19
Joined: Fri Jan 25, 2008 9:03 pm

Post by chrisPrice »

errors are due to
device constant DEV_RSX === /dev/fb1

this does not exist. Where is this setup in the installation?
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

Boxbuilder's tutorial (see first posts), managed to compile a specific version of geoff kernel. Unfortunately the URL given by Boxbuilder no longer works, but I may have found another source :

http://download.systemimager.org/pub/li ... 23.tar.bz2

With the .config file supplied with the tutorial, maybe that will work.
I will try to compile myself on fc7...

At least I think Glaurung's patch is to apply to one of the file of this archive, if I'm not wrong.
Post Reply