pm-utils does not write pm-suspend.log file

Bug #1577738 reported by Francis Lamonde
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
pm-utils (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Hello,

I hope I'm filing this information the proper way and I thank you for reading it.

1) Kubuntu 16.04
2) pm-utils 1.4.1-16

3) As far as the info I could find, the package "pm-utils" is supposed to write log files in /var/log, such as "pm-suspend.log". These log files, as you know, help troubleshoot hibernate/resume issues.

I happen to have one issue with hooks that don't run on resume, that do run prior to hibernate when I run them manually and don't after resume when I run them the same manual way. (different issue than this bug report)

4) Therefore I need to scan through pm-suspeng.log file, but the file is not created on my machine, anywhere on the HDD.

I have added my user to the "systemd-journal", "root" and "sudo" groups, in case that could help, I still don't see the log file.

With previous Kubuntu versions (13.10 and others before, didn't try between 13.10 and 16.04), this log file was created right away.

After searching and trying things out, I'm leaning towards the possibility of a bug, which is the reason why I am posting here.

I do not know what other information to provide.

Thank you

Tags: pm-utils
Revision history for this message
Txema (pobmelat) wrote :

Same problem here.

Revision history for this message
Francis Lamonde (frankebay99) wrote :

I'm glad not to be the only one.

When I use 13.10 my resume script is the following:

===
#!/bin/sh
export DISPLAY=:0
case "${1}" in
        hibernate|suspend)
  su -c - frank /home/frank/scripts/00_suspend.sh &
  ;;
 thaw|resume)
  service fancontrol restart &
  su -c - frank /home/frank/scripts/01_resume.sh &
  ;;
esac
===

The script is located in "/etc/pm/sleep.d", under root and is executable for everyone.
The user script hooked in by the root script above when suspending does the following:

===
ps axf | grep cairo-dock | grep -v grep | awk '{print "kill -9 " $1}' | sh
===

The script for resume is:

===
nohup gkrellm > /dev/null 2>&1 &
sleep 2
nohup cat /home/frank/scripts/cairo-dock_macro | xmacroplay -d 100 :0 > /dev/null 2>&1 &
===

My user is part of the following groups:

"frank adm cdrom sudo dip plugdev lpadmin sambashare vboxusers"

Trying to replicate that under 16.04 doesn't work, nothing is run. And I don't know why cuz I can't read the pm-suspend log files.

However I found out that all of these commands but one are no longer required with 16.04 (tnx to the developers). The only one remaining is to restart FANCONTROL, which is obviously very important. But I can't read the log files so I don't know why my command is not run.

I tried many many other ways to run my command but none worked.

I'd really like to understand why, I need the PM log files for that, unless someone is a guru about PM hooks.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pm-utils (Ubuntu):
status: New → Confirmed
Revision history for this message
HHS (hallihalloschatz) wrote :

Ubuntu 16.06 LTS with todays updates from stable repositories.

Same problem here, but when I use "pm-suspend" all working fine.
Logfiles are created and hook scripts working fine.

Only the automatic unity mode with settings over the gnome-system-tools GUI system settings -> "Leistung" set with suspend after xx minutes are not working.
The system go in suspend mode without creating logfiles and without execute the /etc/pm/sleep.d/scripts.

They use other functions in the background?

Revision history for this message
HHS (hallihalloschatz) wrote :

Is that the same problem, because ubuntu switch to systemd?

What is the correct folder for the scripts? /lib/systemd/system-sleep?

Revision history for this message
Martin Dünkelmann (nc-duenkekl3-deactivatedaccount) wrote :

Using
Linux Mint 18.0 x64 Mate
with
pm-utils 1.4.1-16

Same problem here.
Problem could be the result of switching to systemd.
Sometimes my Acer Laptop only wants to go into the hibernate after the 4. try....
(Yes, i'm clicking the hibernate button or using the "systemctl hibernate" command 4 times in a row...

Revision history for this message
Martin Dünkelmann (nc-duenkekl3-deactivatedaccount) wrote :

Using Linux Mint 18.0 x64 Mate
Same Problem.
Could be happen because of the switch to systemd.
Since the switch, i need to activate hibernate 4 times in a row to succesful hibernate.....

Revision history for this message
Francis Lamonde (frankebay99) wrote :

I am using "pm-suspend" already. Over a dbus command:

(dbus-send --print-reply --dest='org.freedesktop.PowerManagement' /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Suspend)

If I try to use "pm-suspend" from the command line by just typing "sudo pm-suspend", nothing happens, no error message either. The dbus command works but like I said no log files are created and no user scripts seem to be run.

My "/etc/pm/config.d" file has nothing special in it apart suspending my "via-rhine" module. With or without the suspend module I get the same no log files issue.

Is there another way/command to activate suspend?
I have tried the scripts in folder "/etc/pm/sleep.d" and the default kubuntu "/etc/lib/pm-utils/sleep.d" and same problem.

Revision history for this message
Francis Lamonde (frankebay99) wrote :

Sorry, in the last few words, not "/etc/lib/pm-utils/sleep.d" but "/usr/lib/pm-utils/sleep.d".

Kevin (scimitar)
Changed in pm-utils (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Francis Lamonde (frankebay99) wrote :

Hi Kevin,

What is the fix here (allowing to create again the pm-suspend.log file or logging the data in a different file or another type of fix?) and in which release of pm-utils?

On Kubuntu 18.04 I still fail to see any "pm-suspend.log" file created in /var/log.

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

This page says a fix i released, in the form of a new version of the pm-utils package. In *which* version is the fix present, please, anyone?

Revision history for this message
Francis Lamonde (frankebay99) wrote :

Still have that problem using Ubuntu 19.10 with pm-utils 1.4.1-18.

Revision history for this message
Francis Lamonde (frankebay99) wrote :

EDIT: I wonder now how important bugs related to pm-utils are?
Many distros now use systemd, which is the case of Kubuntu, although there still are some pm-utils installed. I upgraded to 19.10 a while back and I now use systemd with no issues and all logs created.

If there is a fix for this bug affecting pm-utils (assuming it's a bug), I won't be part of testing and regression. I have moved to systemd.

Thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.