# HAL doesn't notice insertion of CD/DVD-ROMs [solved]

## Seek

Hi!

I'm looking for hours now but i could not find any similar problems:

When I insert any optical disk in my Samsung SH-S182D drive HAL does not detect it.

I'm using hal-0.5.9-r1 and gentoo-sources-2.6.22-r1.

```
lshal --monitor
```

Does not show any output. "storage.removable.media_available" stays false altough a disk is inserted.

Here is the output of 'lshal -l -u *my device uid*':

```
udi = '/org/freedesktop/Hal/devices/storage_model_TSSTcorpCDDVDW_SH_S182D'

  block.device = '/dev/hdc'  (string)

  block.is_volume = false  (bool)

  block.major = 22  (0x16)  (int)

  block.minor = 0  (0x0)  (int)

  block.storage_device = '/org/freedesktop/Hal/devices/storage_model_TSSTcorpCDDVDW_SH_S182D'  (string)

  info.capabilities = {'storage', 'block'} (string list)

  info.category = 'storage'  (string)

  info.parent = '/org/freedesktop/Hal/devices/pci_1106_571_ide_1_0'  (string)

  info.udi = '/org/freedesktop/Hal/devices/storage_model_TSSTcorpCDDVDW_SH_S182D'  (string)

  linux.hotplug_type = 3  (0x3)  (int)

  linux.sysfs_path = '/sys/block/hdc'  (string)

  storage.automount_enabled_hint = true  (bool)

  storage.bus = 'ide'  (string)

  storage.drive_type = 'disk'  (string)

  storage.firmware_version = 'SB06'  (string)

  storage.hotpluggable = false  (bool)

  storage.media_check_enabled = false  (bool)

  storage.model = 'TSSTcorpCDDVDW_SH-S182D'  (string)

  storage.no_partitions_hint = false  (bool)

  storage.originating_device = '/org/freedesktop/Hal/devices/pci_1106_571_ide_1_0'  (string)

  storage.physical_device = '/org/freedesktop/Hal/devices/pci_1106_571_ide_1_0'  (string)

  storage.removable = true  (bool)

  storage.removable.media_available = false  (bool)

  storage.requires_eject = false  (bool)

  storage.size = 0  (0x0)  (uint64)

  storage.vendor = ''  (string)
```

Manual mounts are working:

```
mount /dev/hdc /mnt/cdrom/

mount | grep hdc

/dev/hdc on /mnt/cdrom type udf (ro)
```

And finally the output of hdparm.

```
/dev/hdc:

 IO_support    =  1 (32-bit)

 unmaskirq     =  1 (on)

 using_dma     =  1 (on)

 keepsettings  =  0 (off)

 readonly      =  0 (off)

 readahead     = 256 (on)

 HDIO_GETGEO failed: Inappropriate ioctl for device

```

Would be very nice if someone could help me with this problem.

As I could see there are no similar bug-reports in the HAL bugzilla.

Oh. I forgot to mention that I have another gentoo-box both are AMD64 and both use the same C-flags, USE-flags, 

and both have the same version of HAL installed, but different kernel versions.

Thank you,

SeekLast edited by Seek on Tue Jul 24, 2007 6:41 pm; edited 1 time in total

----------

## Monkeh

You're probably better off with it not polling the drive anyway.. TSST drives have a nasty habit of being completely broken when it comes to polling (mine completely locks my laptop using the old drivers, and causes serious issues with libata).

----------

## Seek

Maybe you are right but I want to get pooling working.

It works perfectly under Windows and its a new drive with the newest firmware.

Do I need any drivers for my drive?    :Embarassed: 

Is there a way to turn on polling of this drive?

I really want to know what causes this problem.

----------

## Seek

After I had a closer look at the tools HAL provides I found hal-disable-polling:

```
hal-disable-polling --device /dev/hdc

Polling is already disabled on the given drive.

hal-disable-polling --enable-polling --device /dev/hdc

Cannot find fdi file /etc/hal/fdi/information/media-check-disable-storage_model_TSSTcorpCDDVDW_SH_S182D.fdi. Perhaps polling wasn't disabled using this tool?
```

So how can I activate polling of this drive?

Why is polling disabled?

In the lshal output above I saw this line:

```
storage.drive_type = 'disk'  (string) 
```

but it should be

```
storage.drive_type = 'cdrom'  (string)
```

Any ideas?

----------

## Seek

Finally I solved my problem!

HAL was not the problem, the old ATAPI/IDE drivers in the kernel were too old for my hardware.

Switch to the new PATA drivers and dont forget to disable to old ATAPI/IDE driver, if you have your CDROM-drives not detected properly too.

See this thread for further information:

https://forums.gentoo.org/viewtopic-t-571040.html

----------

## borfig

I am having the same problem.

The computer is a plain old Pentium4 with no SATA/PATA stuff, just plain IDE/ATAPI.

I see that hal recognizes my cdrom drive as a disk...

I think (but not sure) that it started after switching to gentoo-sources-2.6.22-r1...

Any suggesions?

----------

## Seek

Yes, try to use the PATA drivers.   :Very Happy: 

PATA is a (new) synonym for data transfer over your IDE interface.

I don't know when the PATA drivers should be used, maybe just with really new hardware.

If you don't want to try the PATA drivers, you can check your kernel config wether you didn't forget to enable IDE/ATAPI CDROM support (BLK_DEV_IDECD) and SCSI CDROM support (BLK_DV_SR). I did not use SCSI generic support because I had some problems with it on my system.

Perhaps you just forgot to use IDE / SCSI CDROM support.

See my last post in this thread for how to use the PATA drivers:

https://forums.gentoo.org/viewtopic-t-571040.html

Before I forget: You'll need SCSI CDROM support with both ways.

Good luck   :Smile: 

----------

## borfig

Disabling IDE-CDROM support and enabling PATA with Intel drivers didn't work  :Sad: 

lspci states:

```
00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 02)
```

the computer's HDs are also on this IDE interface.

any suggestions?

----------

## Cyker

All the SATA/libata stuff still runs through the SCSI subsystem, so you'd need SCSI CD-ROM support enabled as well.

----------

## borfig

I enabled SCSI CD-ROM support...

----------

## Lubomir

I have a problem. I disabled the old IDE driver and enabled the new sata/pata driver. After rebooting with the new kernel, i get a kernel panic. hda1 is my windows,hda2 is boot, hda3 is swap and hda4 is root. I have root=/dev/hda4 in my boot line. Have someone an idea?

----------

## tarpman

Under the new libata (SATA/PATA) system, your disk drives will now be /dev/sd* instead of /dev/hd*.  So what was /dev/hda4 before will now be /dev/sda4, and so on.

----------

## borfig

what if the computer does _not_ have SATA/PATA, but plain old IDE???

----------

## Lubomir

I understand, that they are also supported from the new driver. I will test now that with sda4. Thanks

EDIT: Thanks for your help. It works. My normal notebook ide hdd is now realy /dev/sda . First i only changed the root and saw then, that i also must change the things in my /etc/fstab from /dev/hdax to /dev/sdax. That was all. I like that new driver   :Razz:   :Smile: 

----------

## borfig

For some unknown reason HAL works for me very good although my CDROM drives are on IDE with IDE drives.

No SATA/PATA driver is needed for my case. So I am cool...

----------

