Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
iMac G5: Two last remaining issues...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Torrance123
n00b
n00b


Joined: 11 Dec 2006
Posts: 2

PostPosted: Mon Dec 11, 2006 10:53 pm    Post subject: iMac G5: Two last remaining issues... Reply with quote

Hi all,

I'm using an iMac G5 (revision A) and have generally got everything sorted: fan control, sound, generally quick system etc. There are a few things that I still haven't solved that are holding me back from making the transition to linux full time, and I was wondering if anyone here knows how to solve them??

1. Power Management: Standby and Hibernate. I've tried patching suspend2 (got a compile error), I've tried enabling the other suspend options in the kernel, but so far I have not been able to get anything working. The iMac G5's are SMU based (not PMU) which I think is half the problem, and I've been told not to hold out hope for standby (suspend-to-ram) but suspend-to-disk is possible. Has anyone got this working?

2. Screen Control: Brightness and Sleep.
The iMac G5's (revA) default brightness is quite dim, and there seems to be no way to control it. fblevel doesn't work as I think that requires PMU. And sleeping the screen, or even just turning off the backlight, has not yet worked..

Well that's it. The other issues (3d Nvidia support and Flash) are on there way to being solved (by Nouveau and Gnash respectively), so if I can fix these I'm a full-time convert.

Can you help me? :?: :?:
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Tue Dec 12, 2006 2:04 am    Post subject: Reply with quote

1. The SMU isn't working quite yet for suspend. Johannes Berg is working on figuring out how the SMU goes into sleep mode. The problem for you will still be the nvidia card though since those do not support sleep with the open source drivers at this time. As for hibernate, it should be possible, I know Johannes Berg has it working on his Quad G5 and others have it working on their PowerBooks, but I can't give you details. If you could be more specific about what fails, we might be able to help you.

2. Sleep isn't supported. The screen level might be controlled with pbuttonsd and a proper framebuffer driver, but I think hansmi is working on fixing the brightness issue. Basically, the nvidia card uses a special curve to calculate the correct values to use for dimming. This curve hasn't been figured out for all machines yet. In those cases, a suboptimal curve is used instead, limiting the max brightness value. I don't know of a workaround at this time, but like I said before, I think hansmi is looking into it.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Torrance123
n00b
n00b


Joined: 11 Dec 2006
Posts: 2

PostPosted: Tue Dec 12, 2006 7:32 am    Post subject: Reply with quote

Hi JoseJX, thanks for your reply!

Regarding suspend2: I'm patching a vanilla 2.6.18.3 kernel, and applying the suspend2-2.2.9-for-2.6.18.3.patch. When I compile I get this error, and compiling ends:
Code:
kernel/built-in.o: In function `.suspend_atomic_restore':
(.text+0x3cd50): undefined reference to `.save_processor_state'
kernel/built-in.o: In function `.suspend_atomic_restore':
(.text+0x3cd58): undefined reference to `.swsusp_arch_resume'
kernel/built-in.o: In function `.suspend2_suspend':
(.text+0x3cdb4): undefined reference to `.arch_prepare_suspend'
kernel/built-in.o: In function `.suspend2_suspend':
(.text+0x3ce34): undefined reference to `.save_processor_state'
kernel/built-in.o: In function `.suspend2_suspend':
(.text+0x3ce3c): undefined reference to `.swsusp_arch_suspend'
kernel/built-in.o: In function `.suspend2_suspend':
(.text+0x3ce5c): undefined reference to `.restore_processor_state'
make[1]: *** [.tmp_vmlinux1] Error 1
make[1]: Leaving directory `/usr/src/linux-2.6.18.3'

So I haven't had a chance to test suspend2 at all yet.

I don't know what I'm doing wrong. When I apply the patch I with --verbose as an option, I get a whole lot of returns like this, and I'm not sure if they are errors or not:
Code:
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/fs/jffs/intrep.c b/fs/jffs/intrep.c
|index 9000f1e..3c24e2f 100644
|--- a/fs/jffs/intrep.c
|+++ b/fs/jffs/intrep.c
--------------------------
Patching file fs/jffs/intrep.c using Plan A...
Hunk #1 succeeded at 66.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c
|index ff2a872..6eb3dae 100644
|--- a/fs/jffs2/background.c
|+++ b/fs/jffs2/background.c
--------------------------
Patching file fs/jffs2/background.c using Plan A...
Hunk #1 succeeded at 16.

Those are just a few - there's heaps of returns like that. Am I patching incorrectly?

Regarding screen brightness: I've been talking to Michael Hanselmann and he doesn't seem to know much about the iMac G5 itself, but he says the low backlight is from using a "safe" value because they were unable to find the exact values that Nvida uses, which is what you said, and that this problem applies to all Nvidia computers. He said the value was set in drivers/video/nvidia/nv_backlight.c: in the kernel, with this: #define MAX_LEVEL 0x534

I really wouldn't have a clue what to change that setting to though...
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Tue Dec 12, 2006 11:52 am    Post subject: Reply with quote

That patch for suspend2 looks fine, I'd have to look more closely to find the reason behind the kernel bug, I'll take a look at it later. But there is another option, nobody has tested the suspend2 sources on ppc yet. If you wouldn't mind testing them for us, I'll make sure they get keyworded. :)

Yeah, if you're feeling adventurous, you could try changing that MAX_LEVEL value, but that suggestion comes with the usual disclaimer that doing so might break things. :p The best thing to do would be to compare what OSX does, but you would need to spend some time decompiling the original binaries to find that. :p
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum