Voodooprojects

Chameleon => DevTalk => Patches => Topic started by: lebidou on February 28, 2010, 04:45:59 PM

Title: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: lebidou on February 28, 2010, 04:45:59 PM
Hello,
I've been playing with prasys' 915resolution port and got my ATI X1900 Mobility to boot with native resolution, so I thought I could share that.
In fact it should work with newer ATI cards too, and I applied the same method to Nvidia cards. I can't test that myself though.

ATI cards are working perfect! If you have a Mobility card, that could solve some of your resolution issues.

Please use the debug version FIRST and report what's written before entering the GUI.

here is the diff for RC5pre11: http://www.gael-philippe.fr/Chameleon.2.0-RC5pre11-autoRes.diff.txt (http://www.gael-philippe.fr/Chameleon.2.0-RC5pre11-autoRes.diff.txt)
and the precompiled boot file: http://www.gael-philippe.fr/chameleon.RC5pre11.autoResolution.zip (http://www.gael-philippe.fr/chameleon.RC5pre11.autoResolution.zip)
precompiled debug boot file: http://www.gael-philippe.fr/chameleon.RC5pre11.autoResolution.debug.zip (http://www.gael-philippe.fr/chameleon.RC5pre11.autoResolution.debug.zip)


How to use it : The booter patches the Standard VESA tables in the shadow Video BIOS (vbios) so the VESA modes will fit the aspect ratio of your display. By default, it will try to get an EDID and use it to get the values. However, the values in the EDID are not always correct.
If the mode from the EDID doesn't fit, you can disable the patch with AutoResolution=No or set a custom resolution with "Graphics Mode"=1440x900x32, using you own resolution.

NEW: while in the boot menu, if you type "Graphics Mode"=1440x900x32 and press F2, it will try to set that mode and return to the menu. In the debug version, keep pressing F2 to go through the output.

NOTE: You have to define a mode in your Boot.plist to have GUI working.

Known issues : On some computer, it will be impossible to set modes higher than 1280x1024. It depends on the VESA implementation in your devices. The booter is not responsible for that.
On NVIDIA cards, you might experience a graphic bug at the bottom of your display. VGA seems ok.
Most Intel GMA hasn't been tested. In theory, should be working.
Not Intel chipsets (e.g. ATI&NVIDIA integrated chipsets, VIA chipsets...) aren't supported. The booter uses a functionality in Intel chipsets from 8xx series to 4 series for unlocking the shadow vbios. The Intel 5 series chipset (core i3/i5/i7) aren't supported either, the functionality has moved.


Moderator Edit: Thread cleaned, Title polished. All threads are maintained by their respective OPs. Collaborative threads must show crystal-clear signs of collaboration. This forum is not a kindergarden for pissing contests. Be nice, have fun or take it elsewhere.  
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: oldnapalm on February 28, 2010, 05:19:22 PM
Great work.

Works fine on GeForce 9800 GTX.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on February 28, 2010, 05:27:14 PM
Great! I'm very pleased to hear that!
thanx for testing!
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: oldnapalm on February 28, 2010, 06:50:03 PM
I get kernel panic mounting USB drive after sleep/wake using this boot. The most strange is that if I boot in verbose mode to see the KP screen it doesn't happen.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on February 28, 2010, 07:30:58 PM
Sorry, but I fail to see how this could be conflicting with USB...
What version of chameleon were you using before trying this one ? And do you use USBfix and/or EHCIAcquire boot options ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: BladeRunner on February 28, 2010, 07:43:09 PM
How does one select and/or modify the boot resolution using this boot file?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: oldnapalm on February 28, 2010, 07:50:48 PM
Sorry, but I fail to see how this could be conflicting with USB...
I can't see too, but it happens.

What version of chameleon were you using before trying this one ? And do you use USBfix and/or EHCIAcquire boot options ?
I was using RC4 without problems (re-tested and it works fine) and don't use USBfix/EHCIAcquire, I just inject device ID of ICH10 to USB* in DSDT (mine is ICH9) so sleep works.

Update: download link for diff is invalid. It's against what version?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on February 28, 2010, 08:17:29 PM
@oldnapalm :
In the first post I used the version available in the repo (r687)
but I think you had a little bit older version (r684), and there are differences with USB between the two.
So I recompiled from r684:
chameleon.r684.resolution.zip (http://www.gael-philippe.fr/chameleon.r684.resolution.zip)

I hope this will work.
update: I corrected the link for the diff file, looks like there were some trouble with .diff extension

@BladeRunner :
As it is, the user can't pick a resolution, the booter takes it from the edid it gets. So it is always using the native one.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: oldnapalm on February 28, 2010, 08:54:47 PM
In the first post I used the version available in the repo (r687)
but I think you had a little bit older version (r684), and there are differences with USB between the two.
So I recompiled from r684:
chameleon.r684.res.zip (http://www.gael-philippe.fr/chameleon.r684.res.zip)
Thanks.

With this version USB works fine after sleep (problem must be in r687), and the boot screen (gray apple) is in native display resolution, but the GUI doesn't show up, it starts in text mode.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on February 28, 2010, 10:04:34 PM
Oops... my mistake, corrected. Download it from the same place. It works now.

And just to know, would you prefer to be able to change resolution using the theme file, or is it better to let it to autodetection ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Gringo Vermelho on February 28, 2010, 10:08:35 PM
The theme .plist only sets the resolution that the theme uses, it should not affect the actual boot resolution set in com.apple.Boot.plist.

Many users will want to set resolution manually in the theme .plist, when theme default resolution and native resolution don't match - and since themes are optional as well imho autodetection is the best way...as long as it works as intended of course :)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: oldnapalm on February 28, 2010, 10:46:59 PM
lebidou,

with the last version the GUI shows up, but at 1024x768, only the boot screen is in native resolution.

The link in the first post is wrong ("The system cannot find the file specified.").

About the USB issue in r687, is it known or should I report it?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on February 28, 2010, 11:54:56 PM
Ok, now, I hope, we're good, gui loads correctly, and link is corrected.

for the usb thing, I don't know, I'm going to bed now. will see tomorow.
Thanx for testing and sorry I made these very silly mistakes.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: oldnapalm on March 01, 2010, 12:09:15 AM
No, I thank you for the great work, all is working fine now.

I will check in the bug report section, if it's not there I will report the USB issue.

Regards.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Ezhoon on March 02, 2010, 07:12:25 AM
Tried this boot with Nvidia 8800GTS 320MB and 30inch lcd combo but, didn't work :(

It boots fine and everything seems to be working alright but,
boot logo's resolution is not 2560x1600, which is native resolution of 30inch lcd
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 02, 2010, 11:53:40 AM
I tried it with my MSI 7300GT (256MB) but unfortunately it didn't work either.
I've read about a bug of Nvidia cards not reading any EDID on the second channel. The (newer) driver (Windows and obviously OSX) can handle it, so once the drivers get loaded the system gets its EDID. This is a bug which effects a lot of cards in particular those with the DVI on the second channel like mine (the port being further away from motherboard).
Note: I tried moninfo.exe as (dos) well as powerstrip (win) - none of them are getting an EDID when connected to the DVI port whereas connected to the VGA it works (even chameleon offers higher resolutions then).

So my question is, if there's any possibility to hardcode an EDID (read from ioregistry) into chameleon?
Also is the restart fix integrated? My system completely shuts down for a sec and powers up again with this bootloader like it did with older ones before (I guess this is the 'restart fix'). Another issue I noticed it that I got another a new system id.

Thanks a lot, it would be fantastic to get this resolution problem solved  :)
eberts
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 02, 2010, 01:50:39 PM
I'm working on adding other chipsets support. Currently it only supports the ones from 915resolution. That could be a reason why it doesn't work on some platforms.

For the nVidia issue, I'll had a possiblity to override the EDID value in case there's none or the datas are incorrect (for example using "GraphicsMode" option).

And there's no other fix but this one on the précompiled boot file.

Thank you all for testing and reporting.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 02, 2010, 11:00:44 PM
That sounds promising :)
Thank you, lebidou
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 03, 2010, 12:03:56 AM
I tried to make an override using GraphicsMode key but something seem to go wrong with the timing calculation. I tried gtf, cvt with and without reduced blanking and it just continuously reboot. So this function is deactivated in the update.

Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 04, 2010, 05:25:36 PM
@Ezhoon, since when you tested the patch there were bug that would have prevented your system to boot if patch didn't work (no EDID), I think that for some reason, your EDID doesn't contain your native resolution. It apparently happens that some EDID only contains a 1024x768 mode.

Could you post your EDID so I can check if I'm right ? Also, what's your chipset ?
Thank you
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Ezhoon on March 05, 2010, 08:39:57 AM
@Ezhoon, since when you tested the patch there were bug that would have prevented your system to boot if patch didn't work (no EDID), I think that for some reason, your EDID doesn't contain your native resolution. It apparently happens that some EDID only contains a 1024x768 mode.

Could you post your EDID so I can check if I'm right ? Also, what's your chipset ?
Thank you

"ioreg -l -w0 | grep EDID" gave me this:

00ffffffffffff0006102092f0000002340e0103804028782860e5a3574b9c25115054000000010 10101010101010101010101010101bc1b00a0502017303020360081912100001ab06800a0a0402e 603020360081912100001a000000fc0043696e656d61204844200a0000000000fc00446973706c6 1790a0000000000017840010300000000c02401a500a5000102031919a800000000000040000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000006d

And my chipset is Intel 965P (Gigabyte 965P DS3 v1.0)
I'll try the newest boot to see if it works..thanks for this project
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 05, 2010, 01:39:42 PM
According to this EDID, native resolution is 1280x800, not 2560x1600. So it will set resolution to 1280x800. Is this what it did? Was the screen stretched? If aspect ratio is correct, it means it worked.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Ezhoon on March 05, 2010, 03:01:46 PM
The screen was stretched..I had to use a "adjusted" apple logo to make it look right.
It is 30 inch lcd so the native resolution should be 2560x1600..any idea why the wrong edid value?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 05, 2010, 03:35:27 PM
If it still doesn't work with the newer version could you send me an lspci -nn dump please? to check if your chipset doesn't have a different device id from what it should be.

Also when your in the boot menu, if you look at video informations, does a 1280x800 mode appear in the list ? and do you use a GraphicsMode key ? If so, don't.

And the wrong EDID value is set by the manufacturer. I don't know why they set a wrong one, it happens.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 05, 2010, 05:43:59 PM
Ezhoon, apparently there is a second location for the VESA table on some nVidia cards. I didn't know that and didn't patch it. I attached an experimental version that should patch the second location also. Could you test it please?

You won't have full res but if it works as it should, you'll have 1280x800, as reported by your EDID.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Ezhoon on March 06, 2010, 11:35:09 AM
Oooops..I'm not supposed to use the Graphics Mode key?
Damn..didn't know that..I'll try the new one without the key and report back asap
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Ezhoon on March 06, 2010, 11:56:40 AM
Bad news..tried the new boot but didn't work..apple logo is more like 1280x1024, stretched.
1280x800 is not there under the supported vesa resolutions and about that lspci dump..
how can I get that?  :D
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 06, 2010, 01:06:58 PM
http://www.x86dev.org/forum/index.php?topic=307.msg2638#msg2638]http://www.x86dev.org/forum/index.php?topic=307.msg2638#msg2638]http://www.x86dev.org/forum/index.php?topic=307.msg2638#msg2638 (http://www.x86dev.org/forum/index.php?topic=307.msg2638#msg2638)

There for lspci. Last Attachment in first post. Install it, restart, and in terminal type "lspci -nn" (without the quoation marks). Send me the output.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Ezhoon on March 06, 2010, 02:36:29 PM
Installed pciutils v1.0.3..restarted..fired up terminal..typed in lspci -nn..gave me

lspci: Cannot find any working access method.  :-[
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 06, 2010, 03:44:07 PM
Ok, I attached a debug version of the booter, which will display info about your chipset, native mode and the modeline it patched (if it does), before loading the GUI.

Install it, boot, press any key, write down what's printed, and press any key again. Tell what it said.
Thank you for your time.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Ezhoon on March 07, 2010, 05:58:57 AM
Ok..this is what I got:

after video_mode
Default: 69547968, ->biosdev: 128, part_no: 2 ->flags: 74
bt(0,0): 69556528, ->biosdev: 128, part_no: 2 ->flags: 74
EDID resolution : 1024x768
chipset is G965 (pci id: 0x29a08086)
Not an Atombios Card
First Standard Vesa Table at 0xc023a
Second Standard Vesa Table at 0xc2f55
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 07, 2010, 02:00:37 PM
This mean it doesn't get any EDID from vbe calls, Eberts said there's a bug in nVidia cards that causes this issue. (EDID resolution should be 1280x800 according to what you posted, and it should have printed the replacement modeline, but didn't). What if you change connector?

I'll implement the EDID override key, but just in case there are laptops with that same issue. I don't recommend using that on desktop, because if you change your display and forget about the key, chameleon will crash trying to set a wrong mode. But I'll do it, at least for test's sake.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 07, 2010, 05:42:36 PM
doesn´t work for me  :(

i try it with a 8800gts 512 (g92)
my display is connected using HDMI and has the native resolution of 1920x1080.

i delete all grephic related stuff from the boot plist, and the pc starts up with a 320x240 resolution.

before the bootloader appears, there is a P45 error
(i use a Gigabyte GA-EP45-DS3R Mainboard...)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 07, 2010, 05:46:29 PM
CEOS, could you write down the error and post it here along with your EDID, please ?

PS: debug and regular versions updated with a small fix. See first post.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 08, 2010, 12:49:43 AM
I just updated the patch with an optional EDID override key (See first post).

So Eberts and Ezhoon, you might want to try that, see if it changes any thing. Thank you for reporting the output from the debug version.

If the mode is incorrect and starts a reboot loop, press 'd' repeatedly while booting to cancel the patch.

Thank you all for testing this.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Ezhoon on March 08, 2010, 07:07:22 AM
Ok..I'll try that..keeping my fingers crossed..thanks
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 08, 2010, 03:05:41 PM
here is my debug output
http://img18.imageshack.us/img18/6269/img0167ks.jpg
and this is how the boot gui looks like
http://img706.imageshack.us/img706/8930/img0168ca.jpg

the resolution is full HD (1920x1080x32)

it would be great if you could include the shutdown/restart fix in your bootloader, i have to hold the on button for a few seconds to turn my pc off :(

btw, why don´t you modify aseres bootloader ?
it has some nice additional features to chameleon
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 08, 2010, 03:58:50 PM
Well, the patch seems to work as it should but your EDID seems faulty and doesn't contain your native resolution but that weird one instead.

So, I'm gonna reapply the CVT timing calculation for NVidia cards and we'll see if it works. I cannot test that on my system because I have an ATI Mobility card, and if I try to apply a mode other than VESA or EDID provided, I'm caught in a reboot loop.

I'll post it as soon as I've done it.

For other patches or other branches, my aim wasn't to start another branch, just to make a patch. That's why I'm applying it to the official release candidate. For the moment this patch isn't complete, when we have something that is working for everyone, we'll see.

And please, resize your pictures before posting it or just write down the output on paper.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 08, 2010, 04:25:10 PM
great
can't wait to test it :)

all these cool chameleon themes look bad on my display due the fact i can't use it's native resolution, just 1280x800
so everything look stretched or has the wrong format
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 08, 2010, 07:04:27 PM
Good news, I got the gtf timing calculation to work. This mean I could override my EDID value with another non-standard resolution (1024x640 instead of 1280x800). The links in first post have been updated.

Add Graphics Mode=1920x1080x32 in your Boot.plist, as such:
<key>Graphics Mode</key>
<string>1920x1080x32</string>

Adapt it to your resolution of course.
The EDID key is still operational but if this work on nVidia cards also, we can remove it.
The mode you write must be supported by your display.

As usual use the debug version first, then report.
Thank you.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: BladeRunner on March 08, 2010, 08:39:21 PM
I just tried your latest boot modules on my system.  My display is an IBM 19 inch G96 CRT connected to an Nvidia GeForce 8400 GS in a PCI slot.  The following is what the debug version reported with no "Graphics Mode" line in the Boot.plist
Code: [Select]
EDID Resolution: 1024x768
Chipset is 865G (PCI id 0x25708086)
Not an AtomBios card
We have an Nvidia card
First Standard VESA Table at offset 0x7f8c
Second Standard VESA Table at offset 0x4c6d
Override Resolution : 1024x768
Override modeline 6410 1024 1079 1183 1343 768 768 771 794
Will patch with modeline  6410 1024 1079 1183 1343 768 768 771 794
Second VESA table wont be patched
After the system started I added a "Graphics Mode" key set with a value of 1280x1024x32 to the Boot.plist and restarted the system.  This time, the initial "EDID Resolution" line did not display. The remainder of the display was the same until it got to the "override resolution" line. Then, it looked like this.
Code: [Select]
Override Resolution: 1280x1024
Override modeline: 10990 1280 1367 1503 1727 1024 1024 1027 1059
Will path with modeline: 10990 1280 1367 1503 1727 1024 1024 1027 1059
Second VESA table mont be patched.
Using the 1280x1024 override I booted the system with and without the "-v" kernel flag and the higher resolution was clearly in effect.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 08, 2010, 08:46:22 PM
Ah! This is good news! Thank you for reporting BladeRunner!

I hope it works for the other testers as well.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 08, 2010, 09:55:03 PM
hmmm, okay

debug output says "override resolution: 1920x1080, but it somehow looks wrong  :o
seems to be a 4:3 gui stretched to 16:9.
is there a way to proof the resolution ?
in chameleon video info is no hint for 1920x1080...
and the chameleon graphic enabler stops working for me...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Gringo Vermelho on March 08, 2010, 10:02:04 PM
Make sure the two resolution settings in theme.plist matches your boot resolution.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 08, 2010, 10:09:18 PM
wow, fast answer^^


the resolution is correct in the boot plist.
i even see the message "override resolution: 1920x1080" in debug output, but the gui looks stretched.
all icons seem to have the wrong format...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 08, 2010, 10:39:21 PM
CEOS, could you please post the whole debug output as BladeRunner did ? So I can check if the modeline is correct, etc.

What bothers me is the fact that you don't see the patched resolution in the video info. That would mean the vbios hasn't been patched at all...
Can you post a vBIOS dump (booting with an other booter)? I saw it doesn't patch the second VESA table, but should do so on 8800 series, I'd like to figure out why.

I attached the RadeonPCI utility by Dong. The kext is 32 bits only. Load RadeonPCI.kext, and in a terminal type "RadeonDump -d" . Send me the resulting file.

Thank you very much.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 08, 2010, 11:24:23 PM
Hey lebidou,

the patching works for my 3650&4870. EDID is not read correctly, but when i extracted my edid in ubuntu, it wasn't standard conform either.

The problem is: While the Boot Gui is nice and all, I get a KP after ***Device in Slot:1***. It complains about AtiRadeon2000X.kext . Do u know anything that would cause this. My guess would be the "injection" of the modified mode, maybe it doesn't leave the card in the state macosx expects it to be.

ep45-ds3l, 10.6
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 08, 2010, 11:52:43 PM
hello diebuche,

I know that if the framebuffer isn't loaded, ATIRadeonX2000.kext would either cause KP or graphic glitches. If you boot in safe mode, or remove ATIRadeonX2000.kext, is ATIFramebuffer loaded ?
If not it can come from a broken graphics enabler, as CEOS reported. But the patch isn't really related to graphics enabler, so...

As I don't use Graphics Enabler because it doesn't cover X1000 series nor ATI Mobility chips, I didn't notice if it was broken. I'll have a look at it though.

Thank you for testing and reporting!

P.S. : GraphicsEnabler seems to do its job here, even if it doesn't enable anything for me, the values are injected in the device tree. So I've no idea why would it make ATIRadeonX2000.kext crash.
[Thinking out loud :] That's weird because we don't do anything to the pci device directly. We're basically copying bytes in the system memory. Macs cards start with non standard modes set, why would it make KP for us?
What version of Chameleon were you using before, diebuche?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 09, 2010, 11:42:06 AM
Okay, I tested the last debug version but it doesn't make a difference  :(
Output:
Chipset is 945G (pci id 0x2770886)
Not an AtomBios card
We have an Nvidia card
First Standard VESA Table at offset 0x8aca
Second Standard VESA Table at offset 0x0
Override Resolution : 1440x900
Override modeline 10736 1440 1527 1679 1919 900 900 903 931
Will patch with modeline  10736 1440 1527 1679 1919 900 900 903 931
Second VESA table wont be patched

Also tried with EDID from ioreg output in com.apple.Boot.plist:
00ffffffffffff0009d1ea765d3700002a10010380281978eac4f6a3574a9c23114f54bdef80714 f8180818c950f81900101010101019a29
a0d0518422305098430098ff1000001ad50980a0205e63101060520898ff1000001a000000fd003 84c1e530e000a202020202020000000fc0042656e51204650
39335657202000b6
Then, 'Override Resolution : 1440x900' disappears...

Just an idea: could it be that the booter gets confused ;) by the onboard graphics chip (GMA950 here) which should be disabled as soon as another pcie card (7300GT here) gets inserted? Maybe it's not completely disabled at that stage... Just a thought...

Thanks for your work, lebidou :)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 09, 2010, 02:58:43 PM
@eberts:
I don't think your GMA950 is in cause. The posted vBios is clearly an nVidia one ("We have an Nvidia card" message). So I guess the GMA950 is disabled already.
I'm gonna ask you two things :
-do you see any 1440x900 mode in video info in boot selection menu ?
-what happen if you try other lower modes like 1280x800 or 1024x640 (assuming one of these is supported by your display)?

@diebuche:
I'm going to make the booter "depatch" the vBios once the mode has been set to see if it comes from a table inconsistency or something like that.
If it comes from CRTC timings, it's going to be hard to solve.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 09, 2010, 03:20:08 PM
her you can get my card's vBIOS:
http://www.mvktech.net/component/option,com_remository/Itemid,26/func,fileinfo/id,2386/

somehow this radeondump utility won't work for me.
but my card has the same BIOS rev. like the downloadable (i proof this with GPU-Z)

I will post a picture of the debug output later this day
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Ezhoon on March 09, 2010, 03:47:15 PM
Tried the newest debug version with both edid key and graphic mode key (2560x1600x32)
I got Override resolution: 2560x1600 but, gui isn't 2560x1600 resolution..it's more like
1600x1200 stretched (I am guessing here, of course, it could be 1280x1024 stretched)

I tried both dvi output but made no difference

-8800gts 320MB, Gigabyte 965P-DS3
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 09, 2010, 04:47:52 PM
After booting -x ist just hangs after dmsos has arrived, no kp...
Could u add this to your trunk, it will report the resolution used in the gui etc.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 09, 2010, 09:06:48 PM
@nVidia Testers: I modified the debug version so we have message telling us which mode is actually used by GUI.
Also, I had an idea this morning: Maybe the mode is isn't used because we patched a mode that wasn't meant to used anyway. So, if you get a message about a mode with improper attributes, please, report the mm and attr values for the 'improper mode', AND for the mode it set instead of the one we want.

@diebuche: I made the vBios to be "unpatched" before the kernel launches. I'm not sure it will change anything.
I just had the idea (just now, while typing) that maybe the Framebuffer Physical Address passed to the kernel is wrong.
I'll see if there's correction to be made.

@all: Link in first post.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 09, 2010, 10:04:41 PM
This is what I get with the new debug version:
First screen:
VBE Calls returned Mode 118: 1024x768x32 mm:6 attr:39f
Press any key...

Second screen:
efi_inject_get_devprop_string NULL trying stringdata
Override resolution: 1440x900
Override modeline: 10736 1440 1527 1679 1919 900 900 903 931
Will patch with modeline  10736 1440 1527 1679 1919 900 900 903 931
VBE Calls returned Mode 118: 1024x768x32 mm:6 attr:39f
Press any key...

?video has always reported 1024x786 to be the maximum for me.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 09, 2010, 10:21:51 PM
Wait, you have the Mode 118 message First, and Then the override ? No override message before that ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 09, 2010, 10:46:30 PM
Sorry, just double checked it.
I forgot to mention the first output which is black & white:

Chipset is 945G (pci id 0x2770886)
Not an AtomBios card
We have an Nvidia card
First Standard VESA Table at offset 0x8aca
Second Standard VESA Table at offset 0x0
Override Resolution : 1440x900
Override modeline 10736 1440 1527 1679 1919 900 900 903 931
Will patch with modeline  10736 1440 1527 1679 1919 900 900 903 931

Then it turns grey saying:
VBE Calls returned Mode 118: 1024x768x32 mm:6 attr:39f
Press key

Then some the screen blanks for just an instant - afterwards:
efi_inject_get_devprop_string NULL trying stringdata
Override resolution: 1440x900
Override modeline: 10736 1440 1527 1679 1919 900 900 903 931
Will patch with modeline  10736 1440 1527 1679 1919 900 900 903 931
VBE Calls returned Mode 118: 1024x768x32 mm:6 attr:39f
Press any key...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 09, 2010, 11:10:15 PM
It looks like it does apply the patch, but actually doesn't.
I'm reading about nVidia cards (as I don't have one, that's the only thing I can do for now), and apparently there is three different location for the vbios: The legacy address 0xC0000 we are using, PROM, and RAMIN. I guess that despite the correct patching in 0xC0000, when performing and answering to VBE calls, the bios uses either the PROM image or the RAMIN image.
So I have to figure out if at least one these images is writable.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 10, 2010, 11:50:38 AM
There is an other update in first post.
All the changes have made in the debug version are now applied to the regular one.

Nvidia users, if it still doesn't work, it means that the card doesn't care about the vbios image we're patching to set mode. The PROM image is read-only, but RAMIN seems to be writable. I haven't figured out how though. And if I don't the only remaining solution is to port the modesetting part from nouveau, which I won't do.

ATI HD3 & 4, I added output in the debug version to see if the ATIFramebuffer crashing isn't due to the Framebuffer Physical Base Address returned to the kernel. VESA Documentation says it could varies from mode to mode.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Ezhoon on March 10, 2010, 03:33:34 PM
Ok..this time..I don't see anything on the Chameleon boot selection screen.
I just hit return key blindly and, no boot logo is displayed..just a gray background.
I tried with and without the edid key in com.apple.boot.plist and the result was same.

Attaching two pics of first and second screen..
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Ezhoon on March 10, 2010, 03:48:16 PM
I just rebooted again and I could see barely a small part of apple logo on the lower left side of screen.
I hope it means something..  :D
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 10, 2010, 04:01:10 PM
Ok, apparently the boot menu is broken on the debug version... I'll see how to correct that.
Did you try booting with the non debug booter? Boot menu is working for me.
According to what's returned by VBE, the mode has been set to proper value. However the attributes says its a double scanned and interlaced mode... maybe that's why it looks weird... Maybe the patch should recalculate the timings according to that.

Note that the "Second Table won't be patched" message disappeared, maybe that was that.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 10, 2010, 04:03:08 PM
Quote
I just rebooted again and I could see barely a small part of apple logo on the lower left side of screen.
I hope it means something.. 

that means i'm not the only one with this problem  :)

@ lebidou,
you hardly made it !
the resolution seems to be correct, but i just can see 1/4 of the gui like Ezhoon  :o
http://img502.imageshack.us/img502/2843/img0169f.jpg
http://img52.imageshack.us/img52/3055/img0171t.jpg
http://img199.imageshack.us/img199/8426/img0172tr.jpg
http://img519.imageshack.us/img519/6259/img0173m.jpg
http://img705.imageshack.us/img705/7937/img0174c.jpg

edit:
just see your answer
will try the normal version now

edit 2:
same result
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 10, 2010, 04:15:11 PM
Apparently the mode patched 118: 1024x768 32bits, with Double Scanning and/or Interlacing. I just checked in VESA Doc and this means that all the vertical crtc values must be doubled. It's not the case. So wait for future update.

PS: It still looks stretched thoug. At least there is changes :)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 10, 2010, 04:17:14 PM
Oh, my fault, i meant to add this link when i wrote
Quote
Could u add this to your trunk, it will report the resolution used in the gui etc.
: http://forge.voodooprojects.org/p/chameleon/source/commit/89/

Edit: I see u did smt similar already...
Do u want a branch at the svn? In case, just write rek or someone else...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 10, 2010, 04:40:19 PM
I will add this thank you.

I don't want a branch for now, the patch has worked on two cards only for now... Plus as I said earlier, I wanted to make a patch, not a branch. The compiled bootloader is here to make testing easier, not to be lebidou's booter.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 10, 2010, 07:51:22 PM
Debug version is updated, boot menu always shows up, with mode dimensions and framebuffer address (the last is for ATI).
There is a possible fix for weird nVidia dimensions. It consists in calling setVBEmode with a VBECRTCInfoBlock structure properly filled with our calculated timings, with Interlace and DoubleScan flags off. I added Horizontal Sync Negative, but it doesn't change a thing for me.

I hope there is some change in the good direction.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 10, 2010, 09:13:46 PM
no success here...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 10, 2010, 09:19:35 PM
Is it back to 1024x768 or does it at least report correct resolution?

EDIT: Attached is a debug version which will set the mode as interlaced. If it doesn't work we'll try double scan.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 10, 2010, 10:07:48 PM
And this is with double scan instead
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 10, 2010, 11:46:56 PM
No difference here, only 1024x768 as usual :(
Tried both again with and without EDID key.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 11, 2010, 12:51:59 PM
Did some more tests with my 4870 and the latest debug ver.:
-with Graphics enabler
-with EFI strings
-w/o any injectors
-using "UseAtiROM"

but still, no cigar. Always the same KP. Do want a screen of the panic?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 11, 2010, 02:36:28 PM
Yes, please. Maybe it will tell us what is making the driver to crash.
Are the physical base address reported by getVESAmodeWithProperty and the one in Bar[0] identical ?

@NVIDIA users, I think that although the vbios image is patched just fine, the setVBEMode call fails. Thats why chameleon creates a buffer to the right dimension but the image overlaps the screen. I'll try to see what would cause this failure.
eberts, I don't know why the 1440 mode still doesn't appear for you. Maybe I missed the second VESA table in GeForce 6xxx and 7xxx series.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 11, 2010, 02:42:54 PM
If it does help I'm attaching my VBIOS for my 7300GT.
Btw. just checked it: I see higher modes using the VGA output but apparently there's no 1440x900.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 11, 2010, 03:13:30 PM
Thank you eberts. I found it. The booter couldn't find it because the last value of the mode 1024x768 was supposed to be a 5 but it's a 97 (0x61). So I'm reconsidering my interpretation of this table. I also noticed there is 2 1024x768 modes again, I'll make the second one to be patched too for everyone.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 11, 2010, 03:26:14 PM
still the same problem with both new versions.

resolution seems to be right, but i can just see 1/4 of the screen...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 11, 2010, 06:00:58 PM
Debug version is updated, changes are:
   +All
         -setVBEMode reports failure
         -uses CVT timings as it is in the vBios files I got.
   +Nvidia
         -the last value of the modeline in second VESA table isn't patched, it is a flag value, bit 0 being "Graphics" or "Console" Mode, the rest of it is unknown.
         -all modes with horizontal resolution lower or equal to the target resolution are patched in the second VESA Table too, execept identified Console Modes.
         -second VESA Table is patched with reduced blanking CVT timing as it seems to be in vBios files.

The link is still in the first post, this however, didn't change. Thank you.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 11, 2010, 06:32:06 PM
Should I remove the EDID key in com.apple.Boot.plist?
I don't see any 'Override resolution message' anymore...  ???

(Width 1024/Height 768 still)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 11, 2010, 06:55:26 PM
Quote
Should I remove the EDID key in com.apple.Boot.plist?
I don't see any 'Override resolution message' anymore... 

(Width 1024/Height 768 still)

similar problems here.
now i can see the whole gui again, but it's just in 1280x1024
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 11, 2010, 07:33:21 PM
Patching still works here;
I attached the screen. Both addresses are the same (0xe0000000). Looks a bit short to be honest...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 11, 2010, 08:06:39 PM
I updated the debug version, there were a typo preventing the graphics mode in the second VESA table to be patched.
I hope it is ok now.

And yes, EDID key can be remove as long as you replace it by GraphicsMode key

@diebuche, thanks a lot I'll look into that. And if the addresses are identical then that's not the problem. On my card it's 0xc0000000, GraphicsEnabler sets the ATY,FramebufferOffset key to 0x80000000, even shorter than yours, I don't think it is that short.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 11, 2010, 08:27:05 PM
Wow! I've never seen a chameleon that big - the monster looked scary  ;D
Okay seriously, first change here but obviously in the wrong direction: just had three modes with 320x200 with ?video.
I'll attach some freakin' pics  :P
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 11, 2010, 10:35:43 PM
Well... at least you got the aspect ratio all right !  ;D

I'll do like for ATI and patch only the mode(s) it would have chosen without the patch (i.e. 1024x768 for most of us). That would avoid to have only a 320x200 mode left. But still, I don't know comes all the other modes disappeared but this one (which should have been gone too, by the way).

I'll wait for CEOS and Ezhoon to report, to see what it does on 8800, maybe it's a 7xxx series issue. After all, there is a 1440x900 mode in your vbios that wasn't listed either.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Ezhoon on March 12, 2010, 10:04:59 AM
Ok..not a good news..like eberts said..Chameleon boot selection screen's resolution is so low that
every letter got blown up huge  :D
On top of that, when I tried to boot in verbose mode I got kp..so I rebooted and this time just booted
in gui and managed to finish the boot process..while booting I can't even see part of apple logo..just a gray background.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 12, 2010, 07:58:11 PM
^^same here.
and it seems like i can just see the upper left corner.
i think the resolution is still right (1920x1080), but i can just see a 320x240 pixel big aerea of the gui due the fact that just the letters are viewable, no icons.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 12, 2010, 09:06:13 PM
I updated the debug version with little changes:
-As for ATI, on NVIDIA cards, only the mode(s) that would have been chosen if patch were not active are patched (i.e. 1024x768).
-I noticed that on my card, it is not necessary to patch the entire modeline to get it to work, just horizontal active and vertical active is enough. I applied that modification for ATI cards and NVIDIA cards. On NVIDIA cards the 'horizontal active minus one' and the 'vertical active minus one' values are also patched.

diebuche, I looked were the panic comes from. It tries to read an address in memory when initializing shader regs. I guess it panics because ATIFramebuffer crashed before full initialization or didn't load at all. Could you confirm that if you remove all ATI related kexts it boots fine? And that re-installing ATI4800Controller.kext makes it hang ? (to identify which kext is hanging first).

for all, when your are in the boot menu, type:
Code: [Select]
AutoResolution=Noto launch the kernel with default resolution and an unpatched vbios. In theory, this should prevent the ATI drivers from crashing.

I guess this won't change a lot of things, but I'm running out of ideas...
I'm expecting you'll get 800x600 instead of 320x240 this time.

Thank you all.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 12, 2010, 09:44:57 PM
^^you're right, this is exactly what happens.
now i can see a 800x600 big aerea from the gui.

in chameleon's video info menue i now see that 1920x1080 is available !

think you are on the right way...

do you need the debug output ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 12, 2010, 10:14:51 PM
I made a test today: I assumed the couple bios/vbios don't know my native resolution (which makes sense regarding all the weird EDID values you all reported) and set an override resolution of 1440x900 (FYI my native resolution is 1280x800). The 1440x900 was shown in the ?video menu but with attr: 0xba . 0xba is a pair number, which basically means the mode is not supported.

Could you all check that if the mode is shown in the ?video list, the attr ends with a pair number or either a, c or e ?
Could you also try to set 1280x800, 1024x640 and 800x500?

Here is my guess : Standard VESA resolutions go from 320x240 up to 1280x1024. Therefore, the VESA implementation may decide not to report higher modes as valid, and therefore refuse to set such modes.
EDIT: Well, depends on the way it's implemented since some people can get higher resolution.

If I'm right, the highest mode available on wide-screens is 1280x800. And it makes the initial goal unreachable with this method.

PS: Thank you CEOS, but since I could predict the behaviour, this time, no output is required.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 12, 2010, 11:51:04 PM
Checked the latest version.
800x600

Also, 800x600x32 is the highest reported mode with this one. All modes have an attr of 39f
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 12, 2010, 11:58:08 PM
Hum... sorry guys, but I don't see what else I can do...
We probably need more than a vbios hack. But that's going waaay beyond my knowledge.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 13, 2010, 12:04:55 AM
But how, on earth, is it possible for other cards to set higher modes like the MSI 9400gt 512MB (I've been told). The only obious change I can see is, that the DVI output seems to be the first channel (closer to the board) so the EDID info  can be read properly from the monitor.  ???
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 13, 2010, 12:58:23 AM
I think it might also depend on the bios.
 The VESA standard is a specification to make sure you'll have something displayed on your monitor. But it is just a specification, the way it is implemented in bios may change from a computer to another.

When the booter performs a VBE call, it deals with the BIOS, not the video ROM (vBios).
I think there might be some mode validation procedure to prevent setting insane modes. I'm not hundred percent sure, but I think that's why some computers can set higher than 1280 modes and some don't. Once upon a time a 1440x1050 mode was actually considered as insane, my first Mac couldn't have more than 800x600.

My X1900 Mobility comes from an amilo Xi1556 (I have the Pi1556, my 7600GO burned out) which has a 1920x1200 native resolution. Yet, my earlier test proved that I can't set that mode.
Your video ROM contains a 1440x900 mode already, but it never showed up.
My point is it does not only depend on the graphics card but also on the bios. That's why, I guess, it worked for oldnapalm and didn't for you.

Remember that this method is more a hack than a real modesetting feature. A real modesetting would allow us to set any mode without performing vbe calls, but it requires a LOT of work (ask Dong, and the guys working on nouveau).

I hope this answer your question.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 13, 2010, 01:32:54 PM
@lebidou  For nvidia: Have u tried patching the other table i wrote about on IM? Dunno what's its for (probably just TV-Out), but could be worth a try. And if I remember correctly there was another part, which kinda looked like a table, but i couldn't make sense out of it.

Gonna try w/o ati kexts now..
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 13, 2010, 02:32:32 PM
Yes I read about that on your thread on IM and added it, that's what I called the second VESA table.
Each mode looks like that:
Code: [Select]
typedef struct {
unsigned short h_disp;
unsigned short v_disp;
unsigned char  h_blank;
unsigned char  h_syncoffset;
unsigned char  h_syncwidth;
unsigned char  v_blank;
unsigned char  flags;           //looks like flags & 1 means "Graphics Mode", to oppose to "Console Mode"
  //on 7xxx the high four bits look like a mode id number.
  //on 8xxx only the low four bits are used, standard graphics mode are always 5.
  // it can be 1 (1400x1050 and 2048x1536) (HSync High, VSync High ?)
  //   3 (1440x900, 1680x1050 and 1920x1200) (Hsync High, VSync Low ?)
  //   3 (Standard Timings) (Hsync Low, VSync High ?)
  //    or 7 (1280x800 and 768x340) (Hync Low, VSync Low ?)
} NV_MODELINE_2;

and it uses reduced blanking timings.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 15, 2010, 05:04:49 PM
hey lebidou

did some more tests: When removing ati kexts, it behaves as expected, but obviously qe/cl isn't working.
Then i accidentally booted my working partition with AutoResolution=No in the boot.plist. It didn't patch, but i still got the   kp.

So I think it's that old pciroot bug, which was fixed month ago in the trunk. Gonna reboot now to confirm

Edit: Ok, im kinda embarassed now; it actually never was a fault with your booter. Adding the PciRoot flag solved the kp; res patching still works
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 15, 2010, 05:44:38 PM
About the "third" mode table in nvidia bioses:

Here's 0x7802 from the attached 8800GTS bios:

Quote
20 03 73 03 B9 20 03 81 FA 58 02 73 03 BA 58 02

Exactly the same string can be found at 0x9EF7.

The first one is followed directly by the already known 512-byte table at 0x7bbd

Strongly looks like some 800x600 mode to me, but nothing similar in the vincinity...
I dunno but it just doesn't look like some random stuff.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 15, 2010, 05:59:03 PM
Ah! I'm glad to finally hear good news!

I'm planning on modifying the way it works because nVidia users reported it didn't work as expected. I won't change the ATI part as long as no one reported the same kind of issue for now though.

Instead of trying to set the native resolution, it will patch all the modes to fit the aspect ratio of the mode given in the Graphics Mode key. For example, if you enter 1440x900x32, the 1280x1024 will become 1280x800, the 1024x768 mode will become 1024x640 and so on. So if we can't set mode higher than 1280, the aspect ratio will still be correct.
Hopefully, it could put an end the stretched boot logo and save time for the theme designers.

I'll add the pciroot patch in the precompiled booter to avoid any further issues.

Thank you very much for reporting! I began to be worried about that issue as I couldn't find out what made ATI drivers to crash.

PS: I'm looking what you just posted about nvidia, I'll talk about what I find later. Looks interesting.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 16, 2010, 02:31:57 AM
I made the updates I plan, it is available for testing in first post, as usual.

diebuche, I looked at the vbios you've sent. I think you're right, it might be some mode, but I could not make any sense of it. Also, I'm not sure if it directly concerns our matter. First, because it looks like a lonely 800x600 mode, with no other 1024x768 (the default mode) or 1280x1024 modes around. And also because if you look a few lines after the 0x9EF7 modeline, there is a bunch of 16/9 HD modes, from 420p to 1080p. And these mode are not related to TV, since the TV VESA table is at offset 0x7c7b. So maybe its related to h264 hardware acceleration, or a non VESA way of dealing with HDMI TVs. Finally, both of the strings you found are close to "SPQR" strings, do you know what SPQR stands for (apart from the roman thing) ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 16, 2010, 09:59:15 AM
Lebidou,
this is very interesting. I tested the debug version and I got modes of 1280x800 but none of 1440x900 although I set it in com.apple.Boot.plist. I inserted my EDID (the one I posted earlier) manually. It said aspect ratio is 16/10 and the output was garbled at the bottem.
I'm attaching a screenshot but it seems hard to read because of my camera (mobile).
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 16, 2010, 01:16:18 PM
Ha, you made it ! ;D

resolution is working here !
looks great
the only "problem" is the small graphic bug at the buttom of the screen...

Graphics enabler works perfekt

debug output:
http://img251.imageshack.us/gal.php?g=img0176s.jpg

great work   :)
can't wait to try the next chameleon version with this patch

ps.
i think it would be a cool feature if you could mark the active video mode in chameleons video info...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 16, 2010, 02:58:37 PM
I correct two typos that may have caused this garbled screen bottom. In first post, as always. I'm glad we got some positive results, at last  :).
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 16, 2010, 06:25:21 PM
Nope, graphic bug is still there...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 16, 2010, 07:56:06 PM
I updated the debug version, does it still does it ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 16, 2010, 08:11:50 PM
yes, it's still there
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 16, 2010, 08:12:39 PM
damn it!
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 16, 2010, 08:41:13 PM
^^ :D
relax mate, i'm sure you will find a way to get it working

do you need the debug output ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 16, 2010, 08:49:03 PM
And 1440x900 seems to be the only mode which is not patched ( 1440x900 -> 1440x900 )
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 16, 2010, 09:01:37 PM
I don't need the debug, there won't be anything useful. I think it's because chameleon's buffer has wrong dimensions. I updated the debug version again. The problem is that I can't reproduce the bug here (and i tried).

@eberts, this mode isn't patched because it is already a 16/10 mode that is in your standard VESA table but considered as 'insane' by your bios (the one on your motherboard, not the video ROM we patch). For some reason, because of the way the VESA standard is implemented on your bios (motherboard), modes higher than 1280x1024 seem to be rejected.
I'm sorry, but there's nothing this method can do about that.


PS: In fact I need some output, when your in the boot menu, the debug version prints a resolution in the high left corner. I'd like to know what it is, and if it fits one of the modes printed in the ?video menu
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 17, 2010, 02:47:47 PM
it's still there...

and i noticed that chameleons info text (the text in the upper left corner) seems a bit wired, too.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 17, 2010, 02:55:05 PM
what do you mean it's weird ? what does it say ? how does it look ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 17, 2010, 03:41:36 PM
all the font overlapping looks a bit wired to me:
(http://img340.imageshack.us/img340/5320/fotojqm.jpg)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 17, 2010, 03:50:44 PM
Try adding this to your boot.plist:
Code: [Select]
<key>Boot Banner</key>
<string>No</string>
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 17, 2010, 07:00:00 PM
Sry, got no idea bout the spqr...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 17, 2010, 07:03:51 PM
if i use this flag to hide chameleon info, i see this:

heigh   1080
attr:     0x3bf
mm:     6


Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 18, 2010, 01:17:21 AM
Hi guys, joining the party :) Finally got time to read the topic and test this properly. First my machine specs:
http://sites.google.com/site/osx86tips/my-system-1 (http://sites.google.com/site/osx86tips/my-system-1)
My ATI works with "plist edited/bin patched" ATIRadeonX1000 and in the case of Snow, dev id added to ATI1300Controller. I also need some sort of injection, usually DSDT patch or... Chameleon Graphics Enabler. Yep, i'm mentioning this because i read in the topic that Chameleon doesn't support x1000 series. It's not supposed to but, this been working for me since netkas added it on PC-EFI.

Ok, Lebidou... the latest debug build works, but not the normal one. The normal, shows the usual resolutions i can check on Chameleon and sets my display resolution, 1440x900. It loads all the files but hangs at "Patched ACPI version 2 DSDT". The debug, shows those "patched" resolutions you talk on post #96 so, 1440x900 becomes 1400x875, but otherwise works fine.
The "funny" thing is, i've been messing my self with Chameleon from the repo's trunk (rev83) and i managed to merge your patch with it, with a little help from
Diebuche's mistake, merging the patch with the trunk.. thanks for the error, man ;) ... the thing works but, i get the same hang as with your "normal" version :o I get no graphics garbage and with AutoResolution=No, all builds work as usual.

Now, i understand you don't want to create a new Chameleon "version" (neither do i!), but i really wish you were using newer sources!

Removed stuff about the rev i was working on.

... keep in mind i'm just a noob trying to learn, no experienced coder.
This patch would be the "the icing on the cake".

Thanks to all! See ya later...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 18, 2010, 02:38:06 AM
Hello Azimutz,

In the debug version I introduced the same way of patching for both ATI and nVidia, that was for trying to reproduce the bug bug nVidia testers are experiencing (not solved yet, sorry guys), but I think I'm gonna go back to the way it did it before for ATI, because 1400 and 1600 modes aren't used by anyone anyway.

I think I just found where the hang comes from. Before applying fake_efi, the vbios is unpatched, then repatched when fake_efi is done. It apparently hangs there, when reapplying the patch. I'll have a look.

As for the sources I use, I started with my own oldish/handcrafted PCEFIv10.5 and then used the last version in the repo (r687), but oldnapalm reported usb related issues, so I ported it back to r684, as it is still the official latest release. And as I said before too, the patch is in a kind of 'alpha' stage, once we get something more solid, I'll have a look to newer sources.

And I'm not an experienced coder as well, that's a hobby. I guess I could go swim or run instead... or read novels rather than bunch of lines of code.

It's nice to have another ATI tester! And someone playing with the patch, I hope you'll find some improvement.
Thank you for reporting.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 18, 2010, 02:02:11 PM
@Azimutz, i think you uploaded the wrong version...
Anyway, i patched i to my branch http://forge.voodooprojects.org/p/chameleon/source/tree/HEAD/branches/diebuche (http://forge.voodooprojects.org/p/chameleon/source/tree/HEAD/branches/diebuche)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 18, 2010, 06:43:24 PM
Hi guys...

Diebuch, going to take a look at it right now. It was more just to share with you guys, not for the faint of heart :D
I've been doing so much stuff at he same time, it's possible i messed up. I also did some more testing using your "mistake" stuff only and other variations on boot.c... it works as what i did so, i might have "extra stuff in there". My stuff is kind of a mix between your's and Lebidou's, as i was already applying the patch when i saw your merge on the repo. Will take a pick at your branch... it's very similar to the rev i'm using.

Lebidou, I suspected you had done something like that to the debug build, talking about the resolutions. The difference between 1440X900->1400x875 is very small, but with the correct theme it's easy to tell. This is working correctly indeed :)
About the hang, i disabled -v to see the spinning wheel, haven't seen it in a long time :P and then i get this msg:
Dumping PCI config space, 256 bytes. For some reason doesn't show when it hangs with verboise mode. That's on ati.c... just a pointer. Your probably right about the vbios, the hang seems to be around there.

The newer sources i wish you use, it's just because it would be easier for me to handle them :P i started trying messing with the code only after the repo was created so, it's the version i know best and it has a lot of changes. Anyway, comparing to Diebuche's merge, the patch is not that hard to fit to the trunk.
I'm not even a coder :) i'm just playing around with stuff others created... much to learn still.

We'll see if this has legs to walk. So far, nice job!

p.s: But, why doesn't it hang with the debug build?

Is your posted diff up to date?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 18, 2010, 07:27:51 PM
Uh, sry i oversaw the diff...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 18, 2010, 07:51:28 PM
Just checked it Diebuche... it's fine :) Anyway i'm going to update it and remove the stuff not related to this patch.
Removed link for now.

p.s.: Tried a build from your branch and it does the same hang. Also, there's some stuff on gui.c (parse display size parameters) that's patched on Lebidou's posted diff and not on yours. Is it really not needed? it seem so, as the patch works without it. In fact i tried patching "parse boot size parameters" instead of "parse display size parameters" and the patch still works. But doesn't has nothing to do with the hang.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 18, 2010, 09:44:39 PM
thx, i added that part
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 19, 2010, 03:24:21 AM
Removed stuff about the rev i was working on.

Diebuche, checked your branch again, you're still missing a line on gui.c from Lebidou's diff. I didn't had it on my sources at the time i made the other diff because it doesn't seem to be needed!? Going to do some more tests with that stuff. Yep, your branch and "my" rev are pretty similar... took some typo fixes from yours :)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 19, 2010, 06:50:58 PM
@ Azimutz

your modifications look really intresting.
i would like to try it  :)

could you provide a pre compiled boot file ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 19, 2010, 08:20:09 PM
It doesn't add anything in terms of autoRes, but its patched to a more current cham version.
@azimuth, heres the diff between our versions
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 20, 2010, 01:06:39 AM
I made a lots of changes, mainly code cleaning. Links in first post.
Now it doesn't try to patch to native resolution, but turns VESA modes to fit aspect for everyone, including ATI and Intel. It doesn't patch the full modeline for anyone, just the horizontal active and vertical active (with minus one values for NVIDIA). So Id' like to know if it still works for NVIDIA, it shouldn't make a lot of changes for ATI.
Also it doesn't patch modes equal or below 800x600, and corrects the 1400 and 1600 resolution to 1440 and 1680 respectively.

I moved the "reapply" code out from ExecKernel and back to bootcommon, and rearanged it, should be safer. It was likely to produce errors (I hope there is no more hanging, ati.c is untouched).
Most importantly, for coders:
 I renamed the file from 915resolution.c/.h to autoresolution.c/.h because it didn't make sense anymore.
 I moved vendor specific code to files named accordingly: ati_resolution.c/.h nvidia_resolution.c/.h and gma_resolution.c/.h
 I removed lots of little remaining parts of various and vain older trials.
 The getMode function is gone, it's not used any more. cvt calculation is still there, just in case, but will probably be removed.
 The useless stuff in gui.c has been removed.
 I still have to merge shortatombios.h to ati_resolution.h, there is no reason to have two headers when others have one.
 
It won't change lots of stuff but it was beginning to be a real mess, particularly in open_vbios, where code for ATI and NVidia were mixed with code for Intel GMA. Now there is a different function for each of them, in their respective files, the same for set_mode (now patch_vbios, more accurate). The patch_vbios function is rearranged to avoid duplicate code (there is still some). The patch procedure is the same for ATI and Intel, NVidia differs because of the two tables.

It is a bit easier to read (at least, it is for me).

Voilà! I hope it is still working for every one, and that coders will appreciate to know when they're reading code for ATI, Intel, Nvidia or all of them.

P.S. @ Azimutz and diebuche, could you post a diff against my sources so I can upload a better precompiled booter? I attached the whole thing.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 20, 2010, 01:53:54 AM
Removed stuff about the rev i was working on.

@lebidou, read ya. Will check your changes and post a diff asap.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 20, 2010, 02:45:24 AM
@lebidou, the diff: Removed; outdated.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 20, 2010, 03:06:28 AM
Thank you very much. I'll have a look at that tomorrow.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 20, 2010, 03:19:05 AM
It's working, mate :) i went straight to the "normal" pre-compiled, having troubles compiling the sources you posted... i get:
Code: [Select]
gui.c: In function ‘initGUI’:
gui.c:499: warning: unused variable ‘count’
not sure how to fix it!?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 20, 2010, 12:11:56 PM
@ lebidou

don't work here
just show some debug lines, but nothing happens
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 20, 2010, 12:26:16 PM
@Azimutz try "make emdetheme" instead of just "make".

@CEOS, I'll try to fix it.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 20, 2010, 12:54:09 PM
the latest changes are in the svn. builds fine; works fine for ati; couldn't test nvidia. Attaching boot based on rev118 from trunk & patched with lebidou's
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 20, 2010, 02:05:56 PM
Hopefully, Nvidia is fixed now.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 20, 2010, 02:19:59 PM
the latest changes are in the svn. builds fine; works fine for ati; couldn't test nvidia. Attaching boot based on rev118 from trunk & patched with lebidou's
this just give me a blinking cursor.

Hopefully, Nvidia is fixed now.
the bootloader is working again, but the grapic patch not.
resolution is low, something like 800x600...
it says: 0 modes to patch
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 20, 2010, 03:07:40 PM
@le bidou
here's ur patch, modified so it can be patched to the the latest cham version...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 20, 2010, 04:18:52 PM
I just updated again, I hope it's ok for NVIDIA.
Just to explain why it fails again : before yesterday, it was working very differently for every card, so I tried to unify the way it works since the only thing that changes from vbios to vbios is the location of data. An issue counting how many modes nvidia cards have was introduced in the process because it wasn't done before.
Now, in the debug version, there is a new step for NVidia showing how many modes there is in each table and if it counted it right. If the number of modes is 0, it is set to 16 and 32 for the first and second table respectively (values taken from an 8800 vbios). I'd like this output to be reported.

@diebuche and Azimutz, thank you for the diffs. I haven't updated the code yet, I'd like Nvidia to be back on rails first. I didn't know which version to use since they're close, so I made "Eeny Meeny Miny Moe", and I'll use diebuche's.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 20, 2010, 04:31:15 PM
Hi guys... @lebidou, the tip to build with "make embedtheme" worked.. didn't thought it would make a difference (noob). Gave a try to the "boot" diebuche posted, works for me (ATI). I can also test GMA950 built-in later if needed.
yep, stick with diebuche's branch, he knows much more about the trade than me.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 20, 2010, 04:33:30 PM
Yes please test Intel GMA! I made changes to that too, I don't know if it still works. There is no debug output for that though, I should add some.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 20, 2010, 05:52:59 PM
i renamed the branch to autoResolution, applied ur latest changes and merged shortatombios into ati_res.h
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 20, 2010, 06:02:04 PM
Thank you very much!
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 20, 2010, 06:10:53 PM
Just to confirm.. finished changes to my rev, compiled properly, ATI works fine ;D
Going to check diebuche's branch (was already helpful ;) thanks!), test GMA950 also, clean up and post.
Later guys...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 20, 2010, 07:24:36 PM
@ lebidou

still just 1280x800....

do you need the debug output ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 20, 2010, 07:59:29 PM
Yes I'd like that
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 21, 2010, 09:21:10 AM
@lebidou, guys... to cut it short, some pics with comments.. sorry for the low quality:
http://www.screencast.com/t/NmFiNzZiYWEt

ATI, as far as i can see works perfect!
GMA950 is screwed. Before i continue, i must say that besides this patch, the sources that i'm working with, never saw any Intel graphics stuff added by me. I read contradictory posts so i kept away from it until i have a bit more knowledge. So, i don't know if support for these cards is working or if i have all the need files. Anyway, this is what i get with GMA:

- using DSDT patch, vanilla kexts; all fine there except for the autoresolution problems, they are the same.
- booter never chooses the closest resolution available, either with auto resolution On or Off:
1280x800 auto On, 1024x768 auto Off. I'm a bit confused about what i usually got when i used GMA by default!?
- using Graphics Enabler instead of DSDT patch and autoresolution disabled, screen is fine, only the resolution seems bigger than it should be. The resolution set at boot is the only one available after login.
- using Graphics Enabler instead of DSDT patch and autoresolution enabled, resolution seems bigger than 1280x800 (the reported one), screen gets a black bar on the left side and the "bottom/rigt side" get out of the display.
Same behavior after login. The resolution set at boot is the only one available after login.
- i do get the card identified on System Profiler and both GMA/Framebuffer kexts load but, i'm not sure that framebuffer is working!? I would say yes, with these symptoms but, i also get a "currently not supported" msg with Wait=y.
- will do a bit more testing meanwhile...

That's it. This is true for both the posted builds and the port to the repo. Nice work you two, lebidou & diebuche :)
liked all the moves, the general cleanup, file naming, vendors separated, etc... I started checking Autoresolution branch and got to the conclusion that it's almost "trunk" so, as i was already getting confused and mem detection stuff is disabled, decided to update to the latest trunk. Will post some diff later...

Edit: intel framebuffer was tricking me, loads at start but unloads later. I do have acceleration but it's there ootb. Memories from GMA times are coming back, but i'm still not sure about the resolution it used to use.
The list of resolutions feels correct, though. I remember trying to set 1280x1024 with no effect.


Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 21, 2010, 11:06:21 AM
Could u try whether this booter works for u for GMA950? http://www.meklort.com/?p=132 (http://www.meklort.com/?p=132)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 21, 2010, 11:41:14 AM
Nope, just hangs after loading kernel with "patching kernel mach_kernel" msg.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 21, 2010, 12:10:37 PM
right, sry, i forgot this one included that kernel patch for dell minis as well; could u try the attached one?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 21, 2010, 12:33:35 PM
debug output:
http://img39.imageshack.us/gal.php?g=img0184yz.jpg
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: diebuche on March 21, 2010, 12:42:07 PM
@CEOS do u have ur cards rom handy?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 21, 2010, 12:59:10 PM
No luck... this one just gives me a black screen and i get the "no signal" msg from the monitor.. twice :P
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 21, 2010, 04:20:15 PM
this is my card's rom:
http://www.mvktech.net/component/option,com_remository/Itemid,26/func,fileinfo/id,2386/
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 21, 2010, 09:20:24 PM
I updated precompiled bootloaders with sources from diebuche's branch. diff is against RC5pre11, r687
I added a few debug output for Intel.
And hardcoded numbers of modes to 16 and 31 for Nvidia tables. Now we are sure it will patch it. I'm still trying to figure out a way to count them. Apparently, 9 bytes structs are actually 10 bytes in size !? That could be cousing tons of problems.
And I want the ouput.

A minor change in autoresolution.c, I wasn't sure about having a switch in a while loop, so I did the opposite, while loops in the switch, duplicate code but certainly more efficient.
 
@Azimutz, since you have an Intel GMA for testing, could you have a look at Deviato's and Andy's versions of the patch to track any typo/mistake due to the moving? I think Andy added some patching for 945 GMA but I didn't look at it.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 21, 2010, 11:18:11 PM
this totally crashes my system

the cursor blinks 2 times, then the screen went black and my pc restart.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 22, 2010, 12:24:22 AM
@lebidou, after reading first post i remembered that i was testing with Graphics Mode added to Boot.plist.
Now testing without it, ATI still perfect! GMA shows the same behavior. The possible pics:
Links:
http://www.screencast.com/t/NzU2ZmQ4M
http://www.screencast.com/t/MzM3YzNkZDYt

There are some changes in the displayed resolutions. Will take a look at the other sources as soon as i can...
pretty busy right now, getting to the point were i don't know were to turn too :(
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 22, 2010, 01:16:50 AM
@Azimutz, I just found a bug in the type 1 bios code, I'll update the code tomorrow. If you have time to correct it in your trunk (there is no hurry, one thing at a time) : in gma_resolution.c, function intel_set_mode_1(), line 145:
replace
Code: [Select]
res->y2 = ((*y >> 4) & 0xf0); by
Code: [Select]
res->y2 = (res->x2 & 0x0f) | ((*y >> 4) & 0xf0); the rest of it seems fine.

@CEOS, I attached a full debug version of RC5pre11 with a loooot of debug information about almost everything chameleon does. I'd like you to pin point the precise moment it crashes.
I also attached an r684 version (which you have been testing till now) updated with the latest changes.
I suspect that the crash doesn't come from the patch but from RC5pre11 (that's why it took my so much time to upgrade to it).

I guess newer isn't always better.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 22, 2010, 02:36:57 AM
@lebidou, that bit is fixed.. will test it soon. But i still didn't had time to add your latest changes to my work sources.. will probably do it over night, that's when i get peace :)

By the way, tested Deviato's booter and goot a similar situation as with Meklort's one.
A bit better actually, as i could still use Ctrl+Alt+Delete to reboot.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 22, 2010, 03:24:39 PM
here is the latest bug output before the screen went black:http://img135.imageshack.us/img135/5696/img0199z.jpg

the r684 version seems to work a lttle bit better, now i get 1 cursor spin before restarting....
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 22, 2010, 05:21:39 PM
I think I found out what was going wrong, updated in first post. Please post output.
It wasn't RC5pre11 fault, sorry. Apparently, since the move from 915resolution to nvidia_resolution, structures needed to be packed (that's the 9 bytes long struct with a size of 10 problem). So now, according to the little virtual patcher I've set up, it should be working, dynamically counting modes etc... hopefully without crashing everything.
I don't know how comes it worked without that before and stopped working after a code move.

It implied little changes in Intel part I can't test, can someone with a GMA test if modes are patched ("1024x768 -> 1024x640" messages) ?

I hope it finally corrects the nvidia part, sorry about that guys.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 22, 2010, 06:19:10 PM
ok, at least it boots up the system again....

but the GUI is not working !
it starts in text mode, and if i push Tab to change to GUI mode the whole screen is full of graphic bugs...

but it seems like resolution patch is working for the splash screen.
the apple and the spinning cursor seems to have the right resolution.
but the graphic bottom bug is still there.

btw, think it was a good idea to use RC5 instead of 4.
will post debug output later
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 22, 2010, 08:25:18 PM
I updated the debug version to have a little bit more output, like what resolution it found in EDID or Graphics Mode key, did it found a correct mode in VESA table and which one, if failure, which function failed. It is certainly still failing while initializing the GUI though. I'd very much like to have the output.
Somehow, initGUI() fails, and it could be because of a wrong resolution. The fact that it is working for the actual boot screen is intriguing.

About the bottom graphics bug, I have an idea but I'm not sure this is it at all, will test as soon as I've figured out why initGUI() failed. It looks like when a font file is wrong and the resulting image is too big for the buffer... I'm not sure on how to solve it yet.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 22, 2010, 08:58:08 PM
here is the debug output: http://img144.imageshack.us/gal.php?g=img0200q.jpg

the screen whith all the graphic bugs happend when i try to change to GUI mode (http://img440.imageshack.us/i/img0204o.jpg/)

and i noticed that the apple logo is not centered (http://img94.imageshack.us/i/img0202gp.jpg/)
seems like it's pushed up a bit by the graphic bug....

Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 22, 2010, 09:28:14 PM
@lebidou, latest debug test. ATI still rocks! Unless anyone reports a bug, ATI is fine.
GMA is a bit better. I wasn't explaining it correctly.. what seemed wrong with the resolution was the ratio, though it's reported correctly (16/10). Now the ratio seems fine, but i still get the screwed screen.
Pics:
http://www.screencast.com/t/NTFhMjI5YTUt
http://www.screencast.com/t/NGYzOTQ5
http://www.screencast.com/t/MzM1ZGQ3
http://www.screencast.com/t/N2M1NGYwZGEt

I had my feeling those crashes CEOS reported had nothing to do with RC5pre, At least on my machine i don't see any reason for them :)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 22, 2010, 09:47:00 PM
Ok, I'm deeply sorry about blaming RC5pre11... but the __attribute__((packed)) thing isn't something you can invent if you don't know about it, right?
I'm happy that ATI seems to work, but that's something I can test myself, so it's easier. I'm almost considering the ATI part as done.

For your GMA, I can't say about the screwed screen, but I noticed there is no 1440 nor 1400 resolution in the bios before it's patched. ATM it uses the resolutions that are already there and turn them into the correct aspect ratio. Since there is 0x0x0 resolutions in the bios (according to your photographs), I will make the intel_set_mode_x functions to set the resolution we have either from EDID (in your case) or Graphics Mode key (in case the EDID is wrong). So we can have the native resolution.

P.S: Just updated with minor changes: 0x0x0 modes are filled with mode in EDID or Graphics Mode key on Intel Cards and the patch is no longer reapplied if there is no change since first run.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 22, 2010, 11:19:28 PM
@lebidou, no need to be "deeply sorry" :) there's nothing to blame on you. As you said, newer doesn't mean better. Yeah, ATI is pretty stable.

Ok, same results as before with GMA. If i did understand, there should be changes on the 0x0x0 modes, but they still show as 0x0x0?! with or without Graphics Mode key (anyway, the edid id being read correctly).
About the screwed screen, it seems just to be like "compressed"... can't find words to explain this... need dinner :)

p.s.: i did liked the fact that it doesn't show the list of "modes to patch" after we press enter to boot! I was going to ask if you could remove it or make it show only on debug, because when the list is long "Wait=y" doesn't help.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 23, 2010, 12:59:54 AM
Oh, my mistake. I forgot to allow patching 0x0 modes. Should be corrected now: modes from 1x1 to 640 are untouched, all the others are patched, the zero ones with resolution from EDID or Graphics Mode key.
This is GMA only, no changes are made for ATI or NVIDIA.

I still don't see why initGUI() would fail on Nvidia cards, and looking.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 23, 2010, 01:35:35 AM
I still see the 0x0x0 modes like in here: http://www.screencast.com/t/MzM1ZGQ3 (http://www.screencast.com/t/MzM1ZGQ3)
Those are all the modes shown except Mode 160, a 0x0x0 too, hidden at the top of the list.

Edit: did a test drive to Andy's branch, it seems the most promising for my GMA950 (desktop), of the ones i tested.
When it gets to the prompt, i only get a withe screen and the monitor OSD splash, dancing around the screen, showing "Imput not Supported". GMA has only VGA out, connected to display's VGA in; the ATI is has 2 DVI (both work, if i'm not mistaken) + 1 S-Video (never tested) and it's connected on display's DVI in; this way i only have to enable/disable on-board graphics to use either of the cards. What kind of signal cold this be sending to the display??

Anyway, the booter works so i tried the login and got there, but didn't ventured further so, i don't know if there was any acceleration. The image quality is just barely enough to see the cursor and click on something at login, but resolution seemed higher than 1440x900, never saw verbose so small :P
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: jthnlee on March 23, 2010, 05:36:17 AM
Hi.. Ive been following ur topic for some time and finally im giving it a try and now would like to post some of my findings... I own a AMD64x2 turion laptop with integrated Nvidia Geforce 7000M chipset. The problem for integrated chipset is that there is no valid Vrom to extract thus editing and flashing vrom is not an option. The best option so far are by ur implimentation. However when using ur boot file, the final line always reads that the EDID gives mode 1024x768 in VESA table even though the graphic key set at '1280x960x32' and both table 1 AND 2 are read with adjustment made to the available VESA modes in the debug output. My native resolution is 1280x800.  Funny thing is that during readjustment , vesa read out 1024x768 = 1024x768 , 1280x800=1280x960... etc.

Readlly hope ur patch can bring some solution to the long epic of Nvidia integrated chipset problem. Although we might not get QE+CI but at least some resolution change.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 23, 2010, 02:09:17 PM
It is not supposed to be working on Integrated Chipsets, I think I wrote that in first post and on InsanelyMac. It is acting like it's patching but I don't think it does. Could you post an lspci or an ioreg dump?
Some clarifications:
We use PAM registers in Intel chipsets to unlock the shadow Video Bios in system memory and write on it. We can use that because Intel released documentation about it. Due to the lack of documentation for Nvidia chipsets, we can't do the  same.
The EDID reported by VBE calls is not always good. That's why there a possibility to override it with Graphics Mode. If your native resolution is 1280x800, why would you set the Graphics Mode key another resolution with a different aspect ratio?
Finally, the line "Mode 1280x800 -> 1280x960" shows that there is already a 1280x800 mode in your vbios. So your system is probably not going set that mode anyway, not with this method.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 23, 2010, 04:11:06 PM
NVIDIA only update in first post:
CVT calculation has been made more accurate, particularly for the Second Table (reduced blanking). Horizontal timings are not modified unless the horizontal resolution is different (1400->1440), only vertical timings are touched. I still don't know why initGUI() would fail, I need the debug output from this version to track it.

I'm going to make a virtual vbios tester for GMA too, so I can check why zero modes aren't patched.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 23, 2010, 06:57:15 PM
no changes so far
GUI still not appear and graphic bug is splash screen is still there :(

debug output seems to be the same...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 23, 2010, 07:09:55 PM
Doesn't it display something like :
Resolution : 1920x1080 (Graphics Mode key)
Found mode 1920x1080 in VESA Table

before "Press Any key..." ?

Any "function() failed " messages ?
All that before getting to the menu?

EDIT: Updated the debug version with small changes: VSync Polarity is reversed, CVT timings is even finer and THERE IS more debug output and I WANT it. I mean it, I want it, "seems" or "looks" the same is not good enough. I know there is going to be a different ouput, I coded it myself, I want to know what it's gonna be. Take a photo, film it, write it down, draw it, record yourself saying it, whatever but POST me the output EACH time you try the booter. I'm blind coding the NVIDIA part, there is no docs on it, the more info I have, the better.

Sorry if I'm being rude, but these NVIDIA cards are dirving me crazy. BTW, if an interested nvidia-equiped developer is passing by, I'd be happy to delegate.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 24, 2010, 12:45:56 AM
@lebidou, GMA only. ATI just works!
Pics:
http://www.screencast.com/t/NGJmYjM2
http://www.screencast.com/t/ZjFlYTAw
http://www.screencast.com/t/YzE0ZDRiNzAt

Still the same problem with display, no diff there. Also same modes shown on ?video. After pressing Enter to boot, mode #283 is also the one shown to be set.

Will try to get some help for nVidia :)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 24, 2010, 01:44:39 AM
My FTP is down for a while so I'll post the update here as attachment this time.
This update is for everyone. It's a simple logical update :
    First mode in table is now patched with the resolution provided by EDID or Graphics Mode key.
    Only the modes with a different aspect ration are patched (No more 1440x900 -> 1440x900 lines)
    0x0 or 0x768 modes are patched with resolution from EDID or Graphics Key.
    Output is printed 12 lines at a time in debug version so you can take your time to see which mode is patched and how.

Hopefully this will make GMA work again. But as there already 1440x900 and 1280x800 modes in vBios, I don't take it for certain. It should bring nothing good or bad for ATI, it will work good, as usual.
I have no idea if this will help for NVIDIA. I still want (need, actually) the output, complete.

Thank you Azimutz for the screenshots, they are useful. I made a little program to virtually patch a 945GMA bios dump which gives approximatively what you sent. I hope the update will change something. Tell me if you find someone or something for NVIDIA, this is killing me... I'd like to make other changes and additions, like dynamic mode changing, so one can test modes if EDID is wrong, but I'm stuck with NVIDIA.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 24, 2010, 02:29:24 AM
@lebidou, http://www.screencast.com/t/ZmEyZmNkNGQ
After that, the screen goes black, "no signal".

One thing that's happening with debug builds is that, after pressing Enter to boot, the booter hangs at the msg about the mode it's setting. It's a lot similar to what happens to me when i use Wait=y.. if i press any key to continue it does nothing. But, that's another matter.. it's just for your info.

Ok, will see if someone on IRC has time and will to check this. I don't promise.. i'm not friends with anyone in particular,
will have to ask.

Edit: some info/doubts via diff: removed, outdated.

Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 24, 2010, 05:20:42 PM
FTP is on again, update is in first post.

I added nawcom's GMA GraphicsEnabler patch from Andy's branch which seems to be working for 945GMA. For ATI and GMA, only the first mode is patched, the rest of the VESA table is untouched, like 915resolution originally did.
No changes for NVIDIA.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 24, 2010, 09:01:25 PM
here is the full debug output: http://rapidshare.com/files/367708142/Archiv.zip.html
it's from your latest bootloader.

here are the changes i noticed:
GUI still not working, but it's just grey now (see picture)
splash screen is not working anymore, just grey like the GUI, no apple and cursor (picture)

i include my Boot plist in case you need it for whatever...

hope that help
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 24, 2010, 09:46:33 PM
Still the black screen and "no signal" splash on GMA.
ATI is rock solid. Pics:

ATI: http://www.screencast.com/t/MGRiMGM1ZW
GMA: http://www.screencast.com/t/ZDM4OTQy
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 24, 2010, 09:54:32 PM
Thank you for the report CEOS. It helps a bit, now I know that initGUI() doesn't seem to be called at all which is weird.

I just made a new update which brings resolution changing/testing while in the boot menu. Type
Code: [Select]
"Graphics Mode"=1280x800x32 and hit F2 to set a 1280x800 mode.
In the debug version, I advise you to keep pressing on F2 when the console is paused, if you want to come back to the menu.

Also, there is some code moves:
    vbios_map * map is now global and defined in autoresolution.h, because we need it in option.c now.
    unlock/relock functions are called from patch_vbios and restore_vbios, since it's mandatory.
    save_vbios is call from open_vbios, if a bios has been found and opened.
    getResolution takes care of the Graphics Mode key, no need to check it before each call.
    close_vbios also free the bios backup, which was never freed before (oups!)
    finally, the debug version now outputs debug info in the boot menu (including disk info, resolution, mode info...)

@Azimutz, to answer your Info.diff questions:
    autoResolution boolean from boot.h isn't required anymore, bool gAutoResolution is declared in autoresolution.h
    the "if with no expression" issue in qui.c has been fixed  by #ifdef AUTORES_DEBUG. Thank you to bring it to my attention.
   for the duplicate debug output, I haven't removed it yet, but will do.

Ah just saw you posted...

EDIT: does andy's 915resolution set a mode for you ? You probably already answer but I don't remember
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 24, 2010, 10:08:10 PM
Ok Lebidou.. i figured the "if without expression" :) wanted to be sure. The boolean on boot.h, almost figured but ended up confused with the mess of folders versions i had here. Cleaned up this morning, now i have it under control! Thanks for the explanations.

Going to check the latest... see if i feedback before you go ;)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 24, 2010, 11:17:43 PM
CEOS and all other NVIDIA user passing by, I reverted the VSync polarity inversion so graphics should go be back (go first post as usual). Also, add this to your com.apple.Boot.plist file :
Code: [Select]
<key>Theme</key>
<string>Default</string>
And make sure you have the Default folder in the Theme one, in Extra, with the appropriate files. Or use any other theme you want, but use a theme.
This is the only reason I see that could make initGUI fail.

Output is, of course, welcome, along with any extra information. The Boot.plist file, in this case, was very helpful. Thank you CEOS.

The 'bottom' bug should be there nonetheless. I don't expect this to be solved with this update.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 24, 2010, 11:40:43 PM
I just try it and it brings back the GUi .....at least somehow
my screens aspect is detected wrong
4/3 instead of 16/9
i just can see a really small area  of the GUI (a part of the upper left corner)
and chameleons graphic enabler is screwed.
just give me a really low resolution (something like 200x200)

will post the debug output tomorrow, it's very late now and i have school at 8:00 tomorrow....
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 24, 2010, 11:44:25 PM
@lebidou, no changes on GMA so, this is just testing with ATI.
Debug info working fine, only the duplicates remain.. i already have them commented out on "my" build.
Resolution change also works, but not without weirdness. I only tried with 1280x800x32; it changes the resolution but the menu gets like if we were on text mode, up & down arrows instead of left & right, "booting foreign OS" messages showing, that stuff. Using Tab to change to text mode, there's no get back to graphics mode. Otherwise booter works fine. At login native resolution kicks in.

About the theme stuff... as you already noticed i don't build with embedtheme and i always use the Theme key on Boot.plist. It's just a choice i made a while ago; the Themes folder is so small that i don't see a reason to make "boot" so big. Also, there were some reports of problems caused by embedding theme or not, when i was testing BootCDMaker, i think. Have to check.. me, i never had much problems or anything that pointed directly for Themes as cause of problems.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 24, 2010, 11:54:55 PM
Hum... Weird as you say, it seemed to be working for me, but I'll do some more testing, to see what I forgot.

At login, native resolution kick in because your graphics driver take over, that is normal and expected behaviour.

For the theme stuff, I think that it wasn't a problem with r684 because it required to be compiled with embedded theme to have themes. Now I compile without it also, but the problem is that if you don't have specified a theme, GUI won't load. That's why GUI wouldn't show up for CEOS (I hope so).

The duplicate thing will be gone in future releases.

EDIT: Just ran a few tests, and left & right arrows are ok for me, I don't have any booting foreign OS messages, the only thing I can confirm is that going from text to graphics mode is broken. Still looking
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 25, 2010, 12:14:46 AM
Hum.. nice info. I knew part of that Themes stuff but still had doubts, your answer just clarified them.

Yeah.. it's weird.. graphics mode still works but it seems that text mode behavior overlaps graphics.
Menu is still usable, just weird. And if i try to change resolution again also doesn't work... or type another stuff.
Will test more later if needed... still have a ton of stuff to clean from these past couple of weeks :P at least they've been educational!
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 25, 2010, 02:41:07 PM
The Mode changing feature should be fixed. This is a general, not-vendor-dependent feature. It should bring no changes for any cards, apart from the fact that you can set your mode before booting.

