SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-12-30 15:19:45

Agnus
Member
From: Düsseldorf
Registered: 2012-10-16
Posts: 47
Website

Help! I'm going crazy: Debian based distros and cd audio playback ...

Hello everybody,
I have searched this forum, I checked google - but I just couldn't find a proper explanation for my problem:

A few days ago I wanted to play an audio cd I bought at a live show. I put the cd in my dvd rom drive and waited for banshee to detect the cd - no luck. I tried the same with rhythmbox: again no luck. I tried sound juicer in order to rip the songs off the cd - no cd detected. Whatever program I tried, most of them simply time out trying to find the cd. Well, it might be the dvd rom drive you may think? I installed Windows 7 on a second hdd, booted it on the same machine and was able to play the cd. On the same machine and dvd rom drive that wouldn't work with #! (I'm running Waldorf). Oh, and that cd issue does not only seem to be a problem with #! - it's also an issue with Ubuntu Linux as well: I booted Ubuntu, again on the same pc, and faced the same effect: no cd detected by banshee, rhythmbox, sound juicer, kscd ...

It even seems to happen with different hardware: my girlfriend runs Ubuntu 12.04 on her Mac mini and she's facing the same problem: no audio cd detected by any of the standard audio programs that come with Debian, #! or Ubuntu.

There seems to be quite a number of people out there who face the same problem. I haven't yet tried SuSE or Fedora or Arch Linux - but to me it seems that at least most Debian based distros share this problem. I tried changing the udev rules for the optical devices, but that didn't fix the problem. Oh and yes, the dvd rom works fine with any of these distros when reading plain data cds/dvds.

Eventually, I found two programs, one for playing and one for ripping audio cds that seem to work  (at least in my case, on my hardware: a stock pc and a Mac mini): kplayer seems to be the only program on Debian and Ubuntu to properly recognize and playback any audio cd. And ripperX seems to be the only ripping tool that also properly recognizes cds and is able to rip them.

My question is: does anyone else have similar problems? Can anyone confirm that this seems to be a common problem with #!, Debian and  Ubuntu? Or am I just going crazy?

Last edited by Agnus (2012-12-30 15:24:45)


All human evil comes from a single cause, man's inability to sit still in a room. -- Blaise Pascal

Offline

Be excellent to each other!

#2 2012-12-30 18:47:45

swftech
#! CrunchBanger
From: SW Florida
Registered: 2012-06-08
Posts: 106
Website

Re: Help! I'm going crazy: Debian based distros and cd audio playback ...

I am dual booting 2 Debian sid distros (LinuxBBQ Kielbasa) and (siduction) and both notice audio cd's just fine. I also have Linux Mint 14 Xfce on a laptop and it also notices audio cd's without a problem. Question, is your cd/dvd player internal or external connected through usb?
Also could you post the output of

"lspci" and "uname -a"

?

Offline

#3 2012-12-30 19:32:16

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,631
Website

Re: Help! I'm going crazy: Debian based distros and cd audio playback ...

The question is if the CDs are actually recognized (by the system, not the player) and if it happens to any kind of CD, DVD, CD-RW or only to audio CDs.

Offline

#4 2012-12-30 19:36:33

fatmac
#! Die Hard
Registered: 2012-11-14
Posts: 1,948

Re: Help! I'm going crazy: Debian based distros and cd audio playback ...

Another program to try is cdparanoia, that should rip tracks from cd without any problems.

Edit: Sorry, not installed on the default #!

Last edited by fatmac (2012-12-30 19:38:12)


Linux since 1999
Currently:  AntiX, & Crunchbang.
A good general beginners book for Linux :- http://rute.2038bug.com/index.html.gz
A good Debian read :- http://debian-handbook.info/get/now/

Offline

#5 2012-12-30 21:08:35

FreewheelinFrank
#! Member
Registered: 2012-02-24
Posts: 78
Website

Re: Help! I'm going crazy: Debian based distros and cd audio playback ...

Is it an ordinary CD or an "enhanced" CD (CD Extra or CD Plus or something like that)?

