FS#5644 - Some fixes for the hibernate script 1.94-2

Attached to Project: Arch Linux
Opened by Giorgio Lando (patroclo7) - Sunday, 22 October 2006, 13:25 GMT
Last edited by Roman Kyrylych (Romashka) - Wednesday, 22 November 2006, 20:49 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To James Rayner (iphitus)
Architecture not specified
Severity Medium
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


There are some problems in the way the hibernate scripts are actually installed and in one of the scriptlets provided. Since all these problems impair partially the functionality of the scripts and can be easily solved, I think that they could be fixed through a little patch and some PKGBUILD modifications.
1) The install.sh script - provided in the package - install, among others, the following two configuration files: disk.conf, ram.conf. They should allow to suspend a system respectively to disk with the non-suspend2 method and to ram. However, both these files rely on two others configuration files, which are included in the sources but are not installed by install.sh. Infact, ram.conf includes "Trymethod ususpend-ram.conf" and "Trymethod sysfs-ram.conf"; disk.conf includes "Try ususpend-disk.conf" and "Try sysfs-disk.conf". As a result, if the user of the arch package tries to suspend to ram or to disk with the vanilla method (ususpend is not provided by arch), the hibernation fails complaining about the absence of these files. Thus, I think that the PKGBUILD should install ususpend-ram.conf, sysfs-ram.conf, ususpend-disk.conf, sysfs.disk.conf.
2) the hibernate-script-arch-1.93.patch actually provided fixes most problems concerning the references to stopping and launching services in rc.d instead of init.d. However, a problem is still there. It is not possible to solve it through the "Distribution arch" parameter, since the problematic file uses only init.d. Thus I think that we should patch the scriptlet itself replacing init.d with rc.d. The file is /usr/share/hibernate scriptlets.d/hardware_tweaks, when it launches the 915resolution service (if the user has "Runi915resolution yes" in his config). Otherwise, during resume, the script complains about the missing file /etc/init.d/915resolution.
3) Finally, the hibernate service provided by the package seems to me labelled in a misleading way. I think it should be called hibernate-cleanup, instead of hibernate: it does not actual hibernate anything, but removes stale images.

You can find attached the package with a modified PKGBUILD and a modified hibernate-script-1.93-arch.pacth (renamed 1.94).

I also find awkward that the configuration files and the scriptlets are installed without reading permissions for group and others, but I respected this policy in my modifications.
This task depends upon

Closed by  Thomas Bächler (brain0)
Saturday, 02 December 2006, 20:36 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed in 1.94-4
Comment by Dawid Wróbel (cromo) - Saturday, 02 December 2006, 19:23 GMT
I second this one, currently I am unable to suspend2ram here on stock -ARCH kernel, having following error:
WARNING: No configuration file found (ususpend-ram.conf).
This script probably won't do anything.
hibernate: Unable to read configuration file ususpend-ram.conf (from TryMethod directive).
WARNING: No configuration file found (sysfs-ram.conf).
This script probably won't do anything.
hibernate: Unable to read configuration file sysfs-ram.conf (from TryMethod directive).