Although, while playing a bit with it, I noticed that some modes are set in Chameleon but default 1024x768 is back when launching the kernel. Modes already supported by your monitor should be fine though (in my case 1280x800, 1024x640 and 800x500 are ok, but 1280x720 or 1152x720 won't).

@CEOS, I missed your post, just saw it, sorry. The Graphics enabler should not be screwed, because the patch doesn't concern GraphicsEnabler at all. You should check your plist maybe you mistyped something. I can't wait for the output.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 25, 2010, 07:23:21 PM
@lebidou, latest news: "Graphics Mode" change fine, graphics mode->text mode fine, no changes on the rest. They weren't expected anyway.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 26, 2010, 01:00:17 AM
Update for NVIDIA only : I refined a bit CVT Timings (again), for the second table they almost fit perfectly with the original table, for the first one, values are closer. It takes in count the frequency of the mode we overwrite, so the pixel clock should be the same (as there is no pixel clock value in the second table, it's either calculated or fixed within the vbios.)
The first modes of the second table aren't patched anymore (the 320x200 ones.)

I'm wondering if, despite the patch, the actual mode it sets is the original one, and not the resized one. From CEOS' photos, the first mode of second table is patched with native mode (320x200 -> 1920x1080), and the mode it is about to set is this one (#271, ie 0x10F is standard 320x200x32@60Hz). CEOS reported that the set mode was 200x200 like (probably 320x200 actually.)
The one time it (almost) worked, the patched mode was 1920x1200, so it seemed good! Well... with a 120 pixels garbled band at the bottom, because buffer's height was 1080.
Eberts had a band too because it patched the mode from 1280x1024 to 1280x800. The buffer was 1280x800, but the actual mode was still 1280x1024!
I'm not sure I'm explaining it right...

So CEOS, I hope that the new one is working better, and I'm waiting for at least as much photos as the last time to posted. having so much info at a time really made my day. (I don't need much...)

@Azimutz, I don't think I can do much more about GMA, I went on Andy's Thread on InsanelyMac about is patch for 945GMA (wich includes 915resolution from prasys and gma graphicsEnabler from nawcom.) It apparently does not work for everyone. So I guess I'm stuck at the same point as he is.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 26, 2010, 05:54:14 PM
seems things get worse with the new version.
here is the debug output: http://rapidshare.com/files/368441485/Archiv.zip.html


no gui and i'm unable to boot OSX with it....
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 26, 2010, 06:27:34 PM
Ok, I found a typo that made the 320 modes and below to be patched while it shouldn't. However, what I'm more concerned about is the resolution it got. Could you post your Boot.plist again?
It behaves as if there were no Graphics Mode key, and thus, try to set a 1024x768 mode because it detected the insane mode from your EDID. This shouldn't happen.

I have updated the files in first post with fixed typo, but since the resolution isn't detected right, I don't expect it to work ok.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 27, 2010, 11:46:24 PM
Quote
I don't expect it to work ok.
you was right.
it totally doesn't work.

just give me this screen, than my pc restarts: http://i40.tinypic.com/oid3lu.jpgi tried with and without theme.

this is the requested boot.plist:
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Default Partition</key>
<string>hd(2,2)</string>
<key>EthernetBuiltIn</key>
<string>yes</string>
<key>Graphics Mode</key>
<string>1920x1080x32</string>
<key>GraphicsEnabler</key>
<string>yes</string>
<key>Hide Partition</key>
<string>hd(3,1) [hd(4,1)]</string>
<key>PCIRootUID</key>
<string>1</string>
<key>Timeout</key>
<string>5</string>
<key>Theme</key>
<string>Default</string>
</dict>
</plist>
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: THe KiNG on March 28, 2010, 09:02:03 AM
Quote
   <key>Graphics Mode</key>
   <string>1920x1080x32</string>
That is wrong IMHO...what kind of display is that, is it a TV?
It should be 1920x1200x32 if is a normal PC display.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 28, 2010, 11:12:09 AM
According to http://en.wikipedia.org/wiki/Display_resolution it's a 1080 Full HD resolution.

@lebidou, i have two annoyances, one small and the other not so:

- the normal booter version always waits for "Press any key.." before getting to GUI. Small annoyance...
- the debug version, still hangs like i explain on post #173. I can't boot with debug version! Big annoyance...

Edit: ok, the "big annoyance" has nothing to do with your code as i suspected. Booted without "USBBusFix=y" and problem gone. I reported this a while ago on the repo (Chameleon, issue #7)... it seems the usb bus were the wireless keyboard/mouse it's connected, gets disconnected at this point if the boot process pauses at that point?!.. will try to mess a bit with this...

About the GMA... as i already mentioned, i don't paid much attention to it before because of the comments i read and the fact that i don't use it much these days as the ATI is working fine; using it now to help test this patch. Now, i know i read some explanation on why this doesn't work for me, but i can't seem to find it now :P
What puzzles me is this desktop GMA950 is so easy to patch with dsdt.. the card is already supported by the system?! QE/CI works ootb. Will try to find more info on this...

Edit: i knew i'd read this some were :P So the reason why it's not so simple to make desktop GMA's to work with Graphics Enabler is explained here, at the end of the first post by Nawcom:
http://forum.voodooprojects.org/index.php/topic,1029.0.html
It's a fact, my dsdt has no entries for graphics.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: THe KiNG on March 28, 2010, 11:23:45 AM
According to http://en.wikipedia.org/wiki/Display_resolution it's a 1080 Full HD resolution.
I know that, but dosen't mean is native monitor resolution.
On my 24" Samsung display native resolution is 1920*1200 and yes is full HD compliant.
But we are talking about diff thing here, and that boot.plist entry can explain the bad aspect ratio.
But i can be wrong, I'm not such a display expert...
Just my 2 cents.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 28, 2010, 11:39:10 AM
Yeah, you can be right there, The King.. just read a bit more. I'm also not a display expert, in fact it confuses me a bit :P Thanks for your input.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 28, 2010, 02:24:26 PM
Quote
That is wrong IMHO...what kind of display is that, is it a TV?
It should be 1920x1200x32 if is a normal PC display.
you are right.
it's a TV.
i connect it to my pc using a DVI/HDMI swith.

btw, 1920x1080 is HDTV.
the HD logo on a PC monitor just says that the device is able to show HD content which was recorded in 1920x1080 through up or downscaling
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 28, 2010, 03:11:08 PM
I just read your posts and still looking for bugs.

@The King, I don't think the 16/9 aspect ratio is such a big problem, it has been detect as such before, there is no reason for it to be detected as 4/3 now. I'll just revert some changes back to have it detected again. I have been able to set 16/9 modes on my 16/10 panel with no big trouble, maybe nVidia bioses are more restrictives.

@CEOS, the reboot bug is probably due to CVT calculation, I will post a corrected version soon. I'm wondering if they are really necessary anyway.

@Azimutz, could you send me an ioreg when you boot with your GMA but without the patch (when it works)? I know it's weird but I have an entry for GMA in my DSDT even though I don't I have GMA, could be of some help. I'll have look at the bugs you reported.


EDIT: Just updated with planned changes: Removed some debug output that would have caused hanging with debug or inapropriate "Press Any Key..." messages (although I'm wondering if it happens with the precompiled or the ones you compile, because it never happens here).
NVIDIA: Removed the need for CVT computation, not sure about the result, at least it shouldn't crash. Reverted the way it gets resolution back to what it was. The resolution and aspect ratio will be printed in the output, so photos are much appreciated.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 28, 2010, 05:53:50 PM
It's working again :)

GUI is there and Resolution is correct.
exept the graphic bottom bug it rocks solid so far

debug output: http://rapidshare.com/files/369195386/Archiv.zip.html

btw, there in no ram auto detection.
i was quite sure they will add this feature to rc5...

edit: sorry, one picture is blurry, can upload it again if it's importand
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 28, 2010, 06:10:33 PM
@CEOS, ram detection is there but disabled. Still needs a lot of work and it will be done out of the trunk. You can check it out here: http://www.insanelymac.com/forum/index.php?showtopic=201902  ... last pages...
When i have time i'll post a rev with ram detection working... already had it done but had to restructure and cleaned it. I also found the solution for the Extra extensions load problem i was messing with :)
bbl.. taking care of lebidou's request and doing some more tests...

Edit: RAM autodetection can be enabled with UseMemDetect=y, on current trunk (rev 136).
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 28, 2010, 06:55:50 PM
Quote
@CEOS, ram detection is there but disabled. Still needs a lot of work and it will be done out of the trunk.
Thank you for clarification
a version with ram detection would be nice  :)
it's admittedly just a cosmetic thing, but i get used to it (aseres booter had this for a long time...)

@ lebidou
i think i found out a bit more about the graphic bug.
seems like it's content based.
if i use an other theme, it has a different color.
with DTypes theme it's blue: http://img682.imageshack.us/img682/4581/bluebug.jpg
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 28, 2010, 07:32:46 PM
Glad to hear good news again! pfew!

I have no clue about the graphic bug, unfortunately. As I said before it could be because it sets a 1920x1200 resolution despite the patching, or the buffer is too small or too big, I don't know.

EDIT:
I attached an internal test version. This is NVidia only. You will experience two different things :
    -when entering GUI the bootloader will setup a 16/10 buffer if your resolution is 16/9 (1920x1200 instead of 1920x1080.) I'm expecting the bug to be there with a more stretched display, but I want photos to see it by myself.
    -after the GUI (grey apple and spinning wheel), the buffer will be set to your resolution minus one (from 1920x1080 to 1919x1079). I don't know what to expect from that one, photos are mandatory.
DO NOT try to change mode while in GUI on NVIDIA, behaviour is unknown.

I have no clue for that bug. It seems to come from the second VESA table. When oldnapalm tested the booter, only the first VESA table was patched, and it work fine for him, without any bug. I think the first table could be for Analog displays (VGA port) and the second is for Digital (DVI, HDMI and maybe LVDS.) Is there a way you can test VGA, CEOS ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 28, 2010, 10:43:36 PM
no visible changes
here is the output: http://rapidshare.com/files/369282840/Archiv.zip.html
(sorry, one picture is really blurry again, will post a better one tomorrow)

i don't know if i'm able to test VGA.
my video card just has 2 DVI ports, no VGA.

there is a DVI=>VGA adapter, but i think it's not the same like a real VGA port...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 28, 2010, 10:50:14 PM
@lebidou, yeah.. nice to read good news :) CEOS maybe has a point about the "content". I just bumped on some graphics garbage, when trying to type at the GUI using Maclogin theme. Using Chameleon default all fine. I insisted on typing and trying to boot and got the screen full of garbage. First the typed characters didn't show, then a small square showed up at the upper left corner of the screen, then garbage all over :D

Ok, ioregs+dsdt and a readme: http://www.mediafire.com/file/1ommzanmfzl/GMA_ioreg_dsdt.zip

brb with some more comments...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 28, 2010, 10:58:12 PM
I just had look at you photos CEOS, they are instructing: the value I thought was vertical blank in second table doesn't seem to be so... it could be that, or not... :-\
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 28, 2010, 11:31:06 PM
@lebidou, about those annoyances i mentioned, they are gone now in the normal booter. Now, on the debug build it doesn't stop the second time before getting to the GUI (the #ifdef AUTORES_DEBUG, etc... you removed from gui.c #635+-). This stuff is a bit tricky, at least to me.. i tried to play with it one of these days and gave up :P

The "big annoyance" on the debug build, the one that made me hang like when i use "Wait=y", it's not your fault!
This only happens because i have to use USBBusFix. In fact the problem is with UHCIacquire, that's included on USBBusFix. I have to use this fix or i start to get USB problems. It seems if the booter pauses at that point, the usb bus were the keyboard is connected, stays disconnected!?

Atm my builds are absolutely similar to yours, same behavior. I just don't usually build with "make embedtheme". I'm working with latest trunk.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 28, 2010, 11:54:00 PM
Azimutz, I'm looking at your dumps and DSDT, I think there is something we can do about that.
One Problem I see is the following :
In my DSDT, the GMA related code (which shouldn't exist) uses some variables it gets from bios in the GNVS Operation REgion. I can't find the same thing in your DSDT. These variables are used to know which port is activated with what kind of device. But, since GMA is integrated, there little chances for this change, so I think we can hardcode it without too much problem (after all, it is hardcoded for my real graphics card, has been replaced, no pb).

What I need from you is to know what kind of outputs are driven by the GMA : how many ports, VGA, DVI (w/ or w/o Dual-Link) , HDMI...
I have the GMA _ADR value all right, what I need is the same for each connectors. That is all.

@CEOS, I looked again. My asumption was right, vertical blanking is vertical blanking. But it has been recalculated automatically, it seems (cvt calculation is really not necessary for the second table.) Those in the first table aren't, I'm wondering what is the relation between the two...

EDIT: did some testing to reproduce the bug, but didn't succeed. All I got is plain black band, not exactly what guys have. CEOS, when you're in the boot menu and type something (like -v or -s) do you see the text appearing above the band ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 29, 2010, 05:34:38 AM
@lebidou, i'm not sure if i understand everything, but if you say so! ;D GMA drives only one VGA port, connected to VGA on the monitor side with VGA cable. The machine came with the ATI already installed, the GMA had the connector covered... "do not remove" it says.

Played a bit with the code, kept the #ifdef AUTORES_DEBUG you removed and commented out the next one. Works fine like that on debug build. Pauses after reporting chipset, press key, pauses again on edid, press key->GUI. On normal build doesn't show nothing as should. The other stuff that kept me from booting, it's fine this way without getc(), best compromise. Here is a diff of what i have atm:
Remove, outdated.

Managed to fix what i wanted in drivers.c so, those changes i'm gonna keep. Works fine here, does what it's told to :) just need to be sure that's all fine.. Can you take a look at it? i used code and inspiration from the "ACPI Table search algo" on dsdt_patcher.c. Just to check if there's no bomb hidden in there ;D don't think so.

See ya later..
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 29, 2010, 01:42:36 PM
Thanks Azimutz. Although I just realized that addind the entry in the DSDT won't help for resolution in chameleon because DSDT is patched after that. But it can help to get the Framebuffer loaded in MacOS. Since you don't use it I don't know if it's really worth it.

I'll have a look at your modifications later.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 29, 2010, 04:56:18 PM
yeah.. that's a thing that i thought and wanted to confirm with you. No need now, you already answered :)
It was just my noob insecurity working! I'm talking about this patch having nothing to do with getting the graphics card to work. If it works, it can set the correct display resolution even if the framebuffer doesn't load.. i tested that with the ATI successfully.

About my private mods to the code, no hurry.. when you can!

About the GMA, that's up to you. I mean, if you have time to mess with that i'm glad to test it. This card it's just a fallback in case the ATI doesn't work and that's not gonna happen so soon. I can even make the ATI work with Leo framebuffer :P that's how i used it on Snow, until i found what was missing on the dsdt and later found that Chameleon can replace the dsdt. But some people might still use it on desktops!?
Atm i'm using Graphics Enabler to inject the ATI if i could do the same with the GMA, it would be sweet, but yeah, not that relevant.

Anyway, let me say that, it's been a pleasure to collaborate with you :)
been learning some stuff. Thanks for that!


Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 29, 2010, 05:05:59 PM
If it works, it can set the correct display resolution even if the framebuffer doesn't load.. i tested that with the ATI successfully.

That's the point actually, and I was thinking about all those ATI mobility users who have trouble getting native resolution. You say you get it working with Leo drivers ? I'm using Tiger's driver in Snow Leopard... See what I mean?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: BuildSmart on March 29, 2010, 06:37:58 PM
Regarding nVidia ram detection, there are several issue which prevent it from working or from working properly with certain cards.

First: (why it doesn't work properly)
Second: (should always be accurate)
Third: (will always be accurate)

From examining the ATI registers it appears that the second method will work for it and you could probably use the third method if you figure out the register maps but both will require better register read/write routines (I can provide them) since the current ones are 8bit restrictive.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 29, 2010, 06:46:23 PM
@lebidou, i'm mentioning this also because i read early in the topic, you talking about that. That's pretty cool,having correct resolution even without framebuffer! I gave it a try, works fine.. forgot to mention. Anyway, you already know that :)
Yes, one of the ways to get this ATI working on Snow is by patching RadeonX1000 (as usual) and using the framebuffer from Leo, plus injection. Injection can be Graphics Enabler or DSDT patch.
I get the point ;)
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 30, 2010, 02:05:31 AM
Small fixes, lots of code changes (again...)

-Code fits Coding Specifications. Some inconsistancies like timing names are corrected, for example, horizontal active is hActive for all structures, not hDisp, or usH_Active, etc.
-I use a chain (or list) to manage tables. This allowed the removal of nVidia specific stuff in vBiosMap structure. It's also easier to implement new types of card (I don't know what else is there, but if Intel decides to use two tables in the future, we are prepared). Plus, all cards can be treated the same way in patchVbios(). Last but not least, for ATI and nVidia, we can backup only the VESA tables, and not the entire VBIOS.
-there is output for closeVbios, mainly to check it is called and if all structs are freed.

-FIX: mode switching was broken (nobody noticed ?), it should work properly (also for nVidia btw)
-FIX: there were typos in atiSetMode_2 function. Probably harmless, but still.
-FIX: in a 'normal' use (no change of resolution, no patch cancel), the closeVbios function was never called, and the structures never freed. Now should be OK.

@Azimutz, I haven't took a look at your diff yet, making the code fit the Code Spec took some time, but I will. Also, I was thinking about a way to turn autoResolution off if there is no entry for GMA in DSDT. But I'm wondering if this is really the reason why it doesn't work for you. Without patch the mode is set through VBE calls without problems, so... ??? ???

@BuildSmart, I'm not sure but I think there is a misunderstanding. Patching the VESA table do not require VRAM detection at all. I think the guys were talking about the system RAM detection feature in RC5pre which have been temporarily disabled.

@CEOS, there is some change in the nVidia part. I tested it as much as could with my means but there still are chances it stopped working. I'm particularly concerned about the closeVbios function. I don't expect the graphic bug to be gone, I'm still trying to figure it out. I'd really like to know if you can see the boot prompt though. And even if no changes, output is much appreciated.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 30, 2010, 01:00:54 PM
Debug output: http://rapidshare.com/files/369893205/Archiv.zip.html

no viewable changes so far...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 30, 2010, 02:40:20 PM
CEOS, do you see the boot prompt ? when in the boot selection menu and type anything, do you see the prompt ?
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 30, 2010, 03:18:03 PM
yes, i can see and use the boot prompt.

it's directly over the graphic bug
i try to boot in verbose and it works

i think normally it should be at the bottom of the screen, shouldn't it ?
seems to me like the graphic bug pushes it up a bit.....
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 30, 2010, 05:51:36 PM
Small update.
FIX: ModeTables structs weren't freed, now they are.
I'm using a function pointer instead of switch statement in patchVbios function. Makes it easier to read and handle.

NVIDIA only: in first VESA table, only first mode is patched.
                    behaviour for second Table is unchanged.

no changes expected for ATI or GMA.

@CEOS, I attached an internal debug version for you to test. Instead of patching 1920x1200 mode, it will patch 1024x768. I don't expect it will solve the issue. I think the GUI will be big, stretched and non centered. I'd like you to confirm with all output you can.
Also if you can test VGA even with a DVI2VGA dongle, it'd be great.
Any other bug report is welcome.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 30, 2010, 07:33:40 PM
Quote
@CEOS, I attached an internal debug version for you to test. Instead of patching 1920x1200 mode, it will patch 1024x768. I don't expect it will solve the issue. I think the GUI will be big, stretched and non centered. I'd like you to confirm with all output you can.
Also if you can test VGA even with a DVI2VGA dongle, it'd be great.
Any other bug report is welcome.

were can i find this version ?
the debug version from the first post seems to be same like before, still boots up in 1080p
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 30, 2010, 08:05:06 PM
Oops... forgot attachement... It's attached just here
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 31, 2010, 01:36:34 PM
Well, 10.6.3 killed 64 bit support for GMA950 and my DSDT patch for ATI >:( probably something missing on the dsdt like before. So atm on Snow 64 bit, i'm limited to Graphics Enabler for injecting ATI and and for GMA 10.6.2 kexts (dsdt patch works).

@lebidou, checked all i could remember on this latest (yeap, missed mode change broke before).
GMA, same info before GUI, as before (http://www.screencast.com/t/ZDM4OTQy); GUI gives "no signal" on display, i can change to Text Mode and boot.
GUI works fine with AutoResolution=No. (check ATI)

ATI, same info before GUI, as before (http://www.screencast.com/t/MGRiMGM1ZW); GUI is fine; Mode Change is fine.
GUI doens't work fine with AutoResolution=No: http://www.screencast.com/t/ZDIyNWNmMWIt
Also, "best matching vesa mode" is not being set. This was working fine! Edit: needs Graphics Mode key on Boot.plist!

There's a typo on nvidia_resolution.c #184 (vAective).

----------

p.s.: don't worry about my personal changes. I'm still testing those and i already made more changes; diff i posted is removed.

Your diff is removing the TODO file. Same thing was happening to me when creating a diff between my trunk_work and the trunk; added the "a" option on diff script to avoid that.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on March 31, 2010, 03:21:18 PM
I uploaded with a few corrections (mainly the nVidia typo). And removed something I forgot to remove in the initGraphics function. It could have been what made things go wrong on some systems. Sorry about that.

I'm leaving home for a few days, so I won't be able to post much, and surely not to upload anything.


side note:
@Azimutz, for info, the short version of "lebidou" would be "bidou", and not "lebi". "le" is a pronoun, the french for "the".
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: Azimutz on March 31, 2010, 05:42:07 PM
side note:
@Azimutz, for info, the short version of "lebidou" would be "bidou", and not "lebi". "le" is a pronoun, the french for "the".
Sorry for that Le Bidou :) wasn't on purpose. I have enough knowledge of French to know that, but i overseen it.
Also, these days my brain thinks in English 99% of the time and you guys should at least use capital letters at the beginning of the words, when not using spaces to separate them on nicks ;)

Still testing, but already saw the GUI is correct now. I had traced it as far as to the "commented out" stuff on initGraphics, still didn't checked the real changes you made. Using the debug build you posted, "best matching vesa mode" is still not working for ATI; it should set 1152x864. Edit: needs Graphics Mode key on Boot.plist!

By the way, i meant adding the "a" option to the others you had, without removing any. Now it's treating .DS_Store files as text :P It can be that i'm being tricked... do you have the TODO file on both dirs?

Edit: well, i don't know were that weird stuff on the diffs was coming from?? :o yeah, it's weird! now it's working as usual. I keep this stuff on simple bash scripts, so i don't have to type all the time and also for consistency/avoid type errors... oh well, f... it. Tired of weird stuff...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: CEOS on March 31, 2010, 09:59:27 PM
here is the debug output: http://rapidshare.com/files/370463628/Archiv.zip.html

no graphic bug with this build.
but less output than i expected...
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: eberts on March 31, 2010, 11:24:18 PM
Okay, back with a newer mobo. It's a Asus P5G43T-M Pro - same graphics card, still the good old 7300GT (256MB).
Internal graphics disabled but obviously the BIOS with the newer chip changed something as you suspected already:
It does seem to set 1440x900x32 but unfortunately the bug at the bottom is still there.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on April 02, 2010, 08:57:44 PM
Hi guys, I'm not back yet. Just to say that all your posts have been read and taken into account. I won't be back until wednesday or so (not sure yet).

Also, I'd like to avoid speaking about things that are not related to the patch as much as possible (like other chameleon features and general os x stuff). I know I did it too, but I'll stop. I just realised how confusing it is. The thread is already quite long for a newcomer to read, it doesn't need to be mixed with other discussions.

Thank you all for reports and patience, see you soon.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: fassl on April 03, 2010, 04:03:38 AM
I remember floating point calculations lead chameleon to reboot some time ago, dont know if it behaves the same way still. If not: There is not really much code needed to set resolutions on nvidia cards, patching vesa modes is not the right way in my opinion. See http://mythic-beasts.com/resources/appletv/nvpanel/index.html . Long time ago i could set native resolution on my laptop in chameleon with that code, the only problem was that i set the resultion after the GUI was already initialized so the screen was kind of broken, and yeah, chameleon rebooting on floating point operations. I tested this code in a kernel extension as well, it is working. Dont misunderstand me, what you did is nice ;) but it shouldnt be done by patching VESA modes in my opinion.

I haven't read the entire thread so sorry if somebody already posted this link.

greets
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on April 03, 2010, 01:39:12 PM
Thank you very mcuh fassl, I think it's going to be very useful indeed. I started doing it patching VESA table because it was the easiest way for me. But I am aware this is more a hack than a real modesetting feature. I'll have a look at nvpanel. Depending on the code, and on what I can get from dong's radeonhd port, I'll see I can do. Because I can't test for nvidia myself, if I do something, it has to be ATI first.

Floating point did make chameleon crash with RC4, I haven't tested them with RC5pre.

Thanks a lot.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: lebidou on April 05, 2010, 03:35:32 PM
If you add an ADD2-N card with dual DVI ports, does your solution configure both DVI ports to work or even one of the DVI ports to work?

If you get another motherboard that has a DVI or s-video port does it work??

Are any of the ports being configured???

At the moment, the solution consist in patching the VESA table. It doesn't configure ports directly, it relies on the VBE implementation. As it has proven its limitation (see Nvidia issue), I am working on setting modes as it should be done, with a small driver, as nvpanel does it.

At the time of typing, it's not ready for any card, and requires some more time and testing. According to what I know so far, all connectors will be setup, except TV outputs (e.g. S-Video.)
There is still somethings I haven't figured out about connector configuration though.

I'm working from Dong's radeonhd port for ATI, and will use nvpanel when done with ATI.

As I want to keep it as small as possible, it will probably still rely on VESA to switch from text mode to graphics, and tune LVTM and TMDS ouputs. We should only care about CRTC registers at that point.
Title: Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
Post by: BuildSmart on April 10, 2010, 01:06:51 PM
If you add an ADD2-N card with dual DVI ports, does your solution configure both DVI ports to work or even one of the DVI ports to work?

If you get another motherboard that has a DVI or s-video port does it work??

Are any of the ports being configured???

At the moment, the solution consist in patching the VESA table. It doesn't configure ports directly, it relies on the VBE implementation. As it has proven its limitation (see Nvidia issue), I am working on setting modes as it should be done, with a small driver, as nvpanel does it.

At the time of typing, it's not ready for any card, and requires some more time and testing. According to what I know so far, all connectors will be setup, except TV outputs (e.g. S-Video.)
There is still somethings I haven't figured out about connector configuration though.

I'm working from Dong's radeonhd port for ATI, and will use nvpanel when done with ATI.

As I want to keep it as small as possible, it will probably still rely on VESA to switch from text mode to graphics, and tune LVTM and TMDS ouputs. We should only care about CRTC registers at that point.
TDMS and the CRTC registers should pretty much make it easy to configure the display attached to the main (active) port and should be safe to alter as required so I believe you are on the correct path since it is the active display you are configuring to compensate for the initial non-configured VBE state.
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: cloud03 on May 24, 2010, 04:36:02 AM
I've tried the RC5 patch (debug mode), and here is a result of mine (screenshot of the debug output, and the result, it seems it can display the native resolution which is 1920x1080 since the font is really small , but only the top bar menu, just like on the screenshot)

I'm using Sony VAIO AW190JAH , with Geforce 9600M-GT 512 MB, I want to use this because using enabler made the internal lcd goes blank...
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: cheatman on June 02, 2010, 05:31:39 PM
Any news on nvidia bug (stripe at bottom) ?
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: Azimutz on June 02, 2010, 10:04:37 PM
No news on anything guys... we just have to wait.
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: ingmar153 on June 24, 2010, 08:40:46 AM
I changed the boot file, and I got the resolution.

But i don't know why the resolution is not full screen
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: vietluvmac on July 23, 2010, 10:08:05 PM
Excellent! Thank you very much. It works just fine.

For my ATI x1700 card, it works even without any additional and injected kexts as it did before. Well done!
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution por
Post by: lseba on October 22, 2010, 12:03:34 AM
hi lebidou
im giving a try with this boot in my dell xps1647 i5 430m ati 4670m 1gb. until here i got 1152x864 using graphics enabler=yes and graphics mode 1600x900x32
using your boot fromthis post:

Quote
Re: ati and possibly nvidia resolution(based on prasys' 915resolution port)
« Reply #217 on: March 30, 2010, 08:05:06 PM »
Quote
Oops... forgot attachement... It's attached just here
 Chameleon.RC5pre11.autoResolution.internal.zip (100.15 kB - downloaded 17 times.)

i get this debug at start:


 but when i select my boot disk from chameleon i get 152x864. my boot.plist doesnt define a mode
the chameleon version installed is rc5 prerelease
it would be great to get 1600x900. i've been trying radeonhd from dong with no luck so far
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: iComputer on December 06, 2010, 11:17:55 PM
Anyone got luck with 7800 GT?
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: vanilla on February 08, 2011, 02:44:42 PM
Hello, it is not working for me. I supply my VBIOS and screenshots.
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: Azimutz on February 08, 2011, 06:53:39 PM
Vanilla, http://www.insanelymac.com/forum/index.php?s=&showtopic=211294&view=findpost&p=1636583 ;)
Sorry for the bad news...

If you guys see the message "Chipset is UNKNOWN", your out of luck :(
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: pouet666 on February 08, 2011, 10:21:39 PM
Hi all,

I am currently facing some "problems" getting the correct resolution in Chameleon, but I'm not familiar with VBIOS patching, so let me explain it to you... ah, and I'm a software developer, so I already hacked the source code to investigate a little :)

First, my setup:
 - MB: Asus Rampage II Extreme (x58 based)
 - CPU: Core i7 920
 - GFX: GTX 295 (first rev, 0x05e0, so double PCB I guess).
 - Display: Dell 3008 (30", native res: 2560x1600).

The graphic card works really well with OSX (and I have native res in this case), but within Chameleon, I'm limited to 1600x1200 (I have tested that with the debug 'boot' file provided earlier in this thread).

Now, what I have done...

But it seems, that the mode is somehow not correctly patched in the VESA tables. On the console, I see:
 Mode 1024x768 -> 1024x768

I put some debug outputs inside nvidia_resolution.c, in the 'nvidiaSetMode' function, and when the patching of the first VESA table occurs. It seems that evenso the hActive is correctly set, it gets magically reseted afterwards, ie. if you put a PRINT() right after the "modeTiming[idx].hActive = *x;", everything seems to be in order. But if you put the same PRINT after the hActiveMinusOne patch, you get once again 1024.

Could it be that the VBIOS is not correctly opened? or read-only?
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: Azimutz on February 09, 2011, 01:32:59 AM
Pouet666,
Quote
Could it be that the VBIOS is not correctly opened? or read-only?
yep, something like that; check this (http://forum.voodooprojects.org/index.php/topic,1655.msg8590.html#msg8590) Lebidou's post; seems that writing back is the problem, judging by your findings.

Btw, nice research and explanation :)

Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: pouet666 on February 09, 2011, 11:54:03 AM
So I guess there is no way I can get 1920x1200 (or 2560x1600) inside Chameleon GUI ?
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: Azimutz on February 10, 2011, 12:25:47 AM
Check this (http://www.insanelymac.com/forum/index.php?showtopic=211294) topic; besides this patch, that's the only way i know.
I mean, there must be other ways (Fassl mentions one on post 224 (http://forum.voodooprojects.org/index.php/topic,1227.msg6070.html#msg6070)), but they are not implemented, afaik.
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: pouet666 on February 11, 2011, 01:09:38 AM
Yap, I also checked the vbios patching post on insanelymac... But IMHO, it is a little bit too dangerous, wait... no..., risky :), and also not challenging enough for myself :P

As I'm coming from the Linux world, I will check what's happening with their uvesafb and my graphic card/display. If I manage to get some high-and-not-in-the-vbios resolutions, I'm currently thinking about hacking Chameleon and integrating this uvesafb in it... But that's a long way to go
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: Quier on February 12, 2011, 10:12:11 PM
Hello! Sry for my newbish question but I really don't know how to use this patch. When I'm copying boot file to root directory and replace existing one (of course I've got a backup) process of patching VESA hangs at "First standard VESA mode on offset...". I don't know what to do with this diff file, too. So if someone can help me with this I'll be grateful!

Thanks in advance
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: iostres on July 04, 2011, 12:41:29 PM
Hi guys,

first I would like to thank you for doing a great job.

I would like to ask if this patch is possible to use for integrated i5 Intel HD graphics? If so, I would like to help on it since I have a laptop with mentioned GPU. I saw there is an debug image - where can I get this exact patch with debug image?

BR,
iostres
Title: Re: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)
Post by: Azimutz on July 04, 2011, 05:43:27 PM
iostres,
read the 1st post carefully, the answer is there...
It only works with Intel chipsets up to 900 series.