# No recognition of inserted CD or DVD

## sumerman

In the past few months KDE stopped recognizing newly inserted CDs and DVDs. I have hal, udev, kdebase-kioslaves all installed and the daemons are running. What I have noticed is that the process hald-addon-storage is not running, so I assume the drives (/dev/hdc and /dev/hdd) aren't being polled. I suspect that's the problem, but I haven't figured out how to solve it. I do not have ivman or pmount installed.

I have no trouble mounting the drives, and k3b, xine, and mplayer access them perfectly. But I would like the helpful KDE menu to come up when a disc is inserted that gives you the choice of actions on the disc.

Here is the output from emerge --info:

```
emerge --info

Portage 2.1.4_rc11 (default-linux/amd64/2007.0/desktop, gcc-4.2.2, glibc-2.7-r1, 2.6.23-gentoo-r5 x86_64)

=================================================================

System uname: 2.6.23-gentoo-r5 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+

Timestamp of tree: Mon, 24 Dec 2007 17:16:01 +0000

app-shells/bash:     3.2_p17-r1

dev-java/java-config: 1.3.7, 2.1.3

dev-lang/python:     2.4.4-r7, 2.5.1-r4

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.10-r5

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.61-r1

sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.18-r1

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.24

virtual/os-headers:  2.6.23-r2

ACCEPT_KEYWORDS="amd64 ~amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=athlon64 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"

CXXFLAGS="-march=athlon64 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo http://mirrors.acm.cs.rpi.edu/gentoo/ ftp://gentoo.mirrors.tds.net/gentoo http://gentoo.chem.wisc.edu/gentoo/ "

LC_ALL="en_US.utf8"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"

USE="3dnow 3dnowext X Xaw3d a52 aac acl acpi alsa amd64 arts avi berkdb bitmap-fonts cairo cdparanoia cdr cli cracklib crypt cups dbus divx dri dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg fftw firefox flac fortran gdbm gif glx gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jack java jpeg kde kerberos lame ldap lesstif libsamplerate mad midi mikmod mmx mozilla mp3 mpeg mplayer mudflap ncurses nls nptl nptlonly ogg oggvorbis opengl openmp oss pam pcre pdf perl png portaudio pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1 type1-fonts unicode vorbis wmp wxgtk1 xanim xml xorg xv xvid zlib" ALSA_CARDS="ice1712" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

Any assistance would be greatly appreciated. I've wrestled with this for a week and have made no progess. I have re-emerged the pertinent files (dbus, udev, kdebase-kioslaves, qt3-old), but so far to no avail.

----------

## marrowhk

Here is what i do when hald/udev stops showing drives:

(as root)

1. rm -Rf /etc/udev/* (clear out persistent rules)

2. emerge udev (installs default rules)

3. emerge hal ( make sure the link linux is in /usr/src and is linked to the current kernel)

4. reboot

Sometimes this is all that is needed, try it for starters.

----------

## desultory

 *marrowhk wrote:*   

> 1. rm -Rf /etc/udev/* (clear out persistent rules)

 That is more aggressive than necessary, at very least keep a backup of any user created or otherwise site specific rules.

----------

## sumerman

Thanks for the suggestions but alas, no dice. I executed  *Quote:*   

> rm -Rf /etc/udev/* 

  I then tried rebooting after that but then I had no access to mouse or keyboard (I guess because both are USB). So I then, with the help of SystemRescueCD, was able to reemerge udev and then hal. That gave me back my mouse and keyboard, but unfortunately, inserting a CD after the system booted into KDE still elicited no response. I also checked running processes and found the  *Quote:*   

> hald-addon-storage

  process was still not running. I'm focused on this because it is the one seemingly relevant process running at work (where I have a Slackware box where udev/hal work) that is not running on my home Gentoo computer. For the record, here is the output of  *Quote:*   

> ps -A

 :

```

Duquesne ~ # ps -A

  PID TTY          TIME CMD

    1 ?        00:00:00 init

    2 ?        00:00:00 kthreadd

    3 ?        00:00:00 ksoftirqd/0

    4 ?        00:00:00 events/0

    5 ?        00:00:00 khelper

   39 ?        00:00:00 kblockd/0

   43 ?        00:00:00 kacpid

   44 ?        00:00:00 kacpi_notify

  172 ?        00:00:00 ata/0

  173 ?        00:00:00 ata_aux

  175 ?        00:00:00 kseriod

  216 ?        00:00:00 pdflush

  217 ?        00:00:00 pdflush

  218 ?        00:00:00 kswapd0

  219 ?        00:00:00 aio/0

  220 ?        00:00:00 xfslogd/0

  221 ?        00:00:00 xfsdatad/0

  222 ?        00:00:00 xfs_mru_cache

  354 ?        00:00:00 scsi_eh_0

  356 ?        00:00:00 scsi_eh_1

  384 ?        00:00:00 kjournald

  564 ?        00:00:00 udevd

  981 ?        00:00:00 ksuspend_usbd

  982 ?        00:00:00 khubd

 2781 ?        00:00:00 xfsbufd

 2782 ?        00:00:00 xfssyncd

 4716 ?        00:00:00 syslog-ng

 4802 ?        00:00:00 dbus-daemon

 4887 ?        00:00:00 hald

 4888 ?        00:00:00 hald-runner

 4894 ?        00:00:00 hald-addon-keyb

 4895 ?        00:00:00 hald-addon-keyb

 4898 ?        00:00:00 hald-addon-acpi

 5350 ?        00:00:00 dhcpcd

 5561 ?        00:00:00 kdm

 5640 tty7     00:00:24 X

 5641 ?        00:00:00 kdm

 5642 ?        00:00:00 cupsd

 5819 ?        00:00:00 ntpd

 5903 ?        00:00:00 sshd

 5986 ?        00:00:00 cron

 6086 ?        00:00:00 bash

 6107 tty1     00:00:00 agetty

 6108 tty2     00:00:00 agetty

 6109 tty3     00:00:00 agetty

 6110 tty4     00:00:00 agetty

 6111 tty5     00:00:00 agetty

 6112 tty6     00:00:00 agetty

 6132 ?        00:00:00 startkde

 6167 ?        00:00:00 dbus-launch

 6168 ?        00:00:00 dbus-daemon

 6187 ?        00:00:00 start_kdeinit

 6188 ?        00:00:00 kdeinit

 6191 ?        00:00:00 dcopserver

 6193 ?        00:00:00 klauncher

 6195 ?        00:00:00 kded

 6200 ?        00:00:00 kwrapper

 6202 ?        00:00:00 ksmserver

 6203 ?        00:00:00 kwin

 6205 ?        00:00:00 kdesktop

 6207 ?        00:00:00 kicker

 6208 ?        00:00:00 kio_file

 6215 ?        00:00:00 knotify

 6216 ?        00:00:00 artsd

 6218 ?        00:00:00 kaccess

 6234 ?        00:00:00 kio_uiserver

 6239 ?        00:00:02 konqueror

 6308 ?        00:00:00 mozilla-launche

 6317 ?        00:00:34 firefox-bin

 6332 ?        00:00:00 gconfd-2

 6439 ?        00:00:00 konsole

 6440 pts/1    00:00:00 bash

 6539 pts/2    00:00:00 su

 6542 pts/2    00:00:00 bash

 6548 pts/2    00:00:00 ps

