| Author |
Topic  |
|
deyzarc
Starting Member
New Zealand
7 Posts |
Posted - 05/16/2004 : 08:27:12
|
Yes, that's right! No proprietary drivers or X servers. Working with the stock i810 driver in XFree86. I'm currently running the Xorg branch (6.7.0), but it should work with 4.3.0 and 4.4.0 just as well.
The whole reason we've been unable to use 1280x768 beforehand is that the VBIOS doesn't know how to program that mode. I've created a patch which modifies the video timing tables in the VBIOS, such that it'll know how to program it! I've been slogging through the VBIOS code, and it took me a couple weekends to figure out enough of how it works to find the timing tables...
I've created a program called 1280patch which will (temporarily!) fix the VBIOS to add 1280x768. It *must* be run as root. It has only been tested against BIOS build #2878 for the 855GM chipset (a.k.a. what's on my P5020D). Note that it cannibalizes your 1024x768 mode and turns it into 1280x768. Because there is a fixed number of entries in the timing table, one of the existing modes must be sacrificed. I chose to replace 1024x768 because it was the most similar to 1280x768 -- there may be some parameters that I haven't figured out yet, and by choosing a similar mode the chances of Bad Things are reduced.
Note that the worst (in theory) that this program can do is corrupt your VBIOS until you reboot. All changes are made in memory only, they are NOT permanent!
The source is available from: http://nomadic.null.li/intel/1280patch.c
To compile, just do "gcc -o 1280patch 1280patch.c".
This should be considered *highly experimental*! I've only just gotten it working about 15 minutes ago. :)
Enjoy! Please let me know of any bugs or other issues... -Andrew
|
|
|
lingenfr
Junior Member
 
220 Posts |
Posted - 05/16/2004 : 09:21:38
|
| Good for you. I ordered the latest Fedora from Cheapbytes (yes, I still have dial-up). I look forward to trying this. |
 |
|
|
deyzarc
Starting Member
New Zealand
7 Posts |
Posted - 05/16/2004 : 09:57:20
|
Ah, forgot to mention... XFree will still (for whatever reason, not sure yet) think that your screen is 1024x768. And will refuse to even believe in a 1280x768 mode. So, you need to give it a "placebo" Modeline -- it doesn't really influence anything, except letting XFree know that the display can do 1280x768.
Add a modeline to the Monitor section in XF86Config:
Section "Monitor" Identifier "internal_panel" Modeline "1280x768" 80.14 1280 1344 1480 1680 768 769 772 795 EndSection
|
 |
|
|
macktruckturner
New Member

USA
53 Posts |
Posted - 05/16/2004 : 15:44:28
|
oh how tempted I am to install linux yet again!
"I am the heart of the fight.." - The Infantryman's Creed. |
 |
|
|
jody
Starting Member
Canada
4 Posts |
Posted - 05/16/2004 : 19:48:59
|
Lovely. This works on my P5020D running debian unstable with xfree 4.3.0.dfsg.1-1. The only tweak people will probably want is to run the patch util from SWSUSP_START_PROGS_AFTER_RESUME in /etc/suspend.conf so that things resume properly from swsusp2. Nice work.
Hmm, The leog.net folk should offer 1280x768 screen size on the edit screen :-) |
 |
|
|
seanho
New Member

Canada
62 Posts |
|
|
deyzarc
Starting Member
New Zealand
7 Posts |
Posted - 05/17/2004 : 03:05:13
|
*bows*
Once I've been using this for a couple weeks (and, more importantly, others have also been using it) I will probably put together a patch and submit it to XFree and Xorg/freedesktop. That way it'll get integrated into the i810 driver, and there won't even be an extra program to run. There are quite a few people with 1400x1050 laptops and this cursed chipset which should also benefit from that...
Everyone who tries this (especially if it doesn't work!), *PLEASE* post or email your machine, version of XFree or Xorg, and the BIOS revision number that 1280patch prints out. I'll keep track of this -- I'd especially like to see if it works on any BIOS revisions other than #2878 (what I have in my P5020D).
-Andrew |
 |
|
|
stevea
Starting Member
48 Posts |
Posted - 05/17/2004 : 07:11:00
|
| Works for me on a BIOS revision 2878. dayzarc, I have $100 that I'd reserved for buying a commercial X server. Let me know where to send it. |
 |
|
|
bslash
Starting Member
Netherlands
8 Posts |
Posted - 05/17/2004 : 07:47:10
|
Works like a charm, survives Tuxracer and mplayer full screen... Brilliant, thanks very much... I would have almost bought the xig server, were it not for their horrific anti-opensource FUD...
Machine: 5020D VBIOS: 2878 Xserver: Debian 4.3.0.dfsg1-1
And it also works on the xserver CVS from freedesktop.org !!!! Including all the fancy alphablending and other graphical tricks. This one doesn't do 3D stuff for now, so no tests on opengl... (maybe send the patch also there, to the kdrive framework)
Minor quible: it also changes my (vesa) framebuffer console, which was running in 1024x768, so that the first (1280-1024) pixels are repeated at the end of the line. This just looks a bit funny, is no major problem. Maybe if we could find out a 'fake' vga=??? number, also the console would do 1280x768.
Bslash |
 |
|
|
deyzarc
Starting Member
New Zealand
7 Posts |
Posted - 05/17/2004 : 08:15:13
|
stevea: If you need somewhere to send that $100, may I suggest EFF.org? :)
bslash: It's currently taking over modes 0x34, 0x45, and 0x54 (1024x768); the problem likely stems from the fact that vesafb programs one of those modes at bootup when it still means 1024x768... then 1280patch gets run (changing it to 1280). When X runs, it saves the current mode before setting up its display. When X finishes or you switch back to a VT console, it restores the saved mode. Of course, the saved mode is 0x34/45/54, which means something different now. :) If I can figure out how to make mode 0x36/47/56 be "enabled", that would be the *perfect* place to put 1280x768. (It's currently setup for 1024x600, and is marked as "disabled"; only 640x480, 800x600, and 1024x768 are marked available....)
Also -- I'm having issues with mplayer 1.0_pre4 that might be related to my patch. Aspect ratio is all screwed up when using Xvideo to output... tracking that down now. Has this shown up for you?
Didn't realize kdrive supported i810...!!! Thanks for the tip.
-Andrew
|
 |
