[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2015-10-30 Thread Graeme Hewson
I've given up on hdparm.conf now. As noted in #27, it seems that systemd
and udev/udisks2 is the way to go, but it's not clear how exactly.

Here's what I've done. This bug report isn't the ideal place to document
it, but I can't find a better place for now. Maybe it'll help someone
who finds it through a search engine.

The Ubuntu Disks utility (not in the Launcher by default) allows
configuration of the spindown/standby time and other settings. (See
below for Kubuntu.) Click on the disk in the left-hand pane, then click
the "hamburger" icon at the top right and select Drive Settings.

Great! Except... what it says in the title of this bug. Also:
https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/1511703

I fixed this by coding a sleep script as shown in
https://wiki.archlinux.org/index.php/Power_management#Hooks_in_.2Fusr.2Flib.2Fsystemd.2Fsystem-sleep
Note the directory in Ubuntu is /lib/systemd/system-sleep/, which is different 
from Arch Linux.

In the "post/*" case I simply coded the required hdparm command
directly, e.g.

hdparm -B 254 -S 120 /dev/sdb

I'd earlier tried to make hdparm.conf work by emulating the pmutils
scripts by coding, e.g.,

DEVNAME=/dev/sdb /lib/udev/hdparm

but that didn't work for some reason. I don't think I worked out why.

Kubuntu users (like me) and others who don't have the Ubuntu Disks
utility available need to write a config file (which, of course, is what
hdparm.conf is) to set the post-boot spindown time, etc. See udisks(8)
for the format of the file /etc/udisks2/IDENTIFIER.conf, the file which
the Disks utility writes. For instance:

[ATA]
APMLevel=254
StandbyTimeout=120

What is IDENTIFIER? Run "udisksctl dump" (the output is piped to less) and look 
for an object path starting "/org/freedesktop/UDisks2/drives/" with your drive 
model and serial number. Within the org.freedesktop.UDisks2.Drive interface 
underneath that, the Id property is the required IDENTIFIER part of the 
filename. See
http://udisks.freedesktop.org/docs/latest/gdbus-org.freedesktop.UDisks2.Drive.html#gdbus-property-org-freedesktop-UDisks2-Drive.Id

So it seems that in 2015, it's a bit more complicated than writing
/etc/hdparm.conf. It seems (unless there's currently a better way) it's
necessary to specify the hdparm settings for the post-boot and post-
resume conditions in two different ways.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2015-10-30 Thread Graeme Hewson
I've given up on hdparm.conf now. As noted in #27, it seems that systemd
and udev/udisks2 is the way to go, but it's not clear how exactly.

Here's what I've done. This bug report isn't the ideal place to document
it, but I can't find a better place for now. Maybe it'll help someone
who finds it through a search engine.

The Ubuntu Disks utility (not in the Launcher by default) allows
configuration of the spindown/standby time and other settings. (See
below for Kubuntu.) Click on the disk in the left-hand pane, then click
the "hamburger" icon at the top right and select Drive Settings.

Great! Except... what it says in the title of this bug. Also:
https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/1511703

I fixed this by coding a sleep script as shown in
https://wiki.archlinux.org/index.php/Power_management#Hooks_in_.2Fusr.2Flib.2Fsystemd.2Fsystem-sleep
Note the directory in Ubuntu is /lib/systemd/system-sleep/, which is different 
from Arch Linux.

In the "post/*" case I simply coded the required hdparm command
directly, e.g.

hdparm -B 254 -S 120 /dev/sdb

I'd earlier tried to make hdparm.conf work by emulating the pmutils
scripts by coding, e.g.,

DEVNAME=/dev/sdb /lib/udev/hdparm

but that didn't work for some reason. I don't think I worked out why.

Kubuntu users (like me) and others who don't have the Ubuntu Disks
utility available need to write a config file (which, of course, is what
hdparm.conf is) to set the post-boot spindown time, etc. See udisks(8)
for the format of the file /etc/udisks2/IDENTIFIER.conf, the file which
the Disks utility writes. For instance:

[ATA]
APMLevel=254
StandbyTimeout=120

What is IDENTIFIER? Run "udisksctl dump" (the output is piped to less) and look 
for an object path starting "/org/freedesktop/UDisks2/drives/" with your drive 
model and serial number. Within the org.freedesktop.UDisks2.Drive interface 
underneath that, the Id property is the required IDENTIFIER part of the 
filename. See
http://udisks.freedesktop.org/docs/latest/gdbus-org.freedesktop.UDisks2.Drive.html#gdbus-property-org-freedesktop-UDisks2-Drive.Id

So it seems that in 2015, it's a bit more complicated than writing
/etc/hdparm.conf. It seems (unless there's currently a better way) it's
necessary to specify the hdparm settings for the post-boot and post-
resume conditions in two different ways.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to pm-utils in Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2015-10-12 Thread Graeme Hewson
I'm experiencing this in 15.04. With the change to systemd, the pm-utils
scripts are no longer run when the system resumes after suspend.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2015-10-12 Thread Graeme Hewson
I'm experiencing this in 15.04. With the change to systemd, the pm-utils
scripts are no longer run when the system resumes after suspend.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to pm-utils in Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2015-10-12 Thread Torsten Krah
"Nice" thread about systemd + hdparm:

http://lists.freedesktop.org/archives/systemd-
devel/2012-June/005595.html

So it seems users should write their own udev rules to get this working
:-| or some custom distro specific stuff. Its really weird that this one
is still around after that many years which have passed now.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to pm-utils in Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2015-10-12 Thread Torsten Krah
"Nice" thread about systemd + hdparm:

http://lists.freedesktop.org/archives/systemd-
devel/2012-June/005595.html

So it seems users should write their own udev rules to get this working
:-| or some custom distro specific stuff. Its really weird that this one
is still around after that many years which have passed now.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2015-10-12 Thread Graeme Hewson
Also:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725284
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779412

** Bug watch added: Debian Bug tracker #725284
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725284

** Bug watch added: Debian Bug tracker #779412
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779412

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2015-10-12 Thread Graeme Hewson
Also:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725284
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779412

** Bug watch added: Debian Bug tracker #725284
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725284

** Bug watch added: Debian Bug tracker #779412
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779412

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to pm-utils in Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2013-04-17 Thread Rafał Ochmański
I'm affected by this bug. After suspend APM_level is reset to 254

# hdparm -B /dev/sda
/dev/sda:
 APM_level  = 254

Settings in /etc/hdparm.conf are ignored

command_line {
hdparm -S 12 -B 48 /dev/sda
}

Even a workaround with /etc/pm/sleep.d/20_resume

#!/bin/sh
case ${1} in
 resume|thaw)
  killall ssh
  hdparm -S 12 -B 48 /dev/sda
  ;;
esac

somehow doesn't work. I need to manually run hdparm after every suspend.

** Changed in: hdparm (Ubuntu)
   Status: Incomplete = Confirmed

** Changed in: pm-utils (Ubuntu)
   Status: Expired = Confirmed

** Tags added: quantal

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2013-04-17 Thread Rafał Ochmański
Oh, this is Quantal

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 12.10
Release:12.10
Codename:   quantal

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2012-12-23 Thread Launchpad Bug Tracker
[Expired for pm-utils (Ubuntu) because there has been no activity for 60
days.]

** Changed in: pm-utils (Ubuntu)
   Status: Incomplete = Expired

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2012-10-24 Thread Steve Langasek
So I'm not sure why people are still seeing a bug here.  The /usr/lib
/pm-utils/sleep.d/95hdparm-apm script does this:

thaw|resume)
resume_hdparm_apm
# only set the -S option on resuming, not necessary for power.d
resume_hdparm_spindown
;;

So it explicitly sets the -B and -S options on resume, which are the
exact options that users are reporting problems with.  I think someone
who's seeing this problem needs to diagnose what's going wrong with that
script.  Does it work if you run it by hand?

** Changed in: hdparm (Ubuntu)
   Status: Triaged = Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2012-09-30 Thread Bazon
I have an at least similar issue on 12.10 quantal with spindown:
 I want to spin down my external USB drive /dev/sdc as fast as possible:
in /etc/hdparm.conf:

/dev/sdc {
spindown_time = 1
}

that works, although I get

$ sudo hdparm -C /dev/sdc
/dev/sdc:
SG_IO: bad/missing sense data, sb[]:  f0 00 01 00 50 40 00 0a 00 00 00 00 00 1d 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 drive state is:  unknown

but after resume from suspend, it doesn't work anymore.

my workaround is
/etc/pm/sleep.d/20-hdparm

#!/bin/bash
case $1 in
thaw|resume)
hdparm -S 1 /dev/sdc
;;

esac

and that works, anyway, spindown settings shouldn't get lost on
suspend/resume in the first place.


So what is most reasonable? 
 * Deal with that issue in this bug?
 * Reopen bug https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/738757 
which is closer to the problem I got?
 * Open a new bug?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2012-02-23 Thread Torsten Krah
Yes this one is still happening on my fresh updated lucid. Custom hdparm 
options are still lost after resume and i still need to have a custom script to 
execute in resume process.
Would be nice to see this fixed and hdparm.conf evaluated at resume time.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2011-11-07 Thread Bryce Harrington
I'm unmarking the patch as a patch since I gather it's long since been
integrated into hdparm, to get this off the patches-to-sponsor list.
We'll need a new patch for the remaining issue with pm-utils before it
can be considered for sponsoring.

Also, it's been a couple years since the last comment; is this issue
still reproducing against current Ubuntu?

** Changed in: pm-utils (Ubuntu)
   Status: Triaged = Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/199094

Title:
  hdparm.conf settings (other than apm) are lost on suspend/resume?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/199094/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 199094] Re: hdparm.conf settings (other than apm) are lost on suspend/resume?

2009-11-04 Thread Torsten Krah
At least its still missing other aspects.
I need -S0 to my drive - this is lost after suspend / resume cycle too.
I modified 95hdparm-apm to get this working again, but why not use the values i 
did specified at /etc/hdparm.conf?

-- 
hdparm.conf settings (other than apm) are lost on suspend/resume?
https://bugs.launchpad.net/bugs/199094
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs