[Pkg-acpi-devel] Bug#558216: acpid: lid.sh fails to turn off display
William Hopkins
we.hopkins at gmail.com
Fri Nov 27 03:40:58 UTC 2009
Subject: acpid: lid.sh fails to turn off display
Package: acpid
Version: 1.0.8-1lenny1
Severity: important
/etc/acpi/lid.sh fails to turn off the display when lid is closed. lid.sh calls /usr/share/acpi-support/screenblank.
ultimately, the command is xset dpms force off. display is determined by environment variable. However, it was failing. I added an strace and determined xset is unable to get permissions to connect to display, failing to access /.Xauthority. I can make it work a number of ways, such as su - -c "(xset dpms force off)" and generating an Xauthority for root, or su $user -c "(xset dpms force off)" as is earlier in the same script for xscreensaver locking.
I am using a Dell Latitude D630 laptop. I run either fluxbox or awesome WMs (fails in both).
I'm attaching my strace.
-- System Information:
Debian Release: 5.0.3
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages acpid depends on:
ii libc6 2.7-18 GNU C Library: Shared libraries
ii lsb-base 3.2-20 Linux Standard Base 3.2 init scrip
ii module-init-tools 3.4-1 tools for managing Linux kernel mo
acpid recommends no packages.
acpid suggests no packages.
-- no debconf information
-------------- next part --------------
execve("/usr/bin/xset", ["xset", "dpms", "force", "off", "-display", ":0"], [/* 20 vars */]) = 0
brk(0) = 0x8d2e000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f01000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=45159, ...}) = 0
mmap2(NULL, 45159, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ef5000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libXmuu.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \v\0\0004\0\0\0\254"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=10428, ...}) = 0
mmap2(NULL, 9168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ef2000
mmap2(0xb7ef4000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7ef4000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libXext.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@*\0\0004\0\0\0\f"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=53788, ...}) = 0
mmap2(NULL, 56956, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ee4000
mmap2(0xb7ef1000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc) = 0xb7ef1000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libX11.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0e\1\0004\0\0\0\234"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=974508, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee3000
mmap2(NULL, 978580, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7df4000
mmap2(0xb7edf000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xea) = 0xb7edf000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libXxf86misc.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\t\0\0004\0\0\0\320"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=8928, ...}) = 0
mmap2(NULL, 11772, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7df1000
mmap2(0xb7df3000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7df3000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260e\1\0004\0\0\0\4"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1413540, ...}) = 0
mmap2(NULL, 1418864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7c96000
mmap2(0xb7deb000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x155) = 0xb7deb000
mmap2(0xb7dee000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7dee000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libXau.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\t\0\0004\0\0\0\20"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=7160, ...}) = 0
mmap2(NULL, 10060, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7c93000
mmap2(0xb7c95000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7c95000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libxcb-xlib.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\6\0\0004\0\0\0\224"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=4220, ...}) = 0
mmap2(NULL, 7108, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7c91000
mmap2(0xb7c92000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xb7c92000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libxcb.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\177\0\0004\0\0\0\340"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=96240, ...}) = 0
mmap2(NULL, 95052, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7c79000
mmap2(0xb7c90000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17) = 0xb7c90000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\n\0\0004\0\0\0H"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9680, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7c78000
mmap2(NULL, 12412, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7c74000
mmap2(0xb7c76000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7c76000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libXdmcp.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\17\0\0004\0\0\0\214"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=16756, ...}) = 0
mmap2(NULL, 19644, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7c6f000
mmap2(0xb7c73000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb7c73000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7c6e000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7c6e6b0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7deb000, 4096, PROT_READ) = 0
munmap(0xb7ef5000, 45159) = 0
brk(0) = 0x8d2e000
brk(0x8d4f000) = 0x8d4f000
socket(PF_FILE, SOCK_STREAM, 0) = 3
connect(3, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"...}, 110) = 0
getpeername(3, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"...}, [20]) = 0
uname({sys="Linux", node="slimer", ...}) = 0
access("/.Xauthority", R_OK) = -1 ENOENT (No such file or directory)
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
select(4, [3], [3], NULL, NULL) = 1 (out [3])
writev(3, [{"l\0\v\0\0\0\0\0\0\0"..., 10}, {"\0\0"..., 2}], 2) = 12
read(3, "\0\26\v\0\0\0\6\0"..., 8) = 8
read(3, "No protocol specified\n\t\10"..., 24) = 24
write(2, "No protocol specified\n"..., 22) = -1 EBADF (Bad file descriptor)
close(3) = 0
write(2, "xset: unable to open display \":0"..., 35) = -1 EBADF (Bad file descriptor)
exit_group(1) = ?
More information about the Pkg-acpi-devel
mailing list