Jump to content

kde4 device notifier


alphaomega

Recommended Posts

after the most recent updates in slackware current...the device notifier does not give me any notificationwhen a data cd (iso9660) is inserted.I do get notifications for the following:audio cdsdvd moviesdvd data cdsflash drivesthe following is logged when I insert a data cd (iso9660):

Buffer I/O error on device sr0, logical block 166191sr 1:0:0:0: [sr0] Unhandled sense codesr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08sr 1:0:0:0: [sr0] Sense Key : 0x3 [current]sr 1:0:0:0: [sr0] ASC=0x11 ASCQ=0x0sr 1:0:0:0: [sr0] CDB: cdb[0]=0x28: 28 00 00 05 12 5e 00 00 02 00end_request: I/O error, dev sr0, sector 1329528

however, the following also occurs:1. if the cd is in the drive at bootup, it is listed in device notifier (and can be mounted).2. if I eject the drive tray in k3b and insert the cd, I get a notification (and the disc can be mounted).but if I merely insert the cd (after booting and while not in k3b)I get no notification from device notifier.anyone have any ideas on what to check?I've yet to find anything that helps.the settings I'm using look good...and it used to work just fine.anyway, anyone have any thoughts on this?thanks in advance...cheersand on a side note:I can mount the drive just fine as root.and I can mount the drive as a normal user with an fstab entry.I am a member of the plugdev and cdrom groups.and I've tried deleting the /etc/udev/rules.d/70-persistent-cd.rules file.yet I still can not seem to figure out why device notifier is no longergiving any notification when I insert a data cd (iso9660).

Edited by alphaomega
Link to comment
Share on other sites

monitoring hal with:

$ lshal -m

I get the following when I insert a data cd (iso9660):

Start monitoring devicelist:-------------------------------------------------10:39:01.475: storage_model_LTR_12102C property storage.removable.media_available = false10:39:13.423: storage_model_LTR_12102C property storage.removable.media_available = true

and the following errors are logged:

Buffer I/O error on device sr0, logical block 166191sr 1:0:0:0: [sr0] Unhandled sense codesr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08sr 1:0:0:0: [sr0] Sense Key : 0x3 [current]sr 1:0:0:0: [sr0] ASC=0x11 ASCQ=0x0sr 1:0:0:0: [sr0] CDB: cdb[0]=0x28: 28 00 00 05 12 5e 00 00 02 00end_request: I/O error, dev sr0, sector 1329528

and I get no notification from device notifier.If I am in k3b and eject/insert the cd I get:

Start monitoring devicelist:-------------------------------------------------10:40:15.258: storage_model_LTR_12102C property storage.removable.media_available = false10:40:23.183: storage_model_LTR_12102C property storage.removable.media_available = true10:40:23.235: storage_model_LTR_12102C property storage.removable.media_size = 680718336 (0x2892f000)10:40:28.683: volume_label_f5 added

and I get notification from device notifier and I can mount the disc.?? ;)

Link to comment
Share on other sites

securitybreach

Sorry I am not for sure about your hal notification issues since I do npt use notifications but thanks for the tip about using lshal. I did not know about that utility and it seems very useful ;)

Link to comment
Share on other sites

Sorry I am not for sure about your hal notification issues since I do npt use notifications but thanks for the tip about using lshal. I did not know about that utility and it seems very useful ;)
In researching the problem, I also came across this:command line mounting with hal via dbusAnd I can get this to work where the cd is mounted by a "regular" user...but only after inserting the cd while in k3b (since this is the only waythat device notifier notices when I insert a data cd).?? Still confused...
Link to comment
Share on other sites

  • 2 months later...
alphaomega

I am still having problems automounting iso9660 cds...even with a fresh install of slackware 13.1.To monitor hal I ran:lshal -mlshal output:

Start monitoring devicelist:-------------------------------------------------00:55:58.317: storage_model_LTR_12102C property storage.removable.media_available = true00:56:31.158: storage_model_LTR_12102C property storage.removable.media_available = false00:56:42.392: storage_model_LTR_12102C property storage.removable.media_available = true00:57:43.578: storage_model_LTR_12102C property storage.removable.media_available = false00:57:56.172: storage_model_LTR_12102C property storage.removable.media_available = true00:57:56.238: storage_model_LTR_12102C property storage.removable.media_size = 658325504 (0x273d4000)00:58:37.114: storage_model_LTR_12102C property storage.removable.media_available = false00:58:47.137: storage_model_LTR_12102C property storage.removable.media_available = true00:58:49.232: storage_model_LTR_12102C property storage.removable.media_size = 658327552 (0x273d4800)00:59:25.950: storage_model_LTR_12102C property storage.removable.media_available = false00:59:42.781: storage_model_LTR_12102C property storage.removable.media_available = true00:59:42.831: storage_model_LTR_12102C property storage.removable.media_size = 658325504 (0x273d4000)01:00:35.576: storage_model_LTR_12102C property storage.removable.media_available = false01:00:45.049: storage_model_LTR_12102C property storage.removable.media_available = true01:00:46.806: storage_model_LTR_12102C property storage.removable.media_size = 658321408 (0x273d3000)01:00:48.383: volume_label_f6 added

To monitor udev I ran:udevadm monitor >>udevadm.logcat udevadm.log

monitor will print the received events for:UDEV - the event which udev sends out after rule processingKERNEL - the kernel ueventKERNEL[1275285358.311310] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)KERNEL[1275285358.313333] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)UDEV  [1275285358.313379] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)UDEV  [1275285360.622566] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)KERNEL[1275285391.145108] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)KERNEL[1275285391.146722] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)UDEV  [1275285391.146765] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)UDEV  [1275285391.233820] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)KERNEL[1275285402.386788] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)KERNEL[1275285402.388336] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)UDEV  [1275285402.388378] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)UDEV  [1275285405.174939] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)KERNEL[1275285463.566193] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)KERNEL[1275285463.568387] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)UDEV  [1275285463.568518] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)UDEV  [1275285463.691194] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)KERNEL[1275285476.165416] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)KERNEL[1275285476.167022] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)UDEV  [1275285476.167107] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)UDEV  [1275285501.467378] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)KERNEL[1275285517.102843] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)KERNEL[1275285517.104796] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)UDEV  [1275285517.104843] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)UDEV  [1275285517.209359] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)KERNEL[1275285527.128609] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)KERNEL[1275285527.130185] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)UDEV  [1275285527.130270] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)UDEV  [1275285529.507147] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)KERNEL[1275285565.930174] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)KERNEL[1275285565.931789] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)UDEV  [1275285565.931832] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)UDEV  [1275285566.035990] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)KERNEL[1275285582.775988] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)KERNEL[1275285582.777800] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)UDEV  [1275285582.777845] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)UDEV  [1275285607.972595] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)KERNEL[1275285635.563671] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)KERNEL[1275285635.565774] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)UDEV  [1275285635.566026] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)UDEV  [1275285635.683216] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)KERNEL[1275285645.044013] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)KERNEL[1275285645.045739] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)UDEV  [1275285645.045786] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0 (scsi)UDEV  [1275285647.877513] change   /devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sr0 (block)

These messages occurred while executing the following commands(with the last couple of entries from lshal happening while loading the cd using k3b):

# cdrecord -eject dev=1,0,0Cdrecord-ProDVD-ProBD-Clone 2.01.01a78 (i686-pc-linux-gnu) Copyright (C) 1995-2010 J?rg Schillingscsidev: '1,0,0'scsibus: 1 target: 0 lun: 0Linux sg driver version: 3.5.34Using libscg version 'schily-0.9'.Device type	: Removable CD-ROMVersion		: 5Response Format: 2Capabilities   : Vendor_info	: 'LITE-ON 'Identifikation : 'LTR-12102C	  'Revision	   : 'RQS4'Device seems to be: Generic mmc CD-RW.Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).Driver flags   : MMC-3 SWABAUDIO Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R

# cdrecord -load dev=1,0,0																					Cdrecord-ProDVD-ProBD-Clone 2.01.01a78 (i686-pc-linux-gnu) Copyright (C) 1995-2010 J?rg Schillingscsidev: '1,0,0'scsibus: 1 target: 0 lun: 0Linux sg driver version: 3.5.34Using libscg version 'schily-0.9'.Device type	: Removable CD-ROMVersion		: 5Response Format: 2Capabilities   : Vendor_info	: 'LITE-ON 'Identifikation : 'LTR-12102C	  'Revision	   : 'RQS4'Device seems to be: Generic mmc CD-RW.Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).Driver flags   : MMC-3 SWABAUDIO Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R

Looking at the entries from lshal, it looks like there is a problem detecting:storage.removable.media_sizeAnd these are the errors logged in dmesg...

sr 1:0:0:0: [sr0] Unhandled sense codesr 1:0:0:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08sr 1:0:0:0: [sr0] Sense Key : 0x3 [current] sr 1:0:0:0: [sr0] ASC=0x11 ASCQ=0x0sr 1:0:0:0: [sr0] CDB: cdb[0]=0x28: 28 00 00 04 e7 a6 00 00 02 00end_request: I/O error, dev sr0, sector 1285784Buffer I/O error on device sr0, logical block 160723

# cdrecord -media-info dev=1,0,0

Cdrecord-ProDVD-ProBD-Clone 2.01.01a78 (i686-pc-linux-gnu) Copyright (C) 1995-2010 J?rg Schillingscsidev: '1,0,0'scsibus: 1 target: 0 lun: 0Linux sg driver version: 3.5.34Using libscg version 'schily-0.9'.Device type	: Removable CD-ROMVersion		: 5Response Format: 2Capabilities   : Vendor_info	: 'LITE-ON 'Identifikation : 'LTR-12102C	  'Revision	   : 'RQS4'Device seems to be: Generic mmc CD-RW.Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).Driver flags   : MMC-3 SWABAUDIO Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96RMounted media class:	  CDMounted media type:	   CD-RDisk Is not erasabledata type:				standarddisk status:			  completesession status:		   completeBG format status:		 nonefirst track:			  1number of sessions:	   1first track in last sess: 1last track in last sess:  1Disk Is not unrestrictedDisk type: CD-DA or CD-ROMDisk id: 0x494B0last start of lead in: 716730last start of lead out: 1166730OPC table:Track  Sess Type   Start Addr End Addr   Size==============================================	1	 1 Data   0		  321446	 321447Last session start address:		 0Last session leadout start address: 321447

