Bug 132645 - unable to blank due to get_mmc_profile problem
unable to blank due to get_mmc_profile problem
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
:
Depends On:
Blocks: 131589
  Show dependency treegraph
 
Reported: 2004-09-15 10:27 EDT by Alexander Larsson
Modified: 2013-03-05 22:41 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-21 03:39:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Alexander Larsson 2004-09-15 10:27:22 EDT
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 10:31:06 EDT
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 09:01:24 EDT
Could you attach the output of list_cddrives on this machine?
Comment 3 Alexander Larsson 2004-09-16 09:30:15 EDT
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 19:39:04 EDT
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 01:55:43 EDT
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 01:58:21 EDT
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 06:33:20 EDT
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 10:36:31 EDT
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 10:37:20 EDT
Created attachment 103948 [details]
This is the patch needed.
Comment 10 David Zeuthen 2004-09-21 03:39:14 EDT
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.