r?, r what ?depontius wrote:gentoo-sources-2.6.34-r?
+1depontius wrote:I've been reluctant to move to 2.6.35

and system setup as follows:telesto jk # acpitool -w
Device S-state Status Sysfs node
---------------------------------------
1. PCI0 S5 *disabled no-bus:pci0000:00
2. PEX0 S5 *disabled pci:0000:00:1c.0
3. PEX1 S5 *disabled pci:0000:00:1c.1
4. PEX2 S5 *disabled
5. PEX3 S5 *disabled pci:0000:00:1c.3
6. PEX4 S5 *disabled pci:0000:00:1c.4
7. PEX5 S5 *disabled pci:0000:00:1c.5
8. HUB0 S5 *disabled pci:0000:00:1e.0
9. USB0 S3 *enabled pci:0000:00:1d.0
10. USB1 S3 *enabled pci:0000:00:1d.1
11. USB2 S3 *enabled pci:0000:00:1d.2
12. USB3 S3 *enabled pci:0000:00:1a.0
13. USB4 S3 *enabled pci:0000:00:1a.1
14. USB5 S3 *enabled pci:0000:00:1a.2
15. USBE S3 *disabled pci:0000:00:1d.7
16. USE2 S3 *disabled pci:0000:00:1a.7
17. AZAL S5 *disabled pci:0000:00:1b.0
I'd love to get this working as I have a similar motherboard in my lounge room that is a frontend mythbox, and hence, would like to be able to wake the frontend up via my usb remote receiver.Portage 2.1.9.32 (default/linux/amd64/10.0/desktop/kde, gcc-4.4.5, glibc-2.12.2-r0, 2.6.36-gentoo x86_64)
=================================================================
System uname: Linux-2.6.36-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_930_@_2.80GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 18 Jan 2011 02:15:01 +0000
app-shells/bash: 4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python: 2.7.1, 3.1.3
dev-util/cmake: 2.8.3-r1
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc: 0.7.0
sys-apps/sandbox: 2.4
sys-devel/autoconf: 2.13, 2.68
sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils: 2.21
sys-devel/gcc: 4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.4-r1
sys-devel/make: 3.82
virtual/os-headers: 2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -msse4 -mcx16 -mpopcnt -msahf -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=core2 -msse4 -mcx16 -mpopcnt -msahf -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo ftp://ftp.swin.edu.au/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/zugaina /var/lib/layman/vmware /var/lib/layman/iElectric /usr/local/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="64bit X a52 aac acl acpi alsa amd64 apache2 apm bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cleartype cli consolekit corefonts cracklib crypt cue cups cxx dbus dri dts dvd dvdr embedded emboss encode exif extras fam fbcondecor ffmpeg firefox flac fortran gd gdbm gdu gif gnutls gpm hal hddtemp hpcups hpijs hpn iconv ipv6 java jpeg kde lcms ldap libnotify libvisual lm_sensors mad mikmod mmx mng modules mp3 mp4 mpeg msn mudflap multilib mysql mysqli ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam pango pcre pdf perl pmu png policykit ppds pppd python qt3support qt4 rar readline rss scanner sdl semantic-desktop sensord session snmp spell sqlite sse sse2 ssl startup-notification static-libs suid svg sysfs tcpd tiff truetype type1 udev unicode usb vaapi vdpau vorbis x264 xcb xinerama xml xorg xulrunner xv xvid xvmc yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

tells me the usb port and pci slot being used# dmesg|grep -i optical
[ 10.610913] usb 8-1: Product: Microsoft Wheel Mouse Optical®
[ 10.627044] input: Microsoft Microsoft Wheel Mouse Optical® as /devices/pci0000:00/0000:00:1d.2/usb8/8-1/8-1:1.0/input/input3
[ 10.627229] generic-usb 0003:045E:0040.0001: input,hidraw0: USB HID v1.00 Mouse [Microsoft Microsoft Wheel Mouse Optical®] on usb-0000:00:1d.2-1/input0
now enabling the device directly...# cat /sys/devices/pci0000\:00/0000\:00\:1d.2/usb8/8-1/power/wakeup
disabled
now we have# echo enabled > /sys/devices/pci0000\:00/0000\:00\:1d.2/usb8/8-1/power/wakeup
now when i sleep the pc i can wake it up with my usb device...ie the mouse.# cat /sys/devices/pci0000\:00/0000\:00\:1d.2/usb8/8-1/power/wakeup
enabled
Would love to hear from someone using a similar device or had some experience with this stuff....# dmesg|grep -i dvico
[ 3.243469] usb 3-1: Product: DVICO USB HID Remocon V1.00
[ 3.243470] usb 3-1: Manufacturer: DVICO
[ 5.249875] generic-usb 0003:0FE9:9010.0001: hiddev0,hidraw0: USB HID v1.10 Device [DVICO DVICO USB HID Remocon V1.00] on usb-0000:00:1a.0-1/input0
Code: Select all
$for i in `find /sys/devices/pci* -name wakeup | grep usb`; do if [ -n "$(cat $i)" ]; then echo -n "$i - "; echo -n "$(cat $(dirname `dirname $i`)/product | tr -d "\n"): "; cat $i; fi; doneCode: Select all
/sys/devices/pci0000:00/0000:00:1d.0/usb2/power/wakeup - UHCI Host Controller: enabled
/sys/devices/pci0000:00/0000:00:1d.1/usb3/power/wakeup - UHCI Host Controller: enabled
/sys/devices/pci0000:00/0000:00:1d.2/usb4/power/wakeup - UHCI Host Controller: enabled
/sys/devices/pci0000:00/0000:00:1d.2/usb4/4-2/power/wakeup - eHome Infrared Transceiver: disabled
/sys/devices/pci0000:00/0000:00:1d.3/usb5/power/wakeup - UHCI Host Controller: enabled
/sys/devices/pci0000:00/0000:00:1d.7/usb1/power/wakeup - EHCI Host Controller: enabled
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4/power/wakeup - cat: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4/product: No such file or directory
: disabled
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.4/power/wakeup - 2.4G USB RF KeyBoard: enabled
Code: Select all
Device S-state Status Sysfs node
PCI0 S5 *disabled no-bus:pci0000:00
PEX0 S5 *disabled
PEX1 S5 *disabled
PEX2 S5 *disabled
PEX3 S5 *disabled
HUB0 S5 *disabled pci:0000:00:1e.0
UAR1 S5 *disabled pnp:00:07
UAR2 S5 *disabled pnp:00:08
USB0 S3 *disabled pci:0000:00:1d.0
USB1 S3 *disabled pci:0000:00:1d.1
USB2 S3 *disabled pci:0000:00:1d.2
USB3 S3 *disabled pci:0000:00:1d.3
USBE S3 *disabled pci:0000:00:1d.7
AC97 S5 *disabled
AZAL S5 *disabled pci:0000:00:1b.0
Code: Select all
$ echo "enabled" > /sys/devices/pci0000:00/0000:00:1d.2/usb4/4-2/power/wakeup
$ echo "USB2" > /proc/acpi/wakeup
Code: Select all
#!/bin/bash
[ "${ACTION}" != "add" ] && exit
ACPIWAKE=/proc/acpi/wakeup
PCI=$(echo ${DEVPATH} | cut -d/ -f4)
ACPIDEV=$(cat /proc/acpi/wakeup | grep $PCI | awk '{ print $1 }')
STATUS=$(cat /proc/acpi/wakeup | grep $ACPIDEV | awk '{ print $3 }')
[ "${STATUS}" != "*enabled" ] && echo ${ACPIDEV} > ${ACPIWAKE}
TMP=${DEVPATH}
# enable wakeup on the whole chain
while true; do
WAKE=/sys${TMP}/power/wakeup
[ -f "${WAKE}" -a -n "$(cat ${WAKE})" ] && echo "enabled" > ${WAKE}
TMP=${TMP%/*}
[ $TMP == "/devices" ] && break
done
Code: Select all
#!/bin/bash
[ "${ACTION}" != "add" ] && exit
TMP=${DEVPATH}
# disable wakeup on the deepest possible entry
while true; do
WAKE=/sys${TMP}/power/wakeup
[ -f "${WAKE}" -a -n "$(cat ${WAKE})" ] && echo "disabled" > ${WAKE} && break
TMP=${TMP%/*}
done
Code: Select all
# enable wakeup from mceusb
SUBSYSTEM=="usb", ATTR{idVendor}=="1509", ATTR{idProduct}=="9242", RUN+="/usr/local/bin/enable_wakeup.sh"
# disable wakeup from keyboard
SUBSYSTEM=="usb", ATTR{idVendor}=="05af", ATTR{idProduct}=="0319", RUN+="/usr/local/bin/disable_wakeup.sh"
What it does is, whenever my receiver gets loaded (that's the ATTR{idVendor}=="1509", ATTR{idProduct}=="9242" - these might be different for you) it iterates back from the device itself and enables every power/wakeup it finds disabled. Then it enables the bus in /proc/acpi/wakeup. I think I was unable to wake without explicitly enabling it there.depontius wrote: I need to carefully look at your udev script, but what I think I'd really like is a udev script that waits for its "mceusb" event, then enables that device and the USB port that it's plugged into.
It doesn't rely on any lirc drivers. You can verify that the scripts will get run withdepontius wrote:EDIT
On a quick first-try, I got no events logged upon a reboot. Should I be expecting udev events when I'm still using the out-of-kernel lirc drivers, or will those events only happen once I convert to in-kernel drivers? For the first attempt, I stuck my logger statement before checking to see if action=add, figuring more verbosity would help, or at least enlighten.
Code: Select all
$ udevadm test /sys/bus/usb/devices/3-2Code: Select all
udevadm_test: run: '/usr/local/bin/enable_wakeup.sh'