|
|
bslash
Starting Member
Netherlands
8 Posts |
Posted - 05/17/2004 : 08:38:46
|
> Also -- I'm having issues with mplayer 1.0_pre4 that might be related > to my patch. Aspect ratio is all screwed up when using Xvideo to > output... tracking that down now. Has this shown up for you?
No. But then again, of course, you need to put the new pixel-conf in your .mplayer/config: vo=xv monitor-aspect = 1.66666667
Otherwise mplayer assumes you're still using a 4:3 aspect monitor.
|
 |
|
|
ThePHM
Starting Member
6 Posts |
Posted - 05/17/2004 : 11:07:37
|
How about canabalizing the 640x480 or even the 800x600 but copy all the parameters from the 1024x768 and then doing the mod to 1280x768? I've probably missed something but I for one wouldn't miss either of those modes.
Also people here are indicating that they have got suspend working. Is this just suspend to disk or is it suspend to RAM as well ... what ever it is can someone let me know what the've done to get it working ... Kernel version config options patches etc
Many thanks
Barney |
 |
|
|
deyzarc
Starting Member
New Zealand
7 Posts |
Posted - 05/17/2004 : 11:30:39
|
kongkong: The offset to the mode configuration table is almost certainly different. If you could post a dump of your VBIOS, I can take a look and figure out what the offset should be. Run "dd if=/dev/mem of=vbios.dmp bs=16384 skip=48 count=4" to get a dump.
thephm: That's next on my list. Well, actually, making it configurable which mode gets replaced. For now, the line with "get_emode_params(emode_table, 0x54)" can be changed to 0x52 for 800x600 and 0x50 for 640x480. Let me know if that works just as well...
Thanks for all the feedback, everyone.
|
 |
|
|
deyzarc
Starting Member
New Zealand
7 Posts |
Posted - 05/17/2004 : 18:20:51
|
kongkong: Try changing EMODE_ADDR to 0x4d2 for the 845, and 0x3a7 for the 865. Let me know if that helps out. I plan on writing a function to find this table automatically, but for now those should work...
-Andrew |
 |
|
|
dyfrgi
New Member

USA
62 Posts |
Posted - 05/19/2004 : 13:42:05
|
| This works great here. Thanks for doing this work, deyzarc! Let us know if you put up a webpage about it so that I can link there instead of just to the patch (when I get around to updating my P5020D howto). |
 |
|
|
Tremek
Starting Member
10 Posts |
Posted - 05/19/2004 : 20:21:20
|
Hey all. I don't know if I'm a heretic or what have you for posting this here, but I'm trying to help, honestly. ;)
I have a Sony TR1AP with a 1280 x 768 widescreen on the 855GM chipset too, and I tried running the patch in the new Fedora Core 2 Gnome environment. Bear with me, please, I'm a noob.
From a root console I used ./1280patch after compiling it, and get:
Chipset: 855GM BIOS Configuration area offset: 0x0c20 bytes BIOS Version: 29 Timing parameter block: 025b Patch complete.
-- From there I logged out and logged back in. Strange things commence from here on. Here's a couple snaps of the screen:



The entire screen is shifted to the left and then wraps around back on the right side - it's not just the background or anything like that. Has anyone else experienced this? I know I'm running different hardware than what I suspect most of you have, but we're talking very similar notebooks here. Please ask me for more info, I'll type commands like a good trained monkey all day. ;) |
 |
|
|
jody
Starting Member
Canada
4 Posts |
Posted - 05/19/2004 : 21:37:07
|
logging out and back in is not sufficient. You need to restart the X server after running the patch. Try ctrl-shift-backspace to kill it. Failing that something like /etc/init.d/xdm restart (that works under debian, I don't have access to fc to test now) |
 |
|
|
seanho
New Member

Canada
62 Posts |
|
|
zhao
Junior Member
 
178 Posts |
Posted - 05/20/2004 : 01:47:02
|
I actually have the same problem as Tremek using Knoppix 3.4
I definately added the modeline to XF86Config-4 in /etc/X11. The only thing that was a little off was that I didn't have an "internal_panel" identifier in the Monitor section. The only identifier was "Monitor0". This is where all the other modelines were so I added it there. That didn't work so I also added the "internal_panel" identifier and added it there. After dropping back to the console with ctrl-alt-F2, I restarted X using "/etc/init.d/kdm restart". After compiling and running the patch the result was the wrap-around reported by Tremek.
I also tried it with Mepis (which also had the "Monitor0" identifier), but I don't get anything (not even the wrap around). I'm no linux guru so maybe one of you guys can tell me what's wrong.
I would use a regular debian install, but installing the hardware modules is a pain in the butt and whenever I install debian from scratch I get really long boot times (maybe somebody has some tips here?).
Anyway, I wasn't going to say anything until I had more time to mess around, but since Tremtek mentioned it I figured I'd chime in.
EDIT: Ok, here is what I just did to make it work in Mepis. In XF86Config-4 I had to add a 1280x768 mode to all the subsections of the "screen" section. This also fixes the problem in Knoppix (not sure about Fedora). I think XF86Config and XF86Config-4 are different in this way. |
Edited by - zhao on 05/20/2004 03:09:24 |
 |
|
|
zhao
Junior Member
 
178 Posts |
Posted - 05/21/2004 : 00:34:33
|
Anyway, thanks to Andrew for the patch. Care to give us a detailed explaination of how you did it?
Also, while we are on the topic of the i810. Does anyone know how to use the tv-out and external monitor features in Debian? |
 |
|
|
galtsavenger
Starting Member
9 Posts |
Posted - 05/21/2004 : 09:48:38
|
No go for me here - it's entirely possible I've done something silly. Here's my info
Chipset: 855GM BIOS Configuration area offset: 0x0c20 bytes BIOS Version: 2878 Timing parameter block: 025b Patch complete.
Running Xorg 6.7.0 - ran the patch, made the changes listed in deyzarc's post. After the patch, Xserver restart, screen goes to 800x600. Reboot and run Xserver and it starts in the usual 1024x768 mode. Is there something else required? |
 |
|
|
seanho
New Member

Canada
62 Posts |
|
|
zhao
Junior Member
 
178 Posts |
Posted - 05/21/2004 : 14:45:03
|
quote: Originally posted by seanho
Section "Monitor" Identifier "LCD Monitor" HorizSync 20-90 VertRefresh 50-100 DisplaySize 230 138 ModeLine "1280x768" 81.59 1280 1280 1384 1688 768 769 774 791 EndSection
Section "Screen" Identifier "LCD Screen" Device "i855GM" Monitor "LCD Monitor" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1280x768" "1024x768" "800x600" "640x480" EndSubsection
EndSection
I got it working with just these sections.....I didn't have to touch server layout.
Hey seanho, I've been thinking about trying out gentoo for my P5010. I've never used gentoo before (although its supposed to be similar to BSD, which I have a little experience with). How is it working out for you? How is ACPI support? |
 |
|
|
seanho
New Member

Canada
62 Posts |
|
|
shaice
Starting Member
1 Posts |
Posted - 05/23/2004 : 17:44:52
|
Hi all THANK YOUUUUUUUUUUUUUUUUUUUUUUU !!!
all PERFECT ;)
I have a SONY VAIO TR1MP.
this is my output:
[root@vega ice]# ./1280patch.o Chipset: 855GM BIOS Configuration area offset: 0x0c20 bytes BIOS Version: 29 Timing parameter block: 025b Patch complete.
I added that modeline to my /etc/X11/XF86Config.
For SONY VAIO TR Series users: I have not try to reboot without LCD Expand set to OFF in BIOS. Now it is set to ON and all goes perfectly.
Excuse my poor english!
I have put on a page on my wiki:
http://nic-nac-project.de/~shaice/macaroniwiki/SonyVaioTr1mp
feel free to write there ;)
thank you again guys!!
shaice |
 |
|
|
Romain
Starting Member
France
20 Posts |
Posted - 05/24/2004 : 02:14:31
|
Yes !!
Working great under x.org on my tr2 :)
dont forget that on xorg the file is not XF86Config but xorg.conf
Romain |
 |
|
Topic  |
|