Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116129 - pbbuttonsd hangs while trying to open /dev/i2c-4 on a pb5,8
Summary: pbbuttonsd hangs while trying to open /dev/i2c-4 on a pb5,8
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-20 00:25 UTC by Andy Botting
Modified: 2005-12-23 22:17 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Botting 2005-12-20 00:25:38 UTC
pbbuttonsd (0.6.8, 0.7.1, 0.7.2 and even 0.7.3beta1) hangs on my powerbook5,8. I'm not sure whether this is a configuration issue or a hardware issue (for the new powerbooks) but when I try and start pbbuttonsd and have i2c loaded, it hangs trying to open the i2c-4 device. 

This is a quick strace on the point where it hangs:

stat64("/dev/pmu", {st_mode=S_IFCHR|0660, st_rdev=makedev(10, 154), ...}) = 0
open("/dev/pmu", O_RDWR)                = 8
stat64("/dev/adb", {st_mode=S_IFCHR|0660, st_rdev=makedev(56, 0), ...}) = 0
open("/dev/adb", O_RDWR)                = 9
open("/dev/i2c-4", O_RDWR)              = 10
ioctl(10, 0x703, 0x42)                  = 0
read(10,


I can ctrl+c it, but the process never goes away, even with a kill -9. Without the i2c-dev module, pbbuttons works fine, but I lose some functionality. Another guy with same hardware and running Gentoo has had the same problem, so this may be a hardware issue. I will email the maintainer about this issue too.

cheers

Andy
Comment 1 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-12-20 01:01:27 UTC
Known problem, it's because the code to detect the light sensor is simly ugly. You can comment out the loop in lmu_find_bus() (module_pmac.c) until there's a better solution. It's an upstream issue.
Comment 2 Andy Botting 2005-12-20 01:10:57 UTC
Thanks. I've posted an email to the pbbuttonsd list, and waiting a response.

cheers
Comment 3 René Nussbaumer (RETIRED) gentoo-dev 2005-12-20 01:12:55 UTC
Like hansmi said, the reason is this i2c loop. pbbuttonsd should look into /sys or scan the device-tree to determine the device. 

But in pb5,8 there has much changed. The light sensor (in pb5,6 called lmu) seems not to be accessable over i2c anymore. After a quick look into device-tree the als-sensor (ambient light sensor, called in pb5,8) seems to be behind via-pmu.

I didn't got time to take a closer look into via-pmu.c from the kernel source. But via-pmu seems also to use i2c so there's a need to look closer later.
Comment 4 Andy Botting 2005-12-23 22:17:38 UTC
I'm now exchanging emails with the author of pbbuttonsd, Matthias Grimm about it. Like you said, the hardware is a bit different, and I'm sending as much detail to him from my device-tree and /sys to see if we can get somewhere.