# CDROM under KDE

## NathanZachary

Hello all,

I have made some DVD copies of all my .ogg files and wanted to transfer them to my laptop.  However, when I put the discs in the DVD-ROM/CDRW drive on my laptop and click to open it in KDE, it errors, saying "Feature only available with HAL."  I have HAL merged, and I'm fairly certain that everything is setup correctly.  Are there any suggestions on what I might try?  I never had a problem when I was using GNOME, but then again, that was on another computer.

By the way, here is my fstab:

```

# /etc/fstab: static file system information.

#

# noatime turns off atimes for increased performance (atimes normally aren't 

# needed; notail increases performance of ReiserFS (at the expense of storage 

# efficiency).  It's safe to drop the noatime options if you want and to 

# switch between notail / tail freely.

#

# The root filesystem should have a pass number of either 0 or 1.

# All other filesystems should have a pass number of 0 or greater than 1.

#

# See the manpage fstab(5) for more information.

#

# <fs>         <mountpoint>   <type>      <opts>      <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/sda2      /boot      ext2      defaults,noatime   1 2

/dev/sda4      /      ext3      noatime      0 1

/dev/sda3      none      swap      sw      0 0

/dev/cdrom      /mnt/cdrom   auto      noauto,user   0 0

#/dev/fd0      /mnt/floppy   auto      noauto      0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm         /dev/shm   tmpfs      nodev,nosuid,noexec   0 0

```

Thanks preemptively,

Zach

----------

## didymos

Have you updated HAL recently?

----------

## rsa4046

Do hal and dbus start successfully?

----------

## micmac

Is HAL enabled for KDE? Check .kde/share/config/mediamanagerrc for

```
HalBackendEnabled=true
```

----------

## NathanZachary

@didymos,

I haven't updated HAL; I just got this system up and running a few days ago.  When I checked Portage, it said the following:

```

* sys-apps/hal

       Latest version available: 0.5.9-r1

       Latest version installed: 0.5.9-r1

...

```

So, I have the latest version.

@rsa4046

I'm not sure how to check for the successful starting of HAL and dbus.  All I can tell you is that I did:

```

rc-update add dbus default

```

and now, when I boot up, it says that "Starting D-BUS system messagebus ..." was "[ ok ]."

@micmac

Interestingly, that doesn't exist.  Inside of the /config folder, there is nothing called mediamanagerrc.  :Confused: 

----------

## NathanZachary

I also just noticed something stupid on my part.  For some reason, I have -dbus listed in my /etc/make.conf.  I guess that means that I compiled everything without that support?  Would that cause this problem?  If so, what could I do to easily fix it (i.e. not having to start over)?

Thanks again.

----------

## NathanZachary

Ack, sorry for posting again, but I just thought of something else.  Would this also be why when I put in my USB flash drives, it doesn't even know they're there?

----------

## micmac

You should definitely put hald into the default runlevel. DBUS doesn't depend on HAL, it's the other way around. Check with "pidof hald" that it's running,

----------

## NathanZachary

Gosh I am such a moron sometimes.  I couldn't figure out why

```

rc-update add hal default

```

wasn't working.  That would be because, even though the USE flag is hal, it is actually the Hardware Abstraction Layer Daemon (hald).  I'm going to try that really quickly and see if that works.

----------

## NathanZachary

After I did that, KDE at least recognized the medium (whether it was the DVD or my USB flash drive).  However, when I go to access either of them, it says:

```

A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.Hal.Device.Volume" member "Mount" error name "(unset)" destination "org.freedesktop.Hal")

```

And when I login as root and try it, I simply get a "Permission denied" error.

----------

## tarpman

Your user needs to be in the plugdev group.  Run "gpasswd -a <youruser> plugdev" as root (without the quotes of course), and then log out and back in again for it to take effect.

----------

## NathanZachary

My user is already part of the plugdev group, but just to be sure, I added myself anyway.  I still get the same message though.

----------

## NathanZachary

I merged pmount, and after a reboot, now I get the same error message for my user as I have gotten for my root: "Permissions denied."  There is obviously something wrong here if the root user can't access the files either.  I burned the DVDs on a Window$ machine, but as far as I know, that shouldn't cause any problems.

Any ideas?

----------

## darkphader

Remove:

```
/dev/cdrom      /mnt/cdrom   auto      noauto,user   0 0
```

From your fstab.

Chris

----------

## NathanZachary

WOW!  After commenting that line out, it actually worked!  Thank you so much for the suggestion.  What I want to know now is why that worked?  :Smile: 

----------

## rsa4046

For me, this error ("A security policy in place prevents this sender ...") went away after (re?)emerging kdebase-kioslaves. I also re-emerged dbus, and hal (in that order). My fstab entry is still

```
/dev/sr0                /mnt/cdrom      iso9660         users,noauto,ro 0 0
```

and I have hal and dbus as USE flags in /etc/make.conf.

----------

## NathanZachary

Why, in your fstab, is it /dev/sr0?  Also, if you have any ideas on why commenting out that entry also worked, I'd love to know.  :Smile: 

----------

## rsa4046

 *gentoo_zach wrote:*   

> Why, in your fstab, is it /dev/sr0?

 

Long story with this ASUS motherboard and its Jmicron controller, but that's how udev finally sorted my optical drive out.

```
$ ls -l /dev/sr0

brw-rw---- 1 root cdrom 11, 0 Jul  6 10:29 /dev/sr0
```

 *gentoo_zach wrote:*   

> Also, if you have any ideas on why commenting out that entry also worked, I'd love to know. 

 There was a page on KDE's website that explained this error, but I've forgotten the link. I would roll with whatever works  :Smile: 

----------

## NathanZachary

