Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99446 - sys-power/acpi-support-0.50 (New Package)
Summary: sys-power/acpi-support-0.50 (New Package)
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://packages.ubuntu.com/cgi-bin/se...
Whiteboard: sunrise-removal
Keywords: EBUILD, InOverlay
: 105389 (view as bug list)
Depends on: 223745
Blocks:
  Show dependency tree
 
Reported: 2005-07-18 10:18 UTC by Andrey Kislyuk (RETIRED)
Modified: 2016-06-08 16:46 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
acpi-support-0.85.ebuild (acpi-support-0.85.ebuild,1.13 KB, text/plain)
2006-06-21 17:43 UTC, Andrey Kislyuk (RETIRED)
Details
acpi-support-0.85.ebuild (acpi-support-0.85.ebuild,1.16 KB, text/plain)
2006-06-29 14:32 UTC, Andrey Kislyuk (RETIRED)
Details
acpi-support-0.91.ebuild (acpi-support-0.91.ebuild,2.63 KB, text/plain)
2007-02-28 14:53 UTC, Andrey Kislyuk (RETIRED)
Details
acpi-support-0.91-gentoo.patch (acpi-support-0.91-gentoo.patch,3.36 KB, patch)
2007-02-28 14:55 UTC, Andrey Kislyuk (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kislyuk (RETIRED) gentoo-dev 2005-07-18 10:18:59 UTC
The acpid ebuild does not populate /etc/acpi or /etc/acpi/events with any action
triggers or scripts. On x86/amd64, I believe it should include at least actions
for the power and sleep buttons, as well as variables in /etc/conf.d to
determine what to do on these keypresses (e.g. shutdown or hibernate on power
button).

There should also be separate packages with acpid scripts for various
non-standard acpi events like those sent by laptop keyboard Fn keypresses.

Forcing the user to look for and manually install the necessary acpid scripts
just to get acpi button functionality is unacceptable in my opinion.
Comment 1 Henrik Brix Andersen 2005-07-18 10:42:19 UTC
sys-power/acpid _does_ install a default handler for the power button. The other
ACPI events are specific to the machine in question, which is also why acpid
itself doesn't include such scripts.

The Gentoo ebuild includes a basic skeleton which users can populate with the
behaviour of their choice.
Comment 2 Andrey Kislyuk (RETIRED) gentoo-dev 2005-07-18 11:07:18 UTC
The acpi sleep button and the lid button are standard, as far as I know:

blackbird events # cat /etc/acpi/events/power
event=button[ /]power
action=/etc/acpi/powerbtn.sh
blackbird events # cat /etc/acpi/events/sleep
event=button[ /]sleep
action=/etc/acpi/suspend.sh 3
blackbird acpi # cat events/lid
event=button[ /]lid
action=/etc/acpi/lid.sh

Even if some systems fire different ACPI events on these buttons, it doesn't
hurt to include handlers for these. The handlers need not be active by default,
but they should be there: a novice user has no idea that they need to populate
/etc/acpi with scripts of their own for these events to work. The scripts could
be shipped as a separate package, but they need to be available.

acpid does include the power button action; sorry, I was wrong about that.
Comment 3 SpanKY gentoo-dev 2005-09-09 13:37:57 UTC
why not grab the scripts here:
http://packages.ubuntu.com/hoary/admin/acpi-support

and install them into the docdir ?
Comment 4 Henrik Brix Andersen 2005-09-13 00:45:36 UTC
Good idea. I'll take a closer look at those soon.
Comment 5 SpanKY gentoo-dev 2005-09-13 08:45:21 UTC
*** Bug 105389 has been marked as a duplicate of this bug. ***
Comment 6 Andrey Kislyuk (RETIRED) gentoo-dev 2006-03-02 04:24:24 UTC
Can we please see some progress on this?
Comment 7 Henrik Brix Andersen 2006-03-02 04:43:21 UTC
(In reply to comment #6)
> Can we please see some progress on this?

Sure. Feel free to attach a working ebuild for the acpi-support package which integrates it into the existing gentoo power management framework.
Comment 8 Andrey Kislyuk (RETIRED) gentoo-dev 2006-06-21 17:43:04 UTC
Created attachment 89769 [details]
acpi-support-0.85.ebuild

This still needs a lot of work, but I'm interested in comments.

Sleep and hibernate functions are implemented through hibernate-script.
There are vendor-specific dependencies, I haven't gone through them all yet.

I'd like to implement/finish up a few features to make this more comprehensive:
-a service script to set power policy on components when starting
-cpufreq management
-NIC, wireless, display, hdd power management policy
-better integration with hibernate-script
Comment 9 Henrik Brix Andersen 2006-06-22 02:09:20 UTC
(In reply to comment #8)
> This still needs a lot of work, but I'm interested in comments.

Cool, thank you for working on this. I'll try to find time to review it and comment on it after my exams last week. It would be nice if we could finally get this into shape and added to portage. :)

Comment 10 Andrey Kislyuk (RETIRED) gentoo-dev 2006-06-23 12:04:46 UTC
Currently there's a bug in the package that prevents acpid from receiving an event when acpi_fakekey presses a button (e.g. `acpi_fakekey 142` should press the sleep button). The button keypress is sent to /dev/input/eventX, but acpid doesn't receive it (it should receive an event through /proc/acpi/event).
Comment 11 Andrey Kislyuk (RETIRED) gentoo-dev 2006-06-23 13:12:02 UTC
... never mind, this seems to be a problem with my machine.
Comment 12 Andrey Kislyuk (RETIRED) gentoo-dev 2006-06-28 11:40:31 UTC
On further examination this is not a problem with my machine but a known regression in acpi_fakekey. I'll have to find a way to fix it before we can go on with this package.
Comment 13 Andrey Kislyuk (RETIRED) gentoo-dev 2006-06-29 14:32:31 UTC
Created attachment 90474 [details]
acpi-support-0.85.ebuild

OK, I have disabled acpi_fakekey for the ACPI buttons and am calling the scripts directly instead for those. I've worked a bit on the package, please test it and let me know if you see anyting wrong with the scripts or the organization.

Also a tiny update to the ebuild (added a doc install)
Comment 14 Andrey Kislyuk (RETIRED) gentoo-dev 2006-06-30 12:52:03 UTC
The latest ebuild version is at

http://horizon.ath.cx/packages/acpi-support-0.85.ebuild

Also I'm not sure how to proceed with the version number. This package was spun off ubuntu's acpi-support, but I've heavily modified it, so I'm not sure what numbering scheme to apply or whether to rename the package to avoid confusion.
Comment 15 Vince C. 2006-11-20 12:35:11 UTC
(In reply to comment #14)
> The latest ebuild version is at
> 
> http://horizon.ath.cx/packages/acpi-support-0.85.ebuild
> 
> Also I'm not sure how to proceed with the version number. This package was spun
> off ubuntu's acpi-support, but I've heavily modified it, so I'm not sure what
> numbering scheme to apply or whether to rename the package to avoid confusion.
> 

Why not create a brand new package like, say, acpi-scripts-0.0.1 or acpi-scripts-gentoo-0.0.1 or something?
Comment 16 Ryan Neufeld 2006-11-22 14:28:41 UTC
I get the following error when starting the init script provided:

cat: /var/lib/acpi-support/system-manufacturer: No such file or directory
cat: /var/lib/acpi-support/system-product-name: No such file or directory
cat: /var/lib/acpi-support/system-version: No such file or directory
cat: /var/lib/acpi-support/bios-version: No such file or directory
Comment 17 Kenneth Perry 2007-01-14 18:46:38 UTC
compiled and works fine on amd64.

emerge --info
Portage 2.1.2_rc4-r9 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19-suspend2-r1 x86_64)
=================================================================
System uname: 2.6.19-suspend2-r1 x86_64 AMD Turion(tm) 64 Mobile Technology MT-37
Gentoo Base System version 1.12.8
Timestamp of tree: Sat, 13 Jan 2007 13:50:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.31-r1
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.19
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -msse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo http://distro.ibiblio.org/pub/linux/distributions/gentoo ftp://ftp.gtlib.gatech.edu/pub/gentoo http://www.gtlib.gatech.edu/pub/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/"
LANG="en_US.UTF-8"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac accessibility acl acpi ada addbookmarks aiglx alias alsa amd64 amr arts audiofile autoreplace avahi bash-completion berkdb bitmap-fonts bittorrent bluetooth bzip2 cairo calendar cjk clearcase cli connectionstatus contactnotes cpudetection cracklib crypt cscope css cups curl cvs dbus dhcp dlloader dmi doc dri dv dvd dvdr dvdread eap-tls emacs encode examples exif fam fame fbsplash ffmpeg finger flac fortran ftp gadu gcc64 gcj gd gdbm gif glep gnomecanvas gnutls gpm graphviz groupwise gs gstreamer gtk hal haskell highlight history iconv idn ieee1394 imagemagick imap imlib intl ipv6 irc irda irmc isdnlog jabber jack java javamail javascript jingle jpeg jpeg2k kde kipi kqemu lame latex libcaca libg++ lirc lm_sensors log4j lua lucene lzo mad mbrola md5sum mikmod mjpeg mng modplug mono mp3 mp4 mpeg musepack musicbrainz ncurses netjack network nfs nls nowlistening nptl nptlonly nvidia objc objc++ objc-gc offensive ogg openal openexr opengl oss pager pam pascal patch pcmcia pcre pdf perforce perl php pmu png posix ppds pppd python qt3 qt3support qt4 quicktime radius readline reflection rhino rle ruby samba sametime sdl seamonkey session slp sndfile sockets spell spl sql sqlite ssl statistics subversion svg tcl tcpd texteffect theora threads tiff timidity tk translator truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vcd vim vim-pager vim-with-x visualization vorbis vorbis-psy webpresence wifi winpopup wmf xcb xinerama xml xorg xpm xv xvid yahoo yv12 zeroconf zip zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard synaptics mouse evdev" KERNEL="linux" LINGUAS="en" LIRC_DEVICES="sir" USERLAND="GNU" VIDEO_CARDS="vga nv nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 18 Kenneth Perry 2007-01-14 18:48:43 UTC
oops, other then the init script problem mentioned in comment #16.
Comment 19 Kenneth Perry 2007-01-14 19:11:04 UTC
To fix the init script : i just did

mkdir /var/log/acpi-support/
touch /var/log/acpi-support/bios-version
touch /var/log/acpi-support/system-manufacturer
touch /var/log/acpi-support/system-product-name
touch /var/log/acpi-support/system-version

Probably the ebuild should be updated to create these.
Comment 20 Andrey Kislyuk (RETIRED) gentoo-dev 2007-02-28 14:53:50 UTC
Created attachment 111555 [details]
acpi-support-0.91.ebuild

New ebuild: now uses ubuntu's original tarball and patches it. Please test.
Comment 21 Andrey Kislyuk (RETIRED) gentoo-dev 2007-02-28 14:55:19 UTC
Created attachment 111557 [details, diff]
acpi-support-0.91-gentoo.patch

Patch for 0.91 (goes into $overlay/sys-power/acpi-support/files)
Comment 22 Andrey Kislyuk (RETIRED) gentoo-dev 2007-02-28 15:11:44 UTC
The latest ebuilds will now be found at:

http://www.gentoo-sunrise.org/sunrise/browser/sunrise/sys-power/acpi-support
Comment 23 Kenneth Perry 2007-03-02 16:04:44 UTC
acpi-support 0.91 w/patch worked fine here on amd64.
Comment 24 Andrey Kislyuk (RETIRED) gentoo-dev 2007-04-13 00:38:25 UTC
Revision bump to 0.95 (I'm guessing this will ship with feisty), some more integration, new link (sunrise has moved):

http://overlays.gentoo.org/proj/sunrise/browser/sunrise/sys-power/acpi-support
Comment 25 Kenneth Perry 2008-02-04 04:27:50 UTC
The current acpi-support package has a minor bug where acpi-fakekey sends its events to the wrong device (in my case, it sent it to the power button) : a patch can be found at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=433771 , which fixed the problem for me.
Comment 26 Santiago M. Mola (RETIRED) gentoo-dev 2008-04-20 17:22:00 UTC
Andrey, are you trying to push your patches to upstream?
Comment 27 Andrey Kislyuk (RETIRED) gentoo-dev 2008-04-22 16:33:29 UTC
(In reply to comment #26)
> Andrey, are you trying to push your patches to upstream?
> 

I'm not so far, because my changes are very minor and Gentoo-centric. I'll generalize them and break out a patch to send upstream in a few days, along with making an ebuild for 0.109 which is the latest version that will probably ship with Hardy.

I'm taking this bug since I'm now (almost) a dev and have been de facto maintaining this in Sunrise for two years and no one else has expressed interest.
Comment 28 Santiago M. Mola (RETIRED) gentoo-dev 2008-04-22 16:37:06 UTC
By the way, I've done a bit of research about this and it seems that Fedora and others uses a hal-based solution which Ubuntu and Debian are adopting and trying to deprecate acpi-support.
Comment 29 Andrey Kislyuk (RETIRED) gentoo-dev 2008-04-22 16:40:17 UTC
(In reply to comment #28)
> By the way, I've done a bit of research about this and it seems that Fedora and
> others uses a hal-based solution which Ubuntu and Debian are adopting and
> trying to deprecate acpi-support.
> 

Ah, thanks. I'll have to track down that hal-based package and turn my attention to porting that to Gentoo.
Comment 30 Andrey Kislyuk (RETIRED) gentoo-dev 2008-09-02 17:52:16 UTC
For further reference:

https://wiki.ubuntu.com/PMUtilsSpec

The function of acpi-support is nebulous in ubuntu. The suspend/hibernate functionality is now being handled by the cross-platform pm-utils package which acpi-support needs to depend on. The handlers for vendor-specific acpi events are still provided by acpi-support but it seems that the plan is to provide hal/udev rules for all of them.
Comment 31 Jory A. Pratt gentoo-dev 2009-02-06 02:19:53 UTC
(In reply to comment #29)
> (In reply to comment #28)
> > By the way, I've done a bit of research about this and it seems that Fedora and
> > others uses a hal-based solution which Ubuntu and Debian are adopting and
> > trying to deprecate acpi-support.
> > 
> 
> Ah, thanks. I'll have to track down that hal-based package and turn my
> attention to porting that to Gentoo.
> 

There is nothing to track down really. They are porting the drivers to use the generic input devices  from kernel to userspace. A great example of such is for asus-laptop module which is gonna be done up in 2.6.29 hopefully, patches are already avaliable and can be applied against 2.6.28 for testing.

http://patchwork.kernel.org/patch/3305/
http://patchwork.kernel.org/patch/3043/

Comment 32 Jory A. Pratt gentoo-dev 2009-02-06 02:21:22 UTC
(In reply to comment #30)
> For further reference:
> 
> https://wiki.ubuntu.com/PMUtilsSpec
> 
> The function of acpi-support is nebulous in ubuntu. The suspend/hibernate
> functionality is now being handled by the cross-platform pm-utils package which
> acpi-support needs to depend on. The handlers for vendor-specific acpi events
> are still provided by acpi-support but it seems that the plan is to provide
> hal/udev rules for all of them.
> 

With the new generic input layer being used hal will get all its info from the kernel on how to configure the keyboard for X use. No need to create any custom rules.
Comment 33 Vince C. 2015-12-21 11:57:24 UTC
Suggestion: close this bug - OBSOLETE or something.
Comment 34 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-08 16:46:46 UTC
Hello, everyone.

It seems that at least one ebuild related to this bug exists in the Sunrise overlay at the moment. However, I have to regretfully announce that after a long inactivity period the Sunrise project has been discontinued and the related overlay will be eventually removed. For this reason, I'd like to ask you to reevaluate the ebuilds and consider moving them. If you'd like to maintain a package from Sunrise in Gentoo, please take a look at our Proxy Maintainers [1] project.

Please make sure to take ebuilds from the unreviewed developer Sunrise repository [2] rather than the -reviewed one, since the latter has not been updated for over a year. While at it, please note that:

1. Adding a package to Gentoo requires declaring yourself as an active maintainer for it. All bugs regarding the package will be assigned to you, and you will be expected to maintain it.

2. Some packages may not be suitable for addition anymore. While there's no strong rules that would prevent you from adding a package, it may be a bad idea to add old-unmaintained packages that will shortly result in a large number of bugs reported with no solution. If that is the case, please close the bug as RESOLVED/OBSOLETE to make it easier to find packages worth adding.

3. Some of the bugs were already closed as WONTFIX/OBSOLETE/... while the relevant ebuild was kept in Sunrise. If you disagree with the original decision, you still can add the ebuild via proxy-maint.

4. Pleaes note that many of the Sunrise ebuilds are old and may be buggy. If you decide to move them, please make sure to update/clean them up. The proxy-maint team will also review your ebuilds, therefore making sure they land in Gentoo in good quality.

Once again, thank you for your contribution. We hope that you will still want to contribute to Gentoo, through proxy-maint or otherwise.


[1]:https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
[2]:https://gitweb.gentoo.org/proj/sunrise.git/