mounting manually works as root:mount -t auto /dev/sr0 /mnt/cdrom mount: block device /dev/sr0 is write-protected, mounting read-onlyand automounting works when using the ultilex-2.1 live cd.this problem cropped up for me between 12.2--and--13.1.back when scsi emulation was used...it worked.:(

Link to comment
Share on other sites

Can't help with your problem but I can relate some former CD problems I had. Back when SATA was a recent introduction I had a new motherboard and SATA hard drives but still used an IDE DVD drive. It worked most of the time but sometimes it just wouldn't see the CD/DVD, particularly when trying to install a new distro from it. I got sick of it and just bought a SATA DVD drive and all was well. I recall reading that a number of others had a similar problem and it related to the IDE chip being an add-on to the motherboard and not part of the normal mobo chipset. The IDE chipset's drivers were known to be a little unreliable.

Link to comment
Share on other sites

alphaomega

No problem sunrat...I've learned to just manually mount them.At this point, I just wish I knew a little more about how all this automounting stuff works.Although I should not call it automounting as the device does not really get mounted...you just get a notification that it has been inserted.I've read so much conflicting information online my head is spinning trying to figure this out.hal, udev, dbus, automounting, device-notifier, udev rules, fdi rules...etc.Not to mention some of the stuff I'm finding is old and probably no longer applies with all the changes that have occurred over the years.If I could only find an up to date writeup on how this stuff "works now".It's just odd that the problem only happens to me with cdr's using iso9660.Either way, I'll still look for an answer every once in a while on google to see if anything new pops up.Thanks and Cheers

Link to comment
Share on other sites

What's your entry in fstab for cdrom? Here's mine and notify works fine:

/dev/cdrom		  /media/cdrom		 udf,iso9660	 noauto,ro,users	  0	  0

Link to comment
Share on other sites

alphaomega
What's your entry in fstab for cdrom? Here's mine and notify works fine:
/dev/cdrom		  /media/cdrom		 udf,iso9660	 noauto,ro,users	  0	  0

Huh?Everything I've read says to comment out the line in fstab for notify/automount (whatever you call it) to work?Anyway...my entry currently is:
#/dev/cdrom	  /mnt/cdrom	   auto		noauto,users,ro  0   0

With or without the "#", I get errors in dmesg and no notification.If I remove the "#", I can manually mount the cd as a regular user if I use the -t option.With the "#", I can manually mount the cd as root if I use the -t option.I can avoid the -t option if I use iso9660 in the fstab entry.I've tried various combinations to no avail:

#/dev/cdrom	  /mnt/cdrom	iso9660,udf	  noauto,users,ro	0   0

#/dev/cdrom	  /mnt/cdrom	udf,iso9660	  noauto,users,ro	0   0

#/dev/cdrom	  /mnt/cdrom	auto		   noauto,owner,ro   0   0

:thumbsdown:

Edited by alphaomega
Link to comment
Share on other sites

securitybreach
If I could only find an up to date writeup on how this stuff "works now".Thanks and Cheers
There are a number of factors involved in 'hotplugging' and HAL is only one of them. When a new device is added, e.g. a USB drive is plugged in, the following occurs (roughly):The kernel becomes aware of a new device and registers it in /sys.Udev creates a device node (e.g. /dev/sdb1), and loads the drivers/modules needed.The HAL daemon is notified by D-Bus and adds the device and what it can find out about it to its database.The addition of the new device is broadcast by HAL over D-Bus to whatever programs are subscribing, e.g. Thunar, which shows it as an icon in the shortcuts side panel, or Metacity/Nautilus which will add an icon to the desktop.Another program listening may be a volume manager, such as thunar-volman or AutoFS, configured to automatically create mount points and mount certain types of drives, start Rhythmbox whenever an iPod is connected, etc.HAL does not detect the hardware (kernel), manage the devices or the drivers (udev) or automount drives (volume managers). As a hardware abstraction layer, its role is more akin to a communications center, providing your applications with a clean interface to the devices. Problems with hot-plugged devices not being properly detected, usable, or mounted should be investigated, knowing that it is a long chain and there are more components involved.
http://wiki.archlinux.org/index.php/HALConfusing huh :hysterical: Do not mind the installation part but the troubleshooting section may help you. Also make sure you back up the hal rules/files you edit. Hal is confusing enough without not having a backup to restore from.
Link to comment
Share on other sites

alphaomega
Confusing huh :hysterical:
Absolutely!But I'll read it anyway.Thanks...It sounds like the problem is at either step 3 or 4 listed under the overview section.It's just odd that the problem only happens with iso9660 cdrs.For example:# cat /media/.hal-mtab /dev/sr1 1000 0 udf nosuid,nodev,uhelper=hal,uid=1000 /media/081203_0246Hal has no problem mounting this udf formatted dvd. Edited by alphaomega
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...