Offline

#6 2012-12-31 00:26:47

antiv0rtex
#! Die Hard
From: Earth
Registered: 2012-10-05
Posts: 574

Re: Help! I'm going crazy: Debian based distros and cd audio playback ...

I have used Asunder under many different distributions to rip CD's to uncompressed WAV; I've never encountered any problems.

Offline

#7 2012-12-31 00:43:49

simplicissimus
New Member
Registered: 2009-09-07
Posts: 5

Re: Help! I'm going crazy: Debian based distros and cd audio playback ...

I can add two more players that can play audioCDs out of the box - parole (xfce player) and audacious (with audacious-plugins package: open the playlist and chose "ADD/Plugin Services/Play CD").

The problem is caused probably by the changes introduced with udev and gvfs. The CD/DVD-drive (in my machine /dev/sr0) is now mapped neither to /cdrom directory nor to /dev/cdrom - which are the defaults compiled into most players - but to /dev/cdrom1. The /cdrom directory remains always empty and the cdrom link in the /dev directory points to sr1, which is the first (pseudo)partition of  a data CD, but has no sense with CD-audio. Changing that link to sr0 causes some players and rippers to cease ignoring audio CDs, but after the reboot the initial settings are restored by udev. Some rippers eg. ripoff or asunder have an option in the preferences menu to setup the CD-ROM device (important in systems with more CD-drives) - typing the proper device name ends the problem.

Moreover, after inserting an audioCD into the drive, a subdirectory named "/cdda mount on sr0" (with spaces!) is created in the hidden ~/.gvfs directory, which contains all the tracks as .wav files, that can be played by any player, including command line play (from sox package). And some players eg. qmmp can open an audio-CD as a stream with "cdda://" URL.

Offline

#8 2012-12-31 11:00:50

Agnus
Member
From: Düsseldorf
Registered: 2012-10-16
Posts: 47
Website

Re: Help! I'm going crazy: Debian based distros and cd audio playback ...

simplicissimus wrote:

I can add two more players that can play audioCDs out of the box - parole (xfce player) and audacious (with audacious-plugins package: open the playlist and chose "ADD/Plugin Services/Play CD").

The problem is caused probably by the changes introduced with udev and gvfs. The CD/DVD-drive (in my machine /dev/sr0) is now mapped neither to /cdrom directory nor to /dev/cdrom - which are the defaults compiled into most players - but to /dev/cdrom1. The /cdrom directory remains always empty and the cdrom link in the /dev directory points to sr1, which is the first (pseudo)partition of  a data CD, but has no sense with CD-audio. Changing that link to sr0 causes some players and rippers to cease ignoring audio CDs, but after the reboot the initial settings are restored by udev. Some rippers eg. ripoff or asunder have an option in the preferences menu to setup the CD-ROM device (important in systems with more CD-drives) - typing the proper device name ends the problem.

Moreover, after inserting an audioCD into the drive, a subdirectory named "/cdda mount on sr0" (with spaces!) is created in the hidden ~/.gvfs directory, which contains all the tracks as .wav files, that can be played by any player, including command line play (from sox package). And some players eg. qmmp can open an audio-CD as a stream with "cdda://" URL.

Thanks, simplicissimus - I think your explanation seems to fit to my problem. I noticed when I was tinkering with the udev rules, that I have quite a lot of entries for my two cd rom drives (one is usb, the other is the internal dvd drive). Entries go up to /dev/cdrom4 but there is no rule for a /dev/cdrom. I wonder why I have so many entries here, but it looks like this is caused by my usb cdrom drive.

Running mplayer cdda:// on the console gives me this error message:

$ mplayer cdda://
MPlayer2 UNKNOWN (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing cdda://.
++ WARN: Can't get file status for /dev/cdrom:
No such file or directory

++ WARN:  could not retrieve file info for `/dev/cdrom': No such file or directory
++ WARN:  can't open nrg image file /dev/cdrom for reading
Can't open CDDA device.
Failed to open cdda://.

Exiting... (End of file)

I manually edited my udev rules file and now have a /dev/cdrom device linked to sr0.  In addition, at least some of the programs that weren't working before that change (including mplayer, vlc and parole) now do the trick. However, this is still not the case with banshee and rhythmbox.

My fix is the following entry in a new rule file named /etc/udev/rules.d/75-cdrom.rules:

# Custom CD-ROM symlinks
SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="cdrom cdrw dvd dvdrw"

To sum things up:

1.) Data DVDs and CDs can be read by the drive without a fuzz.
2.) The internal drive  can burn .iso images and boot from them.
3.) The internal drive plays DVDs.
4.) Audio CDs (of *any* kind: copy-protected, burned, original but non-protected cds) are not detected by most programs (except: kplayer) *until* I manually apply my 'workaround' udev rule.
5.) Even with the udev rules edited to create a /dev/cdrom device, some programs like banshee and rhythmbox still refuse to detect audio cds.
6.) There seems to be a problem regarding the 'cdda://' location, as it still resolves to /dev/cdrom (see mplayer error message above)

Conclusion:

As simplicissimus put it, and looking at my workaround to that problem, it seems to be a problem with udev rules and gvfs. While the rules are already changed to reflect recent changes in the naming scheme of udev, some programs still expect /dev/cdrom and fail to access it. In addition, the location 'cdda://' seems to be mapped to /dev/cdrom, which causes further problems with all programs that rely on 'cdda://' to resolve to the correct optical drive. I will not say that this issue is solved, but at least it is not a problem regarding the cdrom driver or kernel functions and there is kind of a workaround to this.  Also, as I can read in some of the replies, not all installations are affected by this problem.

Last edited by Agnus (2012-12-31 11:08:32)


All human evil comes from a single cause, man's inability to sit still in a room. -- Blaise Pascal

Offline

#9 2012-12-31 13:45:21

simplicissimus
New Member
Registered: 2009-09-07
Posts: 5

Re: Help! I'm going crazy: Debian based distros and cd audio playback ...

And now the funniest thing, which I have not noticed up to now, as I work with my files in midnight commander rather than in a grapical file manager. When you open one - be it Thunar or PCManFM - the Audio Disk is quietly shown in the side pane, and the tracks in the main window - with the .wav extension. You simply click and play them with the system's default player. Naturally, file managers should have better understanding of the current gvfs tricks than audioplayers, especially not very recent ones.

Concerning mplayer, I strongly suspect that it is hard encoded to look for the cdda:// location in the /dev/cdrom directory. The XCFA ripper, which uses mplayer to pre-listen tracks before ripping, can somehow force it to play an indicated track, but it does it with "hiccup", pausing every 2-3 seconds, as it had very limited access to the CD.

Last edited by simplicissimus (2012-12-31 13:47:14)

Offline

#10 2012-12-31 14:22:00

Agnus
Member
From: Düsseldorf
Registered: 2012-10-16
Posts: 47
Website

Re: Help! I'm going crazy: Debian based distros and cd audio playback ...

Okay, I think I've got it - eventually something, somehow, messed up my 70-persistent-cd.rules file. This is where all the trouble begins. I have been able to have the system re-generate the contents of that file and now all udev device links are correct ( e.g. /dev/cdrom --> /drv/sr0 etc.). Here's what I did:

I emptied /etc/udev/rules.d/70-persistent-cd.rules and noticed, that the cdrom rules get re-generated during the next boot as long as an empty 70-persistent-cd.rules file exists. So I removed all lines in that file, except for the comments, unplugged my usb cdrom and rebooted. After the reboot  /dev/cdrom showed up again. I plugged in my usb cdrom and after a second, /dev/cdrom1 showed up as well. My /etc/udev/rules.d/70-persistent-cd.rules is now re-generated and works fine after reboot. Looks like something messed it up during / after installation. Creating an empty 70-persistent-cd.rules file and rebooting without any external cd/dvd rom drive fixed this issue for me.

Now, mplayer and the likes do work properly with cdda:// - as for banshee: if you go to "media --> open location --> cdda://" it starts to play the first track on the cd. Still, it does not show the cd in the sidebar (plungin for CD media is enabled). Rhythmbox now works fine again, showing the cd in the sidebar. Thank you, simplicissimus, for pointing me in the right direction. Now the issue can be marked as solved smile


All human evil comes from a single cause, man's inability to sit still in a room. -- Blaise Pascal

Offline

#11 2012-12-31 21:26:31

simplicissimus
New Member
Registered: 2009-09-07
Posts: 5

Re: Help! I'm going crazy: Debian based distros and cd audio playback ...

Now it is my turn to thank you. You were extremely right!!! I looked the 70-persistent-cd.rules file and found that udev reserved the cdrom symlink for my Huawei USB-GSMmodem, which is my unique connection with the web, and was of course plugged on during the install of the system. Apart of the modem unit, it has a flash memory card slot (an empty one, by the way), that was recognized as Huawei_Mass_Storage (pci-0000:00:10.1-usb...) and assigned to /dev/cdrom. The internal CD/DVD drive, from which the system has been installed, was treated as secondary (pci-0000:00:11.0-scsi...) and assigned to /dev/cdrom1, /dev/cdrw1, /dev/dvd1 and /dev/dvdrw1.

So I quickly corrected the assignments, saved a backup copy of the file and began experimenting. I discovered, that auto-recreating of the 70-persistent-cd.rules was in my case not so simple. As long as there was only one internal CD/DVD drive, the symlinks in the /dev directory were created properly, but no rules showed up in the emptied file neither at once nor after reboot. When I inserted the modem, the symlink /dev/cdrom changed to the external device, and the internal drive received the symlink /dev/cdrom1 (remaining anyway pointed to by /dev/dvd, /dev/dvdrw and /dev/cdrw). Simultaneously in the 70-persistent-cd file a rule appeared assigning /dev/cdrom to the Huawei-mass-storage. For the internal drive no rule was created up to the reboot. After rebooting I found rules fixing the internal drive to cdrom1, cdrw1, dvd1 and dvdrw1. If I cleared them and left only a rule to consider external modem as cdrom1, then rules were added (after reboot) treating the internal drive as cdrom2, cdrw2, ... and so on.

Without any rules udev was able to change the /dev/cdrom link to the external device even when I plugged the modem during ripping an audioCD from the internal drive. The progress bar of the ripper stopped then, the names of the tracks shaded and the target files showed no increase until removing the modem. Then the symlink reverted to sr0, and the ripping resumed. Is that obstinacy determined by the lower position of my external device on the pci-bus??? Your results show that it is not a case of a hidden preference for usb devices. Well, to sum up:

1. The bug can occur only in systems with two and more CD/DVD drives, or devices that can be (mis)recognised as such.

2. Even then, the created persistent rules may incidentally satisfy the users.

3. If not, I see no way of forcing the proper assignment except editing the rules file by hand.

Offline

#12 2012-12-31 22:35:48

Agnus
Member
From: Düsseldorf
Registered: 2012-10-16
Posts: 47
Website

Re: Help! I'm going crazy: Debian based distros and cd audio playback ...

simplicissimus wrote:

Well, to sum up:

1. The bug can occur only in systems with two and more CD/DVD drives, or devices that can be (mis)recognised as such.
2. Even then, the created persistent rules may incidentally satisfy the users.
3. If not, I see no way of forcing the proper assignment except editing the rules file by hand.

Exactly. I agree with 1.) and 2.) and, in that case, fully acknowledge to 3.) to be the best way of getting things sorted out.

Conclusion:

1.) At least with #! (and probably any Debian based distro) you better plug off any usb devices during installation.

Hehe, another good reason to switch to #! - you got a problem, there is at least one person who is looking for a solution to the same problem. Because #! people tend to care and talk. Really like that.


All human evil comes from a single cause, man's inability to sit still in a room. -- Blaise Pascal

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo