[Pkg-acpi-devel] Bug#686391: acpi-support: screen doesn't lock on resume from suspend

John Eikenberry jae at zhar.net
Fri Aug 31 21:36:08 UTC 2012


Package: acpi-support
Version: 0.140-5
Severity: normal


I have LOCK_SCREEN=true in /etc/default/acpi-support and noticed a while back
that it stopped working. Finally got around to debugging it.

In the script /usr/share/acpi-support/screenblank it loops over the contents of
/tmp/.X11-unix using these to check for displays. In the script it sets the
variable displaynum to the numberic suffix of the X contents of that directory.
On my system it contains 1 file 'X0', so displaynum gets set to '0'.

In getXuser from /usr/share/acpi-support/power-funcs it sets a local variable
display to ":$displaynum" or ":0" in my case.

getXuser gets the uid of the running user via parsing the output of
ck-list-sessions with an awk script. That awk script does an exact match
against the x11-display setting output of ch-list-sessions, which is ':0.0'.
So it compares ':0' against ':0.0' and fails.

So it never gets the uid and thus fails to set XUSER which means the call to
xtrlock (the lock program I use) fails as it doesn't run it as the user.

The fix could be handled in variable places. I'd probably tweak the awk script
to be more generous in what displays it matches. But you'll be a better judge
of what would be best.

Thanks.


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages acpi-support depends on:
ii  acpi-fakekey       0.140-5
ii  acpi-support-base  0.140-5
ii  acpid              1:2.0.16-1
ii  lsb-base           4.1+Debian7
ii  pm-utils           1.4.1-9
ii  x11-xserver-utils  7.7~3

Versions of packages acpi-support recommends:
ii  dbus                              1.6.0-1
pn  radeontool                        <none>
ii  vbetool                           1.1-2
pn  xscreensaver | gnome-screensaver  <none>

Versions of packages acpi-support suggests:
ii  rfkill  0.4-1
ii  xinput  1.6.0-1

-- no debconf information



More information about the Pkg-acpi-devel mailing list