# cd/dvd not showing up when inserted

## Xamindar

I must have missed enabling something in the newest kernel or something. When I insert a disk in my dvd drive nothing happens, no event in dmesg and kde4 auto mount window doesn't alert me of anything new. Anyone know what I am missing?

If I "mount /dev/cdrom /mnt/temp/" it mounts just fine and I can access the disk. But what is preventing kde4 from knowing when one is inserted?

----------

## psycho

not sure if you're using HAL (and if you are you've probably checked it already), but i had a similar problem with a memory card (worked fine but dmesg showed no response to its being plugged in): turned out there was no hald in /etc/runlevels/boot. don't remember when or why i disabled it, but evidently it didn't make much difference to anything else. anyway, a simple rc-update add hald boot and the kernel noticed stuff being plugged in again.

----------

## d2_racing

Hi, can you post this :

```

# emerge --info

# rc-update show

# rc-status

```

----------

## Xamindar

 *d2_racing wrote:*   

> Hi, can you post this :
> 
> ```
> 
> # emerge --info
> ...

 

Sure,

```
Portage 2.2_rc67 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11-r1, 2.6.32-tuxonice x86_64)

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

System uname: Linux-2.6.32-tuxonice-x86_64-Intel-R-_Core-TM-2_CPU_T7200_@_2.00GHz-with-gentoo-2.0.1

Timestamp of tree: Sat, 17 Apr 2010 21:45:01 +0000

app-shells/bash:     4.1_p5

dev-java/java-config: 2.1.10

dev-lang/python:     2.5.4-r3, 2.6.5-r1, 3.1.2-r1

dev-util/cmake:      2.8.1

sys-apps/baselayout: 2.0.1

sys-apps/openrc:     0.6.1-r1

sys-apps/sandbox:    2.2

sys-devel/autoconf:  2.13, 2.65

sys-devel/automake:  1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1

sys-devel/binutils:  2.20.1

sys-devel/gcc:       4.4.3

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.33

ACCEPT_KEYWORDS="amd64 ~amd64"

ACCEPT_LICENSE="* -@EULA skype-eula"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=nocona -O2 -msse3 -pipe -fomit-frame-pointer"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"

CXXFLAGS="-march=nocona -O2 -msse3 -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.mirrors.pair.com/ http://gentoo.mirrors.tds.net/gentoo http://gentoo.netnitco.net http://mirror.espri.arizona.edu/gentoo/ http://mirrors.acm.cs.rpi.edu/gentoo/ ftp://ftp.ndlug.nd.edu/pub/gentoo/ http://gentoo.llarian.net/ ftp://gentoo.llarian.net/pub/gentoo http://mirror.datapipe.net/gentoo ftp://mirror.datapipe.net/gentoo http://mirror.mcs.anl.gov/pub/gentoo/ ftp://mirror.mcs.anl.gov/pub/gentoo/ "

LANG="en_US.UTF-8"

LDFLAGS="-Wl,-O1"

LINGUAS="en en_US ja"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/portage/local/layman/yarik-overlay /usr/portage/local/layman/x11 /usr/portage/local/xamindar"

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

USE="X a52 aac aalib accessibility acl acpi aiglx alsa amd64 anthy asf autoipd avahi bash-completion berkdb bluetooth branding bzip2 cairo canna cdaudio cdda cdr cjk cli consolekit cracklib crypt css cups curl cxx dbus dell demo deprecated device-mapper discouraged divx dri dv dvd dvdr dvdread embedded emerald encode esd exif expat extras fbsplash ffmpeg firefox flac foomaticdb fortran frei0r frontendonly fuse gaim gdbm gdu gif gimp glitz gmedia gnome gnome-keyring gnutls google-gadgets gpm gstreamer gtk hal hddtemp hog iconv immqt-bc inotify ipv6 jack java javascript joystick jpeg kde kde4 laptop lastfm lcms libnotify libsamplerate lm_sensors mad mdnsresponder-compat melt midi mikmod mjpeg mmx mng modules mp3 mp4 mpeg mplayer msn mudflap multilib musepack musicbrainz ncurses networkmanager new-login nls nptl nptlonly nsplugin ogg old-daemons opengl openmp pam pcre pdf perl phonon png policykit pppd prediction print python qt3support qt4 quicktime readline realmedia reflection rtc samba sdl secure-delete semantic-desktop session smp sound spell spl sql sqlite sqlite3 sse sse2 ssl subtitles svg swat sysfs taglib tcpd theora threads threadsafe thumbnail thunderbird tiff timidity tk truetype unicode unsupported usb v4l vcd videos visualization vorbis wavpack webkit wifi winbind wmp x264 xcb xcomposite xine xml xorg xscreensaver xulrunner xv xvid zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US ja" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon radeonhd" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

```
            syslog-ng | default                                       

                 udev |                               sysinit         

            crashplan | default                                       

                 dbus | default                                       

                 swap |         boot                                  

                 hald | default                                       

                cupsd | default                                       

                 root |         boot                                  

                local | default             nonetwork                 

                dmesg |                               sysinit         

              hddtemp | default                                       

              hwclock |         boot                                  

        device-mapper |         boot                                  

         termencoding |         boot                                  

           lm_sensors | default                                       

                devfs |                               sysinit         

            alsasound | default                                       

               procfs |         boot                                  

             hostname |         boot                                  

          consolefont |         boot                                  

              modules |         boot                                  

                 sshd | default                                       

         cpufrequtils | default                                       

    hibernate-cleanup |         boot                                  

       avahi-dnsconfd | default                                       

                 fsck |         boot                                  

               hdparm | default                                       

            savecache |                                       shutdown

             bootmisc |         boot                                  

             netmount | default                                       

                acpid | default                                       

            killprocs |                                       shutdown

            bluetooth | default                                       

        microcode_ctl |         boot                                  

              keymaps |         boot                                  

                 ntpd | default                                       

       NetworkManager | default                                       

               net.lo |         boot                                  

                 mtab |         boot                                  

                samba | default                                       

             mount-ro |                                       shutdown

       udev-postmount | default                                       

           vixie-cron | default                                       

             timidity | default                                       

           localmount |         boot                                  

               sysctl |         boot                                  

           consolekit | default                                       

                  xdm | default                                       

              urandom |         boot                                  

```

```
Runlevel: default

 hdparm                                                                                                                                  [  started  ]

 syslog-ng                                                                                                                               [  started  ]

 crashplan                                                                                                                               [  started  ]

 dbus                                                                                                                                    [  started  ]

 consolekit                                                                                                                              [  started  ]

 acpid                                                                                                                                   [  started  ]

 hald                                                                                                                                    [  started  ]

 cupsd                                                                                                                                   [  started  ]

 netmount                                                                                                                                [  started  ]

 xdm                                                                                                                                     [  started  ]

 alsasound                                                                                                                               [  started  ]

 avahi-dnsconfd                                                                                                                          [  started  ]

 bluetooth                                                                                                                               [  started  ]

 cpufrequtils                                                                                                                            [  started  ]

 hddtemp                                                                                                                                 [  started  ]

 lm_sensors                                                                                                                              [  started  ]

 NetworkManager                                                                                                                          [  started  ]

 ntpd                                                                                                                                    [  started  ]

 samba                                                                                                                                   [  started  ]

 sshd                                                                                                                                    [  started  ]

 timidity                                                                                                                                [  started  ]

 udev-postmount                                                                                                                          [  started  ]

 vixie-cron                                                                                                                              [  started  ]

 local                                                                                                                                   [  started  ]

Dynamic Runlevel: hotplugged

 bluetooth                                                                                                                               [  started  ]

Dynamic Runlevel: needed

 sysfs                                                                                                                                   [  started  ]

 xdm-setup                                                                                                                               [  started  ]

 avahi-daemon                                                                                                                            [  started  ]

Dynamic Runlevel: manual

```

----------

## Xamindar

By the way, I just got this error on an emerge update, looks like it might be related:

```
* Usage of hal is strongly discouraged. Please migrate to udev.

 * From next major release on the hal support will be fully disabled.

 * Both hal and udev flags are enabled.

 * Enabling only udev!

```

I guess hal shouldn't be used anymore? Or should I just disable it in xorg-server (where this message came from).

----------

## psycho

i'm comparing the two at the moment. one of my systems is running the new (1.8 series) xorg server, with udev and no hal. as usual, things that are supposed to "just work" with the new software don't, so that the effect of making it "friendlier" is in fact to create a ton of more work for people who already had their systems working perfectly with the old setup. *sigh*. i suspect that i'll iron out some of the problems (configuring evdev drivers etc.) over the next few hours; others may take longer: i've read that some apps (e.g. many kde apps) still rely on hal for some of their functionality.

my other system is using the older (1.7) xorg server, and hal is working perfectly nicely. no doubt i will switch to pure udev on this one too, eventually...but i prefer having things actually work to having things set up the way developers say they ought to be, so will wait until i have the udev-only system 100% functional before switching this one over.

----------

## d2_racing

 *psycho wrote:*   

> my other system is using the older (1.7) xorg server, and hal is working perfectly nicely. no doubt i will switch to pure udev on this one too, eventually...but i prefer having things actually work to having things set up the way developers say they ought to be, so will wait until i have the udev-only system 100% functional before switching this one over.

 

Indeed, that represent at lot of work on the devs part, I hope that they don't change their mind again for the next 2 years  :Razz: 

----------

## psycho

lol. true, a lot more work for ebuild maintainers and so on than for users: and to their credit, my xorg-server-1.8.0 setup (without hal) is already working nicely. what's more, i can see that all this increasing automation is going to make things so much easier for new users that it probably is worth it. or at least, it's definitely worth it in terms of the inconvenience to old-school users who were comfortable and familiar with the old way of doing things: i'm just a bit wary of the syndrome where things get "easier" on the surface by making them more complex underneath. i miss the days when devices were handled via mknod and chmod. and typing "mount /mnt/foo" is not really so painful.

re the original issue: one workaround for making devices appear (to the kernel, and also literally on the desktop in some cases) when hal-dependent apps don't see them is to do a udev restart. if a device that's invisible to dmesg and so on (because plugged in after udev started) suddenly appears when udev's restarted, does that prove that auto-mounting should be possible via some configuration of udev rules or hotplug or whatever? because if so, then i'm assuming the dependence on hal that i've read about (in some kde apps etc.) is only to do with the ability of those apps to *change* this stuff (i.e. to configure which devices are auto-mounted) rather than to actually see the devices when they're plugged in.

----------

## Bartek Majka

You probably removed hal which is used to detect hotpluggable devices. So you need hal and udev - udev assigns the "plugdev" group to those devices' nodes (this is why you also need to be in "plugdev" group).

----------

## psycho

that's right, i did remove hal. the thing is though (as the o/p pointed out) "usage of hal is strongly discouraged". perhaps this is only meant to apply to the use flag for that one package, but the way it's worded it does sound like it's suggesting we ought to disable it system-wide...in which case, presumably there's an already functional alternative? the box i'm typing on now uses hal...when i get a chance i'll see if devices are being auto-detected on the udev-only laptop i set up last night...i was so happy to see that xorg 1.8's almost-automatically-configured evdev drivers could work with the touchpad, stylus, touchscreen and so on that i forgot to test removable media.

----------

