[Hardy] Ejecting SD "inappropriate ioctl" error

Bug #374801 reported by mach6
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Hi all,

I'm using Hardy Heron Xubuntu 8.0.4.2 with 2.6.24-23-generic kernel, on an Asus W7J laptop with a Ricoh PCI CARD READER.

My Sandisk SD card is well recognized and correctly mounted with reading and writing permissions........but at the end when I right-click on the SD icon on the Desktop and choose "Eject".......

....an error is thrown....."inappropriate ioctl for device"

I think it's not related to "EJECT" command, because I can eject normally the same SD card if I mount that through an external USB CARD READER.

I think that error is related to sdhci module.....that is the module I've found loaded with the lsmod command.

Is it possible to change the right-click "eject-button" with a more useful "unmount-button"?

...so I can unmount SD without errors and no pain....

..I know that there is a file named 20-storage-methods.fdi under /usr/share/hal/fdi/policy/10osvendor/ and that contains a schema that is related to hal-eject-command, but I don't understand how to manage that....

Can anyone help me?

Thank you for your help.

Best regards

Gullusci Massimiliano

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage . I have classified this bug as a bug in hal.
For future reference you might be interested to know that a lot of applications have bug reporting functionality built in to them. This can be accessed via the Report a Problem option in the Help menu for the application with which you are having an issue. You can learn more about this feature at https://wiki.ubuntu.com/ReportingBugs.

Unfortunately, this report does not contain enough information for the developers to begin working to resolve this issue. Could you please attach the complete error log containing the error? If it is an on-screen error message, could you attach as separate attachments in plain text, both /var/log/dmesg and ~/.xsession-errors .

affects: ubuntu → hal (Ubuntu)
Changed in hal (Ubuntu):
status: New → Incomplete
Revision history for this message
mach6 (3384900078-tim) wrote :

Thank you for your help, I'll attach "dmesg" output and xsession-errors content soon.

In the meantime, I've found a workaround that helped me, but I don't know if it is a correct choice to solve the problem.

I've modified my

/usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi [I'll attach you also this file soon].

...at the line where "eject" command is required for all types of storage devices, I've substituted the "hal-storage-eject" command with "hal-storage-unmount".

With this change the first time I've ejected my SD, hal noticed me : "Can't eject [nameofdevice]. According to hal the device has been unmounted".
After this notification all the times I try to eject SD all works fine without notifications.

When I try to eject CDROM or the same SD plugged into my external CARD READER through USB cable all works well like before the change I've made.

Have I messed something that I don't see?....
Is that a real solution to my problem?
What do you think?

Thanks

see you soon

Best reagards

Gullusci Massimiliano

Revision history for this message
mach6 (3384900078-tim) wrote :

This is my xsession-errors

Revision history for this message
mach6 (3384900078-tim) wrote :

This is my dmesg

Revision history for this message
mach6 (3384900078-tim) wrote :

Hi all,

I've noticed another strange thing about eject of my SD.

In standard configuration if I use xfce4-mount-device-plugin to mount and dismount my SD plugged into the notebook internal reader, all works ok with no errors....but with my workaround descripted above I've no errors using right-click command "eject".....but an unmount error if I use the dismount command of xfce4-mount-device-plugin.

Thanks all,

Good day

Gullusci Massimiliano

Revision history for this message
mach6 (3384900078-tim) wrote :

Errata Corridge....

NO PROBLEMS with xfce4-mount-plugin!!!

Here it is the paragraph of the 20-storage-methods.fdi with the change-workaround I've mentioned above....

<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
       <match key="volume.linux.is_device_mapper" bool="false">
         <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Eject</append>
         <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</append>
         <append key="org.freedesktop.Hal.Device.Volume.method_argnames" type="strlist">extra_options</append>
         <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-storage-unmount</append>
       </match>
     </match>

Good day

Gullusci Massimiliano

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in hal (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
mach6 (3384900078-tim) wrote :

Hi,

I don't know if it helps....but I've also tried to run "eject /media/mySDCARDname" in a terminal and the "ioctl error"(reported in the title) was not the real error....it's only the last error.

I think that the "ioctl error" is related to the last try that eject does (.....eject -t /media/???......) and it's not the real error, because is thrown another error not reported in XFCE window alert.......:

It reports: "not an sg device, or old sg driver "

I hope this report can help.

Thanks all.

Gullusci Massimiliano

Revision history for this message
dino99 (9d9) wrote :
Changed in hal (Ubuntu):
status: Triaged → Invalid
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.