Re: [gpm] Getting GPM to work well in Gentoo



On Sat, 2006-09-16 at 19:52 +0200, Alexander Skwar wrote:
> Hi.
> 
> I've got gnome-power-manager-2.14.3-r1 installed on Gentoo Linux
> with Gnome 2.14.x and also on Ubuntu Linux 6.06.
> 
> On Ubuntu, when I press the Power button, a dialog like shown on
> http://www.myimg.de/?img=gnomelogoutc2e.gif pops up. I suppose that
> this dialog is caused by GPM? Is it?

Well, it asks the session to do a interactive shutdown, if that's what
you mean.

> If so, what do I have to do, to get this dialog to show up in
> Gentoo as well?

Run a session as normal, have "lshal -m" running in a terminal and then
press the power button.

You should get something like this:

acpi_PWRF condition ButtonPressed = power

In which case HAL is working well. Assuming you have the power button
policy to be "Ask me" you should then get the logout dialogue. Bear in
mind that Ubuntu heavily patch the logout window, and it may look very
different.

> In Ubuntu, in /etc/acpi/powerbtn.sh, I find the following:
> 
> 	# If gnome-power-manager, kpowersave or klaptopdaemon are running, let
> 	# them handle policy This is effectively the same as 'acpi-support's
> 	# '/usr/share/acpi-support/policy-funcs' file.
> 	
> 	if pidof gnome-power-manager kpowersave > /dev/null ||
> 	  (pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop kded kded loadedModules | grep -q klaptopdaemon) ; then
> 	    exit
> 	fi
> 
> Gentoo doesn't have a /etc/acpi/powerbtn.sh, but it has a /etc/acpi/default.sh,
> which is supposed to handle all actions (and it really does). Now, by
> default, Gentoo will execute /sbin/init 0. But to mimic the Ubuntu
> behaviour, I commented this, so that nothing is done (besides logging).
> That should be the same as on Ubuntu, as on Ubuntu, the powerbtn.sh
> "exit"s right away.
> 
> But when I press the power button, I only get the log message. Nothing
> else happens.

Well, you want to remove the acpid actions (like you suggested) and then
run:

killall gnome-power-manager 
gnome-power-manager --verbose --no-daemon

and see why the power button policy is not being run.

> Obviously, I missed something. But what did I miss?

Should be something little like not installing the gconf schema
properly. Or here's hoping. :-)

Richard.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]