Sounds good; thanks to everyone for all the help.  :Smile: 

----------

## darkphader

 *gentoo_zach wrote:*   

> What I want to know now is why that worked? :)

 

```
man pmount
```

should answer this question

Chris

----------

## NathanZachary

Okay, now that I understand, and I have my optical drives working, I just have one other question.  Why the heck does it take so long to copy files off of the DVD+R?  It is only transferring at an unbearable average of 1.5 MBps!

----------

## NathanZachary

I found that the typical read speed for this drive and these DVD+Rs should be around 16 MBps, and when I copy from them under Window$ I get around 15.  Any ideas on why it is so much slower in Gentoo?

----------

## magowiz

did you activate the dma on your dvd drive ?

```

#hdparm /dev/cdrom

```

----------

## darkphader

 *gentoo_zach wrote:*   

> I found that the typical read speed for this drive and these DVD+Rs should be around 16 MBps, and when I copy from them under Window$ I get around 15.  Any ideas on why it is so much slower in Gentoo?

 

Could be many things. Not having proper chipset support built in the kernel. No DMA for the drive. Are you using the standard ATA drivers (provides /dev/hdx) or the newer (S)ATA drivers (provides /dev/srx)? If standard, put hdx_args="-c1 -d1" (where x is your device) in your /etc/conf.d/hdparm and adding hdparm to your default boot level; test by sending it directly "hdparm -c1 -d1 /dev/hdx".

Chris

----------

## NathanZachary

I'm guessing it is because DMA isn't active.  When I do hdparm /dev/cdrom I get the following:

```

/dev/cdrom:

 IO_support   =  0 (default 16-bit)

 unmaskirq    =  0 (off)

 using_dma    =  0 (off)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 HDIO_GETGEO failed: Inappropriate ioctl for device

```

----------

## magowiz

 *gentoo_zach wrote:*   

> I'm guessing it is because DMA isn't active.  When I do hdparm /dev/cdrom I get the following:
> 
> ```
> 
> /dev/cdrom:
> ...

 

so add something like :

```
all_args="-d1"

```

in /etc/conf.d/hdparm and add hdparm to your current runlevel

----------

## NathanZachary

Hi again,

Thanks for the suggestion, but when I did what you said, I got the following errors during boot:

```

INIT: Entering runlevel: 3

 * Running hdparm on /dev/hdc

 HDIO_SET_DMA failed: Operation not permitted

 * Running hdparm on /dev/sda

 HDIO_SET_DMA failed: Inappropriate ioctl for device

```

When I did hdparm /dev/cdrom it still showed up as DMA being off.  Something else I was wondering is why it refers to /dev/hdc in the boot sequence, but when I insert a CD or DVD into the drive, it is referred to as /media/hdc?

----------

## magowiz

 *gentoo_zach wrote:*   

> Hi again,
> 
> Thanks for the suggestion, but when I did what you said, I got the following errors during boot:
> 
> ```
> ...

 

I think you miss support for your ide chipset, try looking at your kernel configuration.

Try looking to lspci output to determine which is your chipset

----------

## NathanZachary

I have the Intel 915PM chipset with the 82801 Mobile PCI bridge.  What support would I need to enable in my kernel?  I can't seem to find anything specific to that chipset for IDE support?

----------

## magowiz

 *gentoo_zach wrote:*   

> I have the Intel 915PM chipset with the 82801 Mobile PCI bridge.  What support would I need to enable in my kernel?  I can't seem to find anything specific to that chipset for IDE support?

 

try to enable :

CONFIG_BLK_DEV_IDEDMA_PCI

CONFIG_BLK_DEV_PIIX

CONFIG_IDE_CHIPSETS

theese should give you generic support for intel and other chipsets.

----------

## NathanZachary

Alright, I must be pretty dumb about this, but do I just type in those commands from root in the /usr/src/linux directory?  I'm used to configuring my kernel using the "make menuconfig" command.  Sorry for the dumb question.

----------

## magowiz

 *gentoo_zach wrote:*   

> Alright, I must be pretty dumb about this, but do I just type in those commands from root in the /usr/src/linux directory?  I'm used to configuring my kernel using the "make menuconfig" command.  Sorry for the dumb question.

 

no, you can edit manually the .config file or searching thoose strings using the search function of make menuconfig,

for example if you want to search and enable CONFIG_BLK_DEV_IDEDMA_PCI , you must press "/" then enter the string BLK_DEV_IDEDMA_PCI to see where it is the voice to enable, and so on.

Anyway they're all under Device Drivers->ATA/ATAPI/MFM/RLL support .

----------

## NathanZachary

Okay, when I searched for the first two, I got the following:

```

Symbol: BLK_DEV_IDEDMA_PCI [=y]

...

Symbol: BLK_DEV_PIIX [=y]

```

However, when I searched for the last one, this is what I saw:

```

Symbol: IDE_CHIPSETS [=n]

```

I'm assuming that means that I don't have that one compiled in my kernel.  However, when I went to find it in the make menuconfig screen, I couldn't find that option.  I looked for something like "Other IDE chipset support" in Device Drivers->ATA/ATAPI/MFM/RLL support, but didn't see anything like that.

----------

## magowiz

try enabling :

Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support (BLK_DEV_IDE [=y])

and ISA support 

the help of this driver tells :

 *Quote:*   

> CONFIG_IDE_CHIPSETS:                                                    │  
> 
>   │                                                                         │  
> 
>   │ Say Y here if you want to include enhanced support for various IDE      │  
> ...

 

----------

## NathanZachary

That was already enabled.  I don't get why I can't make DMA active on any of my devices.  I agree that it does seem like the appropriate chipset driver isn't compiled in the kernel, but I can't find anything that is wrong.

----------

