Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
battery monitor gnome applet
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
schumacher
n00b
n00b


Joined: 23 Jan 2003
Posts: 6
Location: Madison, WI

PostPosted: Thu Jan 23, 2003 4:34 am    Post subject: battery monitor gnome applet Reply with quote

Hello, sorry if I've missed this info somehow in my searches: I really want the gnome battery monitor applet to work on my ibook. Right now it always reads 0%, I imagine since it wants to find APM data in /dev or something.

What's frustrating is that I can see my battery info with "less -f /etc/power/apm", it's just the applet doesn't want to see it or something. How can I make the applet understand? Thanks in advance,

Aaron


ibook 700 MHz, kernel 2.4.19-r6, pmud installed and everything, "Battery Charge Monitor 2.0.3" gnome 2
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Thu Jan 23, 2003 8:34 pm    Post subject: Reply with quote

there's an option in the kernel to emulate the APM interface. turn that on.

i have the same model of ibook you do, and i've posted my kernel config at

http://www.desertsol.com/~kevin/ppc

while you're at it, you might as well upgrade the kernel to ppc-sources-2.4.20-r2 :D (i did around new years it works great on our ibook)
Back to top
View user's profile Send private message
schumacher
n00b
n00b


Joined: 23 Jan 2003
Posts: 6
Location: Madison, WI

PostPosted: Thu Jan 23, 2003 9:51 pm    Post subject: Hey! Reply with quote

Thanks! I'm currently emerging the 2.4.20-r2 ppc sources (it was still marked ~ppc, right?) and will try to find this "emulate apm" option that I missed on the first go round.

I actually got most of my info for getting my ibook configured (as far as it is) from your web site. Thanks a lot; it's a great resource!

While I wait on the kernel, here are a couple other things that are happening on my ibook:

* keyboard-repeat (like pressing the down arrow to scroll web pages) stops working from time to time; then it starts working again later; I'm guessing this is probably tricky to track down

* "snooze" seems to put my ibook to sleep (screen off, pulsing white light) but it "wakes" to a way messed-up display that forces me to reboot... I think it's because I'm not using the frame buffer (which also makes fblevel not work) but I couldn't make fb work before, and I could at least use X with the non-fb... I'll be fiddling with this more later today and hopefully it will fix it

* sound volume control is a huge mess, but I think it's mainly because it just isn't very well supported yet; I can get nice results with rhythmbox (which pleases me), but no other sounds at all... it's kind of weird

Anyway, that's just me having time to type stuff; I'm still researching around and fiddling and trying to resolve the X issue and don't expect to resolve the other two in the near future.
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Thu Jan 23, 2003 10:08 pm    Post subject: Re: Hey! Reply with quote

schumacher wrote:
Thanks! I'm currently emerging the 2.4.20-r2 ppc sources (it was still marked ~ppc, right?) and will try to find this "emulate apm" option that I missed on the first go round.


oops that's what i get for posting without checking; I'm actually running ppc-sources-2.4.20-r1 which is ppc, not ~ppc. :cry:
Back to top
View user's profile Send private message
schumacher
n00b
n00b


Joined: 23 Jan 2003
Posts: 6
Location: Madison, WI

PostPosted: Thu Jan 23, 2003 10:14 pm    Post subject: Ah! Reply with quote

Ah! It turns out I did compile "apm_emu" as a module! Load it, works great. We'll see if it helps with the sleep/wake thing too, as the kernel doc suggested it might...

It makes me so happy to have a nice green functional battery monitor up there now! I can't believe I couldn't fix that earlier!


Last edited by schumacher on Thu Jan 23, 2003 10:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Thu Jan 23, 2003 10:15 pm    Post subject: Reply with quote

I'm glad my page has been useful. I need to put up my newer kernel config and make sure I haven't updated any of my configuration files.

I don't have any of the problems you've been having. maybe tonight I can go though the page carefully and check everything I can post which versions of relevant packages I have installed.
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Thu Jan 23, 2003 10:48 pm    Post subject: Reply with quote

I put up a list of all the packages I have installed, my current kernel config, and my current XF86Config-4 file on my page.
Back to top
View user's profile Send private message
schumacher
n00b
n00b


Joined: 23 Jan 2003
Posts: 6
Location: Madison, WI

PostPosted: Fri Jan 24, 2003 12:34 am    Post subject: xfree86 configuration is hell Reply with quote

So I'm trying to get my X to use the frame buffer, and it doesn't want to. I tried your exact XF86config; no dice. It always gives me this "screens found, but none have a useable configuration" crap and then says "no screens found" and X doesn't start; it lands me back at the prompt. I wish I knew what you're doing that I'm not...

Does it matter that the regular consoles appear to be on a frame buffer (ie. they're higher than standard console resolution and I see a picture of a penguin at start up)? I know I've got /dev/fb0 (which points to /dev/fb/0) in my dev filesystem, so it seems like I at least HAVE a frame buffer device...

Argh. And whenever I DO successfully start X, it puts all my virtual terminals (ctrl-alt-F[1,6])in a crappy ultra-dim mode, so that I can't even see them well enough to use them at all, really. Very irritating.
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Fri Jan 24, 2003 2:26 am    Post subject: Reply with quote

I'm using the fb for my text consoles too as well as X.

Last edited by zojas on Fri Jan 24, 2003 3:23 am; edited 1 time in total
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Fri Jan 24, 2003 2:33 am    Post subject: Reply with quote

i have a /dev/fb/0 file also.

do you have pbbuttonsd and pmud running? I have both running. gtkpbbuttons seems to help the volume control too.
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Fri Jan 24, 2003 3:20 am    Post subject: Reply with quote

I put up current versions of my pmud and pbbuttonsd files at

http://desertsol.com/~kevin/ppc/#updates

pbbuttonsd dies on a suspend. so my pwrctl-local file restarts pbbuttonsd on the 'wakeup' event.
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Fri Jan 24, 2003 3:31 am    Post subject: Reply with quote

the only other thing I can think of: are you using a custom frame buffer video mode on boot, or did you stick with the default? I'll put my current yaboot.conf file at the update link too.
Back to top
View user's profile Send private message
schumacher
n00b
n00b


Joined: 23 Jan 2003
Posts: 6
Location: Madison, WI

PostPosted: Fri Jan 24, 2003 6:25 am    Post subject: More progress Reply with quote

I went back to the kernel, and there again I found my answers.

Like an ignorant fool, I had compiled DRI with the radeon module in my original kernel. Looking through your config I saw thay you compiled in the radeonfb code which I had only compiled as a module, thinking "if it needs to be loaded, it will be". I tried modprobing it, and it failed on some unresolved symbol error thing. Thinking I was on the right track, I ended up using my 2.2.20-r2 source, this time not compiling DRI at all, and compiling the radeonfb in statically.

Hurray! Now I can use the UseFBDev X option, and change the brightness of the display (as well as turn it off altogether, which is great for sleeping). Also the brightness keys that pbbuttonsd was supposed to be working finally work, which brings me boundless joy.

/sbin/snooze now works better, sort of; the screen blanks, the white light pulses, and when I wake up I can see (instead of a nasty pattern) some kind of false color version of my desktop vaguely reminiscent of a vintage low-budget music video where everything is pink, green, black, and hard to see. I can navigate enough to feel my way to a terminal in X and try "xrefresh", which doesn't help but does make the screen sort of flash. I can successfully log out, which restarts X and makes everything look normal again. When I log back in everything is great.

I'll work on this more in a bit; thank you so much for all your help. If you have any further suggestions you can bet I'll appreciate them.
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Fri Jan 24, 2003 1:36 pm    Post subject: Reply with quote

which version of X do you have installed? I'm running xfree-4.2.1-r2. I just upgraded that a week ago or so, it fixed the problem of my right arrow key not working in X.

I used to use '~ppc' in my KEYWORDS and then I decided to switch back to the stable packages. My method has been to slowly and incrementally update packages as the stable version overtakes whatever version I had installed with the ~ppc flag. so now I have a mix of old ~ppc packages and current stable packages.

for example, my xfree, kernel, and mozilla are stable versions, but sys-apps/powerprefs is a ~ppc version still. so when i do 'emerge -pu world' I get a list which is about half upgrades and half downgrades. oh well, it will catch up eventually.

but since I've taken ~ppc out of my KEYWORDs I don't think I've had an ebuild fail to compile on me, which is cool.
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Fri Jan 24, 2003 4:13 pm    Post subject: Reply with quote

don't know if this will help, but here's the output of my kern.log when I run 'snooze' and then wake it up by hitting the 'fn' key.

I did this in X. On resume the screen flashes a 'false color' image like you described earlier for a second or so then redraws successfully and everything works fine.

pbbuttonsd dies, but my /etc/power/pwrctl-local file restarts it. I have to restart gtkpbbuttons by hand (i have an item at the top of my blackbox menu so it's only two clicks away).

my volume levels get reset to the middle (when pbbuttonsd starts) but the screen retains its previous brightness level.

I noticed that without gtkpbbuttons running the volume control is quite odd. it starts out really loud and doesn't respond well to using the f4 and f5 keys to try to adjust it. but with gtkpbbuttons running it defaults to exactly half-volume. f3 will toggle mute, and f4 and f5 smoothly adjusts the volume level. (i actually have to hit fn along with the function keys but that's the way I configured pbbuttonsd because I have some of the function keys mapped to window manager operations and I use those more often then I adjust the volume or brightness). once I told pbbuttonsd to use the fn key along with the function key I had to also use the fn key in Mac OS X so I'm guessing pbbuttonsd wrote something to open firmware.

the number in the middle of my prompt is the exit status of the previous command.

Code:

8:53am0quasar:/etc/modules.d#tail -f /var/log/kern.log&
8:53am0quasar:/etc/modules.d#snooze
Jan 24 08:53:35 quasar usb-ohci.c: USB suspend: usb-10:18.0
Jan 24 08:53:35 quasar usb-ohci.c: USB suspend: usb-10:19.0
Jan 24 08:53:35 quasar eth0: suspending, WakeOnLan disabled
Jan 24 08:53:43 quasar eth1: Airport entering sleep mode
Jan 24 08:53:43 quasar hdb: channel busy
Jan 24 08:53:43 quasar CLK_PIN_CNTL on wakeup was: 00000005
Jan 24 08:53:43 quasar ide_pmac: Set UDMA timing for mode 2, reg: 0x1090038c
Jan 24 08:53:43 quasar hda: Enabling Ultra DMA 2
Jan 24 08:53:43 quasar ide_pmac: MDMA, cycleTime: 120, accessTime: 75, recTime: 45
Jan 24 08:53:43 quasar ide_pmac: Set MDMA timing for mode 2, reg: 0x0001978c
Jan 24 08:53:43 quasar hdb: Enabling MultiWord DMA 2
Jan 24 08:53:43 quasar eth1: Airport waking up
Jan 24 08:53:43 quasar PCI: Enabling bus mastering for device 10:18.0
Jan 24 08:53:43 quasar usb-ohci.c: USB continue: usb-10:18.0 from host wakeup
Jan 24 08:53:43 quasar PCI: Enabling bus mastering for device 10:19.0
Jan 24 08:53:43 quasar usb-ohci.c: USB continue: usb-10:19.0 from host wakeup
Jan 24 08:53:43 quasar eth0: resuming
Alarm clock
8:53am142quasar:/etc/modules.d#Jan 24 08:54:19 quasar eth0: MII PHY ID: 4061e0 BCM 5221
Jan 24 08:54:19 quasar adb: starting probe task...
Jan 24 08:54:19 quasar adb devices: [2]: 2 c3 [3]: 3 1 [7]: 7 1f
Jan 24 08:54:19 quasar ADB keyboard at 2, handler 1
Jan 24 08:54:19 quasar ADB mouse at 3, handler set to 4 (trackpad)
Jan 24 08:54:19 quasar adb: finished probe task...
Jan 24 08:54:20 quasar Audio jack unplugged, enabling speakers.
Jan 24 08:54:22 quasar eth0: Link is up at 100 Mbps, full-duplex.
Jan 24 08:54:22 quasar eth0: Pause is disabled

Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Tue Jan 28, 2003 10:49 pm    Post subject: Reply with quote

one more thing to try. go to a text console before going to sleep (ctl-alt-F2). then go to sleep. after it wakes up try going back to X (alt-F7)
Back to top
View user's profile Send private message
schumacher
n00b
n00b


Joined: 23 Jan 2003
Posts: 6
Location: Madison, WI

PostPosted: Sat Feb 01, 2003 6:20 pm    Post subject: virtual terminal sleep Reply with quote

Switching to a virtual terminal thingy before sleeping works like a charm. Took me a while before I got around to trying it, but now that I have I am pleased. Is this what you do, or does yours work from X?

It's kind of annoying when/if I leave it unnattended for too long on battery while in X and it puts itself to sleep, but I can probably tell it never to do that in one of those config files if I ever feel like it...

Thanks again; I am now so very close to 100% functionality that I am no longer actively working on getting more (functionality). :)
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Sat Feb 01, 2003 6:36 pm    Post subject: Reply with quote

I can suspend while in X without switching. but I'm glad the workaround works for you! you can definitely set it not to go to sleep. mine will only turn the screen off by itself. I think it's pbbuttonsd that needs to be set.
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