*This howto has been revised as of 1-10-09*
Special thanks go to Geert Uytterhoeven, the sony software architect that made all this possible. Also to panajev from the beyond3d forums, for figuring alot of this out in the first place.
http://ozlabs.org/pipermail/cbe-oss-dev/2007-November/003596.htmlhttp://forum.beyond3d.com/showthread.php?t=43859 Ok folks I am finally familiar enough with fbset that I feel comfortable writing this howto and it should work for everyone suffering from these issues. It is really quite simple and I hope everyone is able to benefit from this.
Before we get started you MUST be using at least a 2.6.24 kernel. This will not work without a kernel upgrade. The stock gutsy kernel was created before the changes to the ps3fb driver that allow this to work. If you are using intrepid, you should be fine. There are guides that deal with kernel compilation and upgrades on these forums, however upgrading to intrepid is a safe bet.
Ok so you have at least a 2.6.24 kernel and you are ready to get rid of those unsightly borders? Here we go...
The first order of business is installing fbset...
Code:
sudo apt-get install fbset
Fbset will not work properly while you are still in an X environment. You may want to print all of these instructions out, or write them down on a notebook.
Next we kill our X server, the safest way of doing this is by pressing ctrl+alt+f1
That will drop you to a terminal. Then we log in, and enter this.
Code:
sudo /etc/init.d/gdm stop
Next we are going to change our video mode to FULL screen where we get our overscan issues. We will do this using the ps3-video-mode command.
I use 720p so for me the command for fullscreen is:
Code:
ps3-video-mode -v 131
If you are using 1080i it will be:
Code:
ps3-video-mode -v 132
or for 1080p..
Code:
ps3-video-mode -v 133
Now you will notice that half your command prompt and the text is off to the side of the screen... don't panic we will take care of that. We are going to begin scaling the resolution down with fbset until it properly fit's our screen. The hardest part about doing this is that you may not always be able to see what you are typing until your screen settings become more sane. First a little bit about fbset terminology..
-a *makes the settings system wide and applies to all screens*
-xres *sets the horizontal resolution*
-yres *sets the vertical resolution*
-vxres *sets the virtual horizontal resolution*
-vyres *sets the virtual vertical resolution*
So.. for me when I used ps3-video-mode -v 131 to set my screen to full resolution it set it to a resolution of 1280x720, but with the overscan issue. What I did was start scaling the resolution back until things fit with fbset four pixels at a time like so...
fbset -a -xres 1276 -yres 716
fbset -a -xres 1272 -yres 712
fbset -a -xres 1268 -yres 708
Like I said though you won't always be able to see the command prompt so it is a bit tricky. After going down five or six steps I would use startx to fire up xfce and see how things were looking on the screen. When I was done looking I would log out of xfce and then scale down another five or six steps, then startx and check again, then log out and scale down some more etc..
Be careful to startx and check often because if you go to far with one resolution, you will have to start over again. Fbset will NOT scale the resolution upwards, only downwards.. if you go to far just set fullscreen with ps3-video-mode again and start over.
Make sure you keep checking by starting the X server periodically because your yres will most likely be correct long before your xres, for example my -yres was perfect at a value of 680, but the xres still had a long way to go. So then I would just keep lowering the xres but leave the yres alone like so..
fbset -a -xres 1156 -yres 680
fbset -a -xres 1152 -yres 680
Once you have found the perfect value, it is a good idea to then set the virtual resolutions as well, this is useful for a number of reasons. If you do not set the virtual resolution you may have problems with programs appearing off the sides of the screen. For me the perfect value was 1144x680 so then I set the virtual resolutions like this..
fbset -a -xres 1144 -yres 680 -vxres 1144 -vyres 680
Now to make the settings stick everytime you boot, edit your kboot.conf file.
Code:
sudo nano -w /etc/kboot.conf
Find this line on the end of your boot string..
video=ps3fb:mode:3'
Then change it too the full screen resolution you want to boot with..
video=ps3fb:mode:131'
Now save your kboot.conf *if you are using nano just hit ctrl+x then press Y*
Next we make sure that our fbset command runs right after the fullscreen command we just entered into our kboot. *Thanks to gillers29 for pointing this out later in this thread*
Code:
sudo nano -w /etc/init.d/fbset.sh
Insert your correct fbset resolutions and mode command into this file and make it look like this... my resolutions are used here as an example.
Code:
#!/bin/sh -e
fbset -a -xres 1144 -yres 680 -vxres 1144 -vyres 680
exit 0
Then save the file. *if you are using nano just hit ctrl+x then press Y*
Next we make that file executable like so..
Code:
sudo chmod 755 /etc/init.d/fbset.sh
Now we create a link to that file in rc2.d so it runs right before gdm starts..
Code:
sudo ln -s /etc/init.d/fbset.sh /etc/rc2.d/S26fbset
Next we type these magic words..
Code:
sudo reboot
Upon rebooting x should start and when gdm loads, no more black borders.
*note* please do not try and use my values, they will most likely be different for everyone.
*note* I have tried to keep this as new user friendly as possible, however sometimes I assume a certain amount of linux experience. If any of this confuses you or you are unsure please ask your questions in this thread and I will reply as soon as I can.
-biscuit