Problem with zip drive?

Bug #31978 reported by Laurent Bigonville
12
Affects Status Importance Assigned to Milestone
gnome-power
Fix Released
High
gnome-power-manager (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Hi,

On my macintosh with a zip drive, the icon in the notification area doesn't appear. If I unload the ide-floppy kernel module, it comes immediately. This is maybe related with the bug #29822

Tags: apple
Revision history for this message
Daniel Silverstone (dsilvers) wrote :

Can you try the following please...

1. Kill the gnome-power-manager process
2. ensure the ide-floppy module is loaded and your zip drive plugged in
3. run gnome-power-manager --no-daemon --verbose 2>&1 | tee /tmp/gpm-trace
4. When it pauses, make a note of which line was the last to be written out
5. remove the ide-floppy kernel module
6. watch it come up the rest of the way then hit control+C
7. attach the trace to this bug, along with the information about where it paused during the load

Revision history for this message
Laurent Bigonville (bigon) wrote : gpm-trace

The last line before I remove ide_floppy is the line 24.

Revision history for this message
Daniel Silverstone (dsilvers) wrote :

Okay, so hal believes your zip drive has some power properties which gnome-power-manager is interested in.

Could you please do the following...

1. ensure the ide-floppy module is loaded
2. run hal-device /org/freedesktop/Hal/devices/storage_model_IOMEGA_ZIP_100_ATAPI
3. paste that into a comment for me?

Revision history for this message
Laurent Bigonville (bigon) wrote :

hal-device /org/freedesktop/Hal/devices/storage_model_IOMEGA_ZIP_100_ATAPI
udi = '/org/freedesktop/Hal/devices/storage_model_IOMEGA_ZIP_100_ATAPI'
  storage.policy.desired_mount_point = 'zip' (string)
  storage.policy.mount_filesystem = 'auto' (string)
  storage.policy.should_mount = true (bool)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_model_IOMEGA_ZIP_100_ATAPI' (string)
  info.udi = '/org/freedesktop/Hal/devices/storage_model_IOMEGA_ZIP_100_ATAPI' (string)
  storage.requires_eject = true (bool)
  storage.hotpluggable = false (bool)
  info.capabilities = { 'storage', 'block' } (string list)
  info.category = 'storage' (string)
  info.product = 'IOMEGA ZIP 100 ATAPI' (string)
  storage.removable = true (bool)
  storage.physical_device = '/org/freedesktop/Hal/devices/pci_106b_22_ide_1_1' (string)
  storage.drive_type = 'zip' (string)
  storage.vendor = '' (string)
  storage.model = 'IOMEGA ZIP 100 ATAPI' (string)
  storage.automount_enabled_hint = true (bool)
  storage.media_check_enabled = false (bool)
  storage.no_partitions_hint = true (bool)
  storage.bus = 'ide' (string)
  block.is_volume = false (bool)
  block.minor = 64 (0x40) (int)
  block.major = 22 (0x16) (int)
  block.device = '/dev/hdd4' (string)
  linux.hotplug_type = 3 (0x3) (int)
  info.parent = '/org/freedesktop/Hal/devices/pci_106b_22_ide_1_1' (string)
  linux.sysfs_path_device = '/sys/block/hdd' (string)
  linux.sysfs_path = '/sys/block/hdd' (string)

Revision history for this message
Daniel Silverstone (dsilvers) wrote :

Thanks, okay so that one doesn't appear to have anything which gnome-power-manager should be interested in. Yet it definitely thinks it should be considering that as a battery.

Okay, can you please do as follows:

1. ensure gnome-power-manager is not running
2. ensure ide-floppy is removed
3. start gnome-power-manager --no-daemon --verbose 2>&1 | tee /tmp/gpm-trace2
4. wait for it to settle
5. Note where it settles
6. insert the ide-floppy module
7. wait for it to settle
8. note where it settled
9. remove the ide-floppy module
10. again, wait
11. hit control+c and attach the new trace and where the settle points are?

Sorry I'm repeating myself a little but I need to see what g-p-m is up to.

Revision history for this message
Laurent Bigonville (bigon) wrote : gpm-trace2

Well... If I run g-p-m without ide_floppy loaded, the icon in the notification area doesn't appear either... When I load the module nothing happend in the log. When I remove (line 24 in the log) the module, the icon appears at last.

Revision history for this message
Daniel Silverstone (dsilvers) wrote :

This is extremely odd. I'm not sure at all what might be happening here.

I'll see if I can cook up a seriously verbose debugging version of g-p-m

Revision history for this message
Daniel Silverstone (dsilvers) wrote :

Having re-reviewed this it sounds very much like a hal bug. I've added Martin Pitt to the subscribers list and hopefully he may have an idea

Revision history for this message
Martin Pitt (pitti) wrote :

[hal_device_removed] gpm-hal-monitor.c:511 (18:48:40): udi=/org/freedesktop/Hal/devices/storage_model_IOMEGA_ZIP_100_ATAPI
*** WARNING ***
[watch_device_disconnect_condition] gpm-hal-monitor.c:390 (18:48:40): Device is not being watched: /org/freedesktop/Hal/devices/storage_model_IOMEGA_ZIP_100_ATAPI

This is a bogus warning; as g-p-m's source code already states:

static void
hal_device_removed (DBusGProxy *proxy,
                    const char *udi,
                    GpmHalMonitor *monitor)
{
        gpm_debug ("udi=%s", udi);

        /* FIXME: these may not all be batteries */
        watch_remove_battery (monitor, udi);
}

On startup, g-p-m should collect all existing batteries from hal, and watch out for new ones (and store information about them in some data structures). Then g-p-m can tell if a removed device was a battery (at that point you can't query hal for its attributes any more).

Further, watch_remove_battery() should not emit battery-removed for non-battery devices.

Thus, if the actual problem is that hal does not recognize the actual battery, then part of this bug is indeed in hal's realm. Can you please do

  lshal > hal.txt

and attach hal.txt here?

Thanks,

Martin

Revision history for this message
Laurent Bigonville (bigon) wrote : hal.txt

Here's the output of lshal. My macintosh is not a laptop

Matt Zimmerman (mdz)
Changed in gnome-power-manager:
assignee: nobody → dsilvers
Revision history for this message
Richard Hughes (richard-hughes) wrote :

Guys, can one of you create an upstream bug and I'll work on it after my exams have finished. Thanks.

Changed in gnome-power-manager:
assignee: dsilvers → nobody
Revision history for this message
Richard Hughes (richard-hughes) wrote :

2006-11-02 Richard Hughes <email address hidden>

        * src/gpm-battery.c:
        Only add and remove batteries if sane. This uses a hashtable to keep
        track of what batteries we are watching and should fix #369488.

Can you try CVS head please, and if that works I'll backport it to 2.16

Thanks.

Changed in gnome-power:
status: Unknown → Needs Info
Changed in gnome-power:
status: Needs Info → Fix Released
Revision history for this message
Wouter Stomp (wouterstomp-deactivatedaccount) wrote :

This was fixed upstream a long time ago, and should be fixed in ubuntu too now.

Changed in gnome-power-manager:
status: New → Fix Released
Changed in gnome-power:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.