From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jan 23 13:50:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 93E0ECD0 for ; Wed, 23 Jan 2013 13:50:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7540D274 for ; Wed, 23 Jan 2013 13:50:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0NDo0A0043098 for ; Wed, 23 Jan 2013 13:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0NDo0jm043097; Wed, 23 Jan 2013 13:50:00 GMT (envelope-from gnats) Resent-Date: Wed, 23 Jan 2013 13:50:00 GMT Resent-Message-Id: <201301231350.r0NDo0jm043097@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alberto Villa Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1A4EDCBB for ; Wed, 23 Jan 2013 13:48:31 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id DD7AE267 for ; Wed, 23 Jan 2013 13:48:30 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r0NDmUmD067206 for ; Wed, 23 Jan 2013 13:48:30 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r0NDmUb7067201; Wed, 23 Jan 2013 13:48:30 GMT (envelope-from nobody) Message-Id: <201301231348.r0NDmUb7067201@red.freebsd.org> Date: Wed, 23 Jan 2013 13:48:30 GMT From: Alberto Villa To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/175531: [patch] sysutils/upower: correctly detect lid X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2013 13:50:00 -0000 >Number: 175531 >Category: ports >Synopsis: [patch] sysutils/upower: correctly detect lid >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jan 23 13:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Alberto Villa >Release: FreeBSD 10.0-CURRENT amd64 >Organization: >Environment: FreeBSD indiana.smith 10.0-CURRENT FreeBSD 10.0-CURRENT #1: Mon Oct 29 14:02:27 CET 2012 root@indiana.smith:/usr/obj/usr/src/sys/HPDV6 amd64 >Description: UPower sets property LidIsPresent to true only if hw.acpi.lid_switch_state is different from "NONE", being "NONE" the default value for FreeBSD. Thus, the property is always false on default configurations. >How-To-Repeat: If hw.acpi.lid_switch_state is "NONE", `upower -d | grep lid-is-present` will show that the property is disabled. In the KDE Workspaces, this blocks any reaction on lid closing. >Fix: Force UPower not to care about the value of the sysctl, making it check only for its existence. Patch attached with submission follows: Index: Makefile =================================================================== --- Makefile (revision 310864) +++ Makefile (working copy) @@ -8,6 +8,7 @@ PORTNAME= upower PORTVERSION= 0.9.7 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://upower.freedesktop.org/releases/ Index: files/patch-src__freebsd__up-backend.c =================================================================== --- files/patch-src__freebsd__up-backend.c (revision 0) +++ files/patch-src__freebsd__up-backend.c (working copy) @@ -0,0 +1,11 @@ +--- ./src/freebsd/up-backend.c.orig 2010-11-01 12:28:43.000000000 +0100 ++++ ./src/freebsd/up-backend.c 2013-01-23 02:42:21.293236052 +0100 +@@ -227,7 +227,7 @@ + gchar *lid_state; + + lid_state = up_get_string_sysctl (NULL, "hw.acpi.lid_switch_state"); +- if (lid_state && strcmp (lid_state, "NONE")) { ++ if (lid_state) { + up_daemon_set_lid_is_present (backend->priv->daemon, TRUE); + } + g_free (lid_state); >Release-Note: >Audit-Trail: >Unformatted: