cd drive lock does not work after oneiric upgrade

Bug #854814 reported by Evan Broder on 2011-09-20
58
This bug affects 12 people
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Undecided
Unassigned

Bug Description

Because the eject button on my laptop's CD drive is highly susceptible to being pressed accidentally, I use "eject -i 1" to lock the CD drive from being ejected when the button is pressed.

After upgrading to oneiric, this stopped working. stracing eject shows that it is correctly finding the /dev/sr0 node, opening it, and ioctl'ing it correctly, but if I press the eject button afterwards, the drive still ejects.

access("/dev/cdrom", F_OK) = 0
readlink("/dev/cdrom", "sr0", 4095) = 3
lstat("/dev", {st_mode=S_IFDIR|0755, st_size=4280, ...}) = 0
lstat("/dev/sr0", {st_mode=S_IFBLK|0660, st_rdev=makedev(11, 0), ...}) = 0
readlink("/dev/sr0", 0x7fff9b7355e8, 4095) = -1 EINVAL (Invalid argument)
stat("/dev/sr0", {st_mode=S_IFBLK|0660, st_rdev=makedev(11, 0), ...}) = 0
open("/etc/mtab", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc535d19000
read(3, "rootfs / rootfs rw 0 0\nsysfs /sy"..., 1024) = 1020
stat("rootfs", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("sysfs", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("proc", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("udev", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("devpts", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("tmpfs", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("fusectl", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("/dev/disk/by-uuid/328dbf84-b767-4ad8-bd64-4a34b08d3c23", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 1), ...}) = 0
stat("none", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("none", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("none", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("none", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("none", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("binfmt_misc", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
stat("gvfs-fuse-daemon", 0x7fff9b738900) = -1 ENOENT (No such file or directory)
read(3, "", 1024) = 0
close(3) = 0
munmap(0x7fc535d19000, 4096) = 0
open("/etc/fstab", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=671, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc535d19000
read(3, "# /etc/fstab: static file system"..., 4096) = 671
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7fc535d19000, 4096) = 0
stat("/dev/sr0", {st_mode=S_IFBLK|0660, st_rdev=makedev(11, 0), ...}) = 0
geteuid() = 1000
open("/dev/sr0", O_RDWR|O_NONBLOCK) = 3
ioctl(3, CDROM_LOCKDOOR, 0x1) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc535d19000
write(1, "CD-Drive may NOT be ejected with"..., 47CD-Drive may NOT be ejected with device button
) = 47
exit_group(0) = ?

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-3.0.0-11-generic 3.0.0-11.18
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: CONEXANT Analog [CONEXANT Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: CONEXANT Analog [CONEXANT Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: evan 2036 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xd2620000 irq 47'
   Mixer name : 'Conexant CX20590'
   Components : 'HDA:14f1506e,17aa21ce,00100000'
   Controls : 8
   Simple ctrls : 5
Card29.Amixer.info:
 Card hw:29 'ThinkPadEC'/'ThinkPad Console Audio Control at EC reg 0x30, fw unknown'
   Mixer name : 'ThinkPad EC (unknown)'
   Components : ''
   Controls : 1
   Simple ctrls : 1
Card29.Amixer.values:
 Simple mixer control 'Console',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [off]
CheckboxSubmission: d27dbc9ce66475289526ca4b283ec487
CheckboxSystem: bb422ca46d02494cdbc459927a98bc2f
Date: Tue Sep 20 08:50:04 2011
HibernationDevice: RESUME=UUID=9322ffe7-f8c0-4ca1-a8f6-b972b86dd64a
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
MachineType: LENOVO 41786VU
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-11-generic root=UUID=328dbf84-b767-4ad8-bd64-4a34b08d3c23 ro quiet splash disable_ipv6=1 vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-11-generic N/A
 linux-backports-modules-3.0.0-11-generic N/A
 linux-firmware 1.60
SourcePackage: linux
StagingDrivers: mei
UpgradeStatus: Upgraded to oneiric on 2011-09-18 (2 days ago)
dmi.bios.date: 03/31/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 83ET53WW (1.23 )
dmi.board.asset.tag: Not Available
dmi.board.name: 41786VU
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr83ET53WW(1.23):bd03/31/2011:svnLENOVO:pn41786VU:pvrThinkPadT420:rvnLENOVO:rn41786VU:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 41786VU
dmi.product.version: ThinkPad T420
dmi.sys.vendor: LENOVO

Revision history for this message
Evan Broder (broder) wrote :
Brad Figg (brad-figg) on 2011-09-20
Changed in linux (Ubuntu):
status: New → Confirmed
Evan Broder (broder) on 2011-09-20
tags: added: regression-release
Revision history for this message
Brad Figg (brad-figg) wrote : Test with newer development kernel (3.0.0-12.19)

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.0.0-12.19
Revision history for this message
Evan Broder (broder) wrote :

Still doesn't work with 3.0.0-12.19

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Brad Figg (brad-figg) wrote : Test with newer development kernel (3.0.0-12.20)

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.0.0-12.20
Revision history for this message
Evan Broder (broder) wrote :

Still doesn't work with 3.0.0-12.20

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

tags: added: needs-upstream-testing
Revision history for this message
Evan Broder (broder) wrote :

Does not work with 10/4/11 daily kernel (0f86267b)

tags: removed: kernel-request-3.0.0-12.19 kernel-request-3.0.0-12.20 needs-upstream-testing
Revision history for this message
Brad Figg (brad-figg) wrote :

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.0.0-12.20
Revision history for this message
Evan Broder (broder) wrote :

Whoops - I guess I removed a few too many tags

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

This issue appears to be an upstream bug, since you tested the latest upstream kernel. Would it be possible for you to open an upstream bug report at bugzilla.kernel.org? That will allow the upstream Developers examine the issue, and may provide a quicker resolution to the bug.

It would be great if you can report back the upstream bug number in this bug report, so this bug can be linked to the upstream report.

Revision history for this message
mazurkin (mazurkin) wrote :

There is a corresponding report in Arch's forum about udev : https://bugs.archlinux.org/task/25838

Revision history for this message
mazurkin (mazurkin) wrote :

There is /lib/udev/cdrom_id but the following command doesn't lock the tray either

sudo /lib/udev/cdrom_id --lock-media --debug /dev/dvd

Revision history for this message
Timon_and_Pumba (timonterbraak) wrote :

In my case, I experience the opposite of the problem described.
I cannot eject my optical disk as it it always locked, despite my configuration value:

dev.cdrom.lock = 0

Every time I insert a disk, the drive is locked. When I issue the command

$ eject -i off

which is essentially a

$ ioctl(fd, CDROM_LOCKDOOR, 0)

then the eject button works fine again.

So, it seems that the configuration value in dev.cdrom.lock is not reprected anymore and thus the drive locking is setting (another) default value?

Revision history for this message
Tim Booth (tbooth) wrote :

Seems to me that "/lib/udev/cdrom_id --eject-media $device" as called by /lib/udev/rules.d/60-cdrom_id.rules is trying too hard. It should respect the lock flag on the device, maybe with a "--force" option to eject regardless. Anyway this is surely a udev bug not a kernel bug.

TIM

affects: linux (Ubuntu) → udev (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers