Bug 132645 - unable to blank due to get_mmc_profile problem
Summary: unable to blank due to get_mmc_profile problem
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: hal
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Zeuthen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 131589
TreeView+ depends on / blocked
 
Reported: 2004-09-15 14:27 UTC by Alexander Larsson
Modified: 2013-03-06 03:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-21 07:39:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
This is the patch needed. (1.79 KB, patch)
2004-09-17 14:37 UTC, Alexander Larsson
no flags Details | Diff

Description Alexander Larsson 2004-09-15 14:27:22 UTC
On my testbox, its completely impossible to blank a cd using
nautilus-cd-burner, because for some reason get_mmc_profile fails, so
the media type is always CD_MEDIA_TYPE_UNKNOWN, which causes us to not
enable blanking.

I dunno whats causing this. It seems the ioctls in get_mmc_profile
fails for some unknown reason, even when you run as root.

Comment 1 Alexander Larsson 2004-09-15 14:31:06 UTC
Of course, you don't get told this. It just crashes due to bug 132479.

In gnome 2.6 you could force a blanking with a checkbox, but that has
been disabled.

Comment 2 Bastien Nocera 2004-09-16 13:01:24 UTC
Could you attach the output of list_cddrives on this machine?

Comment 3 Alexander Larsson 2004-09-16 13:30:15 UTC
This is not related to cddrive detection. It seems the drive doesn't
handle the media detection mmc commands or something like that. So,
all types become unknown.

This isn't a huge problem in some cases. I've fixed the
g_assert_not_reached() descrived in bug 132479, so things will still
work even when the type is CD_MEDIA_TYPE_UNKNOWN. However, this
totally breaks the auto-blanking feature, so there is really no way to
blank a cd.

Comment 4 Bastien Nocera 2004-09-16 23:39:04 UTC
list_cddrives also uses the MMC commands and shows the type of media
in each drive. The ouput of that command (probably with the debug
uncommented in the dvd_plus_rw_utils.cpp), and possibly with and
without a blank CD in the drive would greatly help.

Comment 5 Alexander Larsson 2004-09-17 05:55:43 UTC
I get it. You don't believe me. Here is the output, with some debug
output uncommented and some added:

Without media:
open /dev/hdc -> fd 3
GET CONFIGURATION failed with SK=5h/ASC=20h/ASCQ=00h
mmc_profile: 0xffffffff  -1
opened: 1
name: PLEXTOR CD-R PX-W8432T device: /dev/hdc max_speed_read: 32
type: CD Recorder/CD Drive
media type: Couldn't open media
GET CONFIGURATION failed with SK=5h/ASC=20h/ASCQ=00h
media size: -0.00 megs
CD-Recorder/SCSI devices only: max_speed_write: 32 id: /dev/hdc

With a non-blank cd-rw:
open /dev/hdc -> fd 3
GET CONFIGURATION failed with SK=5h/ASC=20h/ASCQ=00h
mmc_profile: 0xffffffff  -1
opened: 0
name: PLEXTOR CD-R PX-W8432T device: /dev/hdc max_speed_read: 32
type: CD Recorder/CD Drive
media type: Unknown Media
GET CONFIGURATION failed with SK=5h/ASC=20h/ASCQ=00h
media size: -0.00 megs
CD-Recorder/SCSI devices only: max_speed_write: 32 id: /dev/hdc

I get the same for a CDROM.

Comment 6 Alexander Larsson 2004-09-17 05:58:21 UTC
I should not that the "without media" case was with the door open. If
its closed i get the same as with any media.

Comment 7 Alexander Larsson 2004-09-17 10:33:20 UTC
2.8.1-1 has a patch that makes the crashes go away, but we're still
unable to blank if the GET CONFIGURATION request fails, since we don't
know whether blanking is required for the media type.

Comment 8 Alexander Larsson 2004-09-17 14:36:31 UTC
2.8.1-2 fixes the blanking for the non-hal case and is prepared for
the hal changes needed to make it work.

I'm assigning this to hal, since hal needs to apply the patch i sent
to the hal-list for this to work.

Comment 9 Alexander Larsson 2004-09-17 14:37:20 UTC
Created attachment 103948 [details]
This is the patch needed.

Comment 10 David Zeuthen 2004-09-21 07:39:14 UTC
This patch is in hal-0.2.98-4. Thanks.


Note You need to log in before you can comment on or make changes to this bug.