```

Again, any ideas or suggestions are greatly appreciated.

[/glsa]

----------

## jburns

If you have any files in /etc/hal/fdi/information check their contents.

----------

## sumerman

 *jburns wrote:*   

> If you have any files in /etc/hal/fdi/information check their contents.

 

There are three folders there, Information, Policy and Preprobe. Each one has a dot file named .keep_sys-apps_hal-0, and each one is of size 0. Oddly, the dates of the directories is December 21, although I reinstalled hal today. The three dot files have a current creation time (from startup of the computer).

----------

## marrowhk

Here is what i do when hald/udev stops showing drives:

(as root)

1. rm -Rf /etc/udev/* (clear out persistent rules)

2. emerge udev (installs default rules)

3. emerge hal ( make sure the link linux is in /usr/src and is linked to the current kernel)

4. reboot

Are you saying that after removing the contents of /etc/udev/* you then re-emerged udev and then could not boot? I find this hard to imagine!

Obviously if you've gone to the trouble of creating your own udev rules you're not going to throw them out (you probably have backups of those rules anyway). 

My suggestion here is to clear out a default situation, i have no self-made rules, and any persistent rules will be recreated as you use your system.

To recap, you did the following in the same sessionand then could not reboot: Yes/No?

1. rm -Rf /etc/udev/* (clear out persistent rules)

2. emerge udev (installs default rules)

3. emerge hal ( make sure the link linux is in /usr/src and is linked to the current kernel)

----------

## sumerman

 *marrowhk wrote:*   

> [color=green]Here is what i do when hald/udev stops showing drives:
> 
> To recap, you did the following in the same sessionand then could not reboot: Yes/No?
> 
> 1. rm -Rf /etc/udev/* (clear out persistent rules)
> ...

 

No, ultimately I did exactly that. At first I just did step 1, thinking that was what desultory meant when he/she said your instructions were excessive. I thought he/she was saying steps 2 and 3 were unnecessary. And no, I have not written any udev rules at all; I only had the rules automatically generated.

Anyway, I did all three steps after I recovered from only doing the first. After doing all three, I was right back where I started. I can mount CDs manually, and media programs can access DVDs and CDs as always, but there is no automatic recognition of disks when they are inserted, such as by KDE's kioslaves.

I thought it might be my kernel, so I rebuilt it from scratch and went through all options very carefully, but still no dice. Ugh!   :Mad: 

----------

## marrowhk

Man, that sucks! 

In your situation i would just recheck a few things first after rebooting:

1. is hald in default rc? If not add it with rc-update add hald default.

2. during a session, as root, # /etc/init.d/hald restart

During these procedures open a terminal and check logs as root

# tailf /var/log/messages   

post what you see!

If hal is recognizing stuff and udev creating the necessary /dev/*  then parts of your KDE are probably at fault. I'd research with equery (equery b and equery d - research these if you don't know what they are) to see what i could remerge to rectify the situation.

----------

## sumerman

[quote="marrowhk"]

In your situation i would just recheck a few things first after rebooting:

1. is hald in default rc? If not add it with rc-update add hald default.

2. during a session, as root, # /etc/init.d/hald restart

During these procedures open a terminal and check logs as root

# tailf /var/log/messages   

post what you see!

1. Alas, yes, hald is in default rc.

2. Tried this, and when I inserted a CD, absolutely no output at all. The only output from the tailf command from this action was from becoming root: 

Dec 29 11:25:56 Duquesne su[29167]: Successful su for root by palsor

Dec 29 11:25:56 Duquesne su[29167]: + pts/4 palsor:root

Dec 29 11:25:56 Duquesne su[29167]: pam_unix(su:session): session opened for user root by (uid=1000)

From lshal, I did note that for the CD/DVD drives I get (among lots and lots of other stuff) the line:

 storage.media_check_enabled = false  (bool)

I thought the answer lie in that fact, but I changed the setting to true using the hal-set-property command, but that didn't work. When I restarted hald it was back to false, and even after changing it to true and not restarting hald, the drives still weren't autodetected. Argh!

----------

## sumerman

I finally resolved the problem by recompiling my kernel. I recompiled last night being as economical as possible and ended up with a subtly problematic computer (such as a sudden freeze and not automatically starting wav files when clicked), and so I recompiled using many of the default choices except for those for hardware that I didn't have. Voila! Everything is up and running again. So the problems lay in some kernel configuration; the files were OK. I'll compare the .config files and see if I can determine the critical differences.

Thanks to all for your help.

----------

