Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
klaptop_acpi_helper can't hibernate [SOLVED]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
toroidh
n00b
n00b


Joined: 01 Feb 2006
Posts: 9

PostPosted: Tue May 23, 2006 10:39 am    Post subject: klaptop_acpi_helper can't hibernate [SOLVED] Reply with quote

Hi all,
i've just configured the software suspend and all is working fine when I call the hibernate script from a root console. When I call klaptop_acpi_helper --hibernate from a user console the program exit without effects and after a dmesg scanning I understood that, in some weird ways, the klaptop_acpi_helper is calling the hibernate script without using my /etc/hibernate/hibernate.conf.
The suspend process begins but without global configuration parameters:

Code:

Suspend2 2.2.5: Initiating a software suspend cycle.
suspend_userui: program not configured. suspend_userui disabled.
Freezing processes
Preparing Image.
Pages 9f-ff are Nosave.
Pages 439-43a are Nosave.
Pages 9f-ff are Nosave.
Pages 439-43a are Nosave.
Pages 9f-ff are Nosave.
Pages 439-43a are Nosave.
Starting to save the image..
Writing caches...
Suspend2: Compression enabled but no compressor name set.
Suspend2: Encryptor enabled but no name set.
Failed to initialise the Encryptor filter.
Suspend2 debugging info:
- SUSPEND core   : 2.2.5
- Kernel Version : 2.6.16-suspend2-r4-x3
- Compiler vers. : 3.4
- Attempt number : 1
- Parameters     : 513 0 0 0 0 0
- Overall expected compression percentage: 0.
- Swapwriter active.
  Swap available for image: 124501 pages.
- No I/O speed stats available.


The file is readable:

Code:
-rw-r--r-- 1 root root 5239 22 mag 22:48 /etc/hibernate/hibernate.conf


and the compressor name is correctly set:

Code:
Compressor lzf


but I can't tell to the helper to use the right file.

I need help!

Thank you all.


Last edited by toroidh on Wed May 24, 2006 5:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
chrismortimore
l33t
l33t


Joined: 03 Dec 2005
Posts: 721
Location: Edinburgh, UK

PostPosted: Tue May 23, 2006 1:08 pm    Post subject: Reply with quote

I think klaptop_acpi_helper uses it's own configs and stuff and works as a frontend to the suspend2 kernel modules. The simple solution is don't use klaptop_acpi_helper to hibernate.

Why are you wanting to hibernate using klaptop_acpi_helper? Is it so that KDE will hibernate automatically when your battery gets low? If so, there is an option in the KDE Control Centre (somewhere, I forget where) that lets you set commands to run when the battery hits a certain level. From that, you can call the normal hibernate script instead of the internal klaptop stuff.
_________________
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB 7200rpm Maxtor DiamondMax 10, 2x320GB WD 7200rpm Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB
Back to top
View user's profile Send private message
toroidh
n00b
n00b


Joined: 01 Feb 2006
Posts: 9

PostPosted: Tue May 23, 2006 5:24 pm    Post subject: Reply with quote

You are right, I hadn't seen that the helper was using directly the kernel features without calling the hibernate script. However the problem still, I can't run hibernate as I'm not root and making the script itself runnable from an ad-hoc group (suspend for example) wouldn't be a solution: it is runnable by anyone for default:

Code:
-rwxr-xr-x 1 root root 23863 23 mag 12:23 /usr/sbin/hibernate


but its code checks if the invoking user is root, otherwise the process isn't started.

Code:
hibernate: You need to run this script as root.


Where are the configuration files for klaptop_acpi_helper? I cannot find documentation nor config files.

Thank you for the attention.
Back to top
View user's profile Send private message
chrismortimore
l33t
l33t


Joined: 03 Dec 2005
Posts: 721
Location: Edinburgh, UK

PostPosted: Tue May 23, 2006 5:38 pm    Post subject: Reply with quote

Go look up "sudo", it lets you give specific users or groups superuser privilages for specific commands. For example, if you put into /etc/sudoers:
Code:
Defaults env_reset
%wheel ALL=NOPASSWD: /usr/sbin/hibernate ""

Then all members of the group "wheel" will be able to run the hibernate script by using the command "sudo hibernate". This is how I have mine setup.

As for actually configuring it, I think if you go into the Control Centre, then Power Control, then Laptop Battery, there are some tabs that say things like "Low battery warning" and "Low battery critical". In those pages there will be a checkbox with something like "Run command" and a text box you can fill in (put in "sudo hibernate"). That'll tell KDE to hibernate when the alarms are triggered. This might not be completely right, I'm doing it from memory just now.
_________________
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB 7200rpm Maxtor DiamondMax 10, 2x320GB WD 7200rpm Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB
Back to top
View user's profile Send private message
toroidh
n00b
n00b


Joined: 01 Feb 2006
Posts: 9

PostPosted: Wed May 24, 2006 5:48 pm    Post subject: Reply with quote

Thank you! Your advises were so useful!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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