Author Topic: Graphics Card Plist in /Extra  (Read 6103 times)

0 Members and 1 Guest are viewing this topic.

ANARCHiNTOSH

  • Observer
  • Posts: 11
  •  + Ⓐ
    • My InsanelyMac Page
Graphics Card Plist in /Extra
« on: June 11, 2010, 01:06:57 PM »
It would be rad if chameleon could:

1. Use a plist in /Extra, so you dont have to convert it to hex and put it in boot.plist

2. Have the option avaliable to detect device-address of graphics card and use that instead of the device-address in the plist
eg PciRoot(0x1)/Pci(0x3,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)

3.Have it managed neatly so that any file appended with the file extension inject.plist or inject.gfx.plist is injected as a device-properties entry.
inject.gfx.plist would be a special thing, whereby the gfx part of the extension would signal that it wants 2. (ignore the plists device-address entry and replace it with the graphics card device-address detected by chameleon)



That way anyone with a single gpu card could put a plist on their install or boot cd and have graphics 'just work' from the get go as easy as adding a kext. Currently preparing an efistring for osx you need to boot up some other way, use OSX86Tools or gfxutil or some other dated piece of software to find pciroots and convert to hex and its a pain.... It would help people trying to develop better efistrings as well, as itd be quicker to tweak a plist and test it.


Chameleon can already perform the major functions needed for this - in the graphicsenabler code.
It can already detect graphics card device address, convert stuff to hex and prepare an injected device-properties entry.

It seems to me that this would not be so difficult to implement, but very very useful, possibly more useful than graphicsenabler, which is un-editable for people who do not have extensive coding skills and tends to reduce the average osx86ers initiative to simples pleas of "please add support for ....!"

I'm not a C coder, so take everything i say with a pinch of salt, but by looking at Chameleon RC4 source, it seems to me like this feature if implemented would depend on device_tree.c (seems to be responsible for finding the device-tree of gfx cards) and device_inject.c (seems to be responsible for preparing the injected device-properties entry)?


What do people think about this? I for one would love this as a feature :)


« Last Edit: June 24, 2010, 07:42:07 PM by ANARCHiNTOSH »
 10.6.3 Retail GA-EX58-UD5 and ATI4350

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Graphics Card Plist in /Extra
« Reply #1 on: June 11, 2010, 04:11:10 PM »
Hi ANARCHiNTOSH
1. Use a plist in /Extra, so you dont have to convert it to hex and put it in boot.plist
This sounds a good idea for problematic cards that can't be enabled with the GraphicsEnabler boot option but I personally don't understand enough about the technical details to know if it would work or not.. I'd better leave that to the experts :)

2. Have the option avaliable to detect pciroot of graphics card and use that instead of the pciroot in the plist
(this could be enabled/disabled with a boot flag in boot.plist)
I'm not sure if this is what you mean, but I know the pre-release of RC5 can auto detect the correct pciroot from parsing the _UID value of Device (PCI0) in the DSDT. I think it's similar (if not the same) as how PC-EFI does it.
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

ANARCHiNTOSH

  • Observer
  • Posts: 11
  •  + Ⓐ
    • My InsanelyMac Page
Re: Graphics Card Plist in /Extra
« Reply #2 on: June 11, 2010, 07:38:38 PM »
Thanks for the speedy reply,
I'm not sure if this is what you mean, but I know the pre-release of RC5 can auto detect the correct pciroot from parsing the _UID value of Device (PCI0) in the DSDT. I think it's similar (if not the same) as how PC-EFI does it.
I think i was using the wrong terminology :o, i meant to refer to the
<key>PciRoot(0x1)/Pci(0x3,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)</key>
entry in an efistring/plist that specifies the device address. Ill update the first post just so its clearer for anyone reading.
« Last Edit: June 11, 2010, 08:07:53 PM by ANARCHiNTOSH »
 10.6.3 Retail GA-EX58-UD5 and ATI4350

digital_dreamer

  • Observer
  • Posts: 11
Re: Graphics Card Plist in /Extra
« Reply #3 on: June 14, 2010, 10:50:31 AM »
I'd love option #2! - inject the device tree for the EFI string.
This would make EFI strings more portable, without needing the device tree of the system inserted in advance.
This would also make is easy to create bootCDs with the EFI strings and not worry whether it contains the correct device tree.

It'd be nice to be able to support dual graphics cards OOTB with such a feature.

OT:
Speaking of such: Is there a way to accurately determine the device tree for a dual GPU graphics card in advance - no guessing?
Will gfxutil ever support retrieving two display device trees or is this a OS X shortcoming?

MAJ

ANARCHiNTOSH

  • Observer
  • Posts: 11
  •  + Ⓐ
    • My InsanelyMac Page
Re: Graphics Card Plist in /Extra
« Reply #4 on: June 14, 2010, 11:27:33 AM »
I'd love option #2! - inject the device tree for the EFI string.
This would make EFI strings more portable, without needing the device tree of the system inserted in advance.
This would also make is easy to create bootCDs with the EFI strings and not worry whether it contains the correct device tree.
Thats exactly what i thought, itd be really useful and graphicsenabler already does it for its generated device-properties entry, so its 100% possible.

It'd be nice to be able to support dual graphics cards OOTB with such a feature.
I think this would require quite a bit more coding on the dev-teams behalf, as the code for detecting multiple gpus is not there. But i agree it would be a great feature!

Speaking of such: Is there a way to accurately determine the device tree for a dual GPU graphics card in advance - no guessing?
Will gfxutil ever support retrieving two display device trees or is this a OS X shortcoming?
i searched for many answers to this when i made my GTX295 efistring pack. GFXutil development stopped a long time ago (i think thats why it doesnt do multiple device trees), but its open source so hopefully someone will pick it up. However, if the two features requested are implemented, i dont think GFXutil will be needed nearly as much in the future, at least for graphics cards. As for retrieving two display device trees, i guess it should be possible, if not from gfxutil's scouring of ioreg dumps (i assume thats how it works), then from however chameleon's graphicsenabler does it.
 10.6.3 Retail GA-EX58-UD5 and ATI4350

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
Re: Graphics Card Plist in /Extra
« Reply #5 on: June 14, 2010, 02:36:10 PM »
TennisGeek tried to implement this idea, if i'm not mistaken: http://forum.voodooprojects.org/index.php/topic,1333
Check with him about that; i think he didn't got it to work as intended??
No knowledge here to help on this, just pointing info :)
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

ANARCHiNTOSH

  • Observer
  • Posts: 11
  •  + Ⓐ
    • My InsanelyMac Page
Re: Graphics Card Plist in /Extra
« Reply #6 on: June 14, 2010, 05:43:11 PM »
@Azimutz
thanks for the link, i think its a step toward 1.

whats needed is a graphics dev, like zef or fassl or anyone that can make successful changes to the chameleon source. because i cannot even compile chameleon from src  :'( to include this.
Apparently it does let you inject a whole graphics plist!

EDIT: 1. is fulfilled by tennisgeeks patch, but i cannot compile chameleon src, maybe i should learn....
however, 2. is not, because graphics plists was not the authors intention.

It would be cool if you could name plists specially, so that chameleon would inject them as a device-properties entry:
the plist in /Extra could just have an extra filename extension. so for autopatching the device-address of a plist with the graphics card address detected by chameleon it would be appended with inject.gfx.plist
eg. NVGTX250.inject.gfx.plist

and to inject a plist without overwriting the device-address of the custom plist
- possibly needed for a dual gpu card like gtx295
it would only be named inject.plist
eg NVGTX295.inject.plist

chameleon would then just automaticly inject any plists appended inject.plist or inject.gfx.plist
any plist named inject.gfx.plist would use chameleons ability to detect graphics card device-address

.......perhaps im being a little bit overbearing with all my different suggestions
« Last Edit: June 18, 2010, 01:21:13 PM by ANARCHiNTOSH »
 10.6.3 Retail GA-EX58-UD5 and ATI4350

ANARCHiNTOSH

  • Observer
  • Posts: 11
  •  + Ⓐ
    • My InsanelyMac Page
Re: Graphics Card Plist in /Extra
« Reply #7 on: June 24, 2010, 07:18:35 PM »
i was bored so i thought id spend time compounding all my various posts into a single coherent feature request not full of various random sugestions
 10.6.3 Retail GA-EX58-UD5 and ATI4350