CD/DVD tray ejects on boot or waking from suspend

Bug #1942299 reported by Chris Guiver
74
This bug affects 12 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
High
Unassigned
Bionic
Fix Released
High
Unassigned
Focal
Fix Released
High
Unassigned
Hirsute
Fix Released
High
Unassigned
Impish
Fix Released
High
Unassigned

Bug Description

[Impact]

A regression was introduced via upstream -stable patches which causes the CD / DVD rom drive to open when the system boots, or wakes from suspend.

This has had some side effects on some systems where you cannot insert media at all, since the drive will eject as soon as the tray is closed.

The problematic patch is:

commit 7dd753ca59d6c8cc09aa1ed24f7657524803c7f3
Author: ManYi Li <email address hidden>
Date: Fri Jun 11 17:44:02 2021 +0800
Subject: scsi: sr: Return appropriate error code when disk is ejected
Link: https://github.com/torvalds/linux/commit/7dd753ca59d6c8cc09aa1ed24f7657524803c7f3

This was backported to:

Bionic 4.15.0-155-generic
Focal 5.4.0-82-generic
Hirsute 5.11.0-32-generic
Impish 5.13.0-1-generic

[Fix]

The issue was fixed in the below commit:

commit 5c04243a56a7977185b00400e59ca7e108004faf
Author: Li Manyi <email address hidden>
Date: Mon Jul 26 19:49:13 2021 +0800
Subject: scsi: sr: Return correct event when media event code is 3
Link: https://github.com/torvalds/linux/commit/5c04243a56a7977185b00400e59ca7e108004faf

This patch is already applied to Ubuntu kernels through upstream -stable, and will land in the following releases, currently in -proposed:

Bionic 4.15.0-159-generic
Focal 5.4.0-87-generic
Hirsute 5.11.0-37-generic
Impish 5.13.0-16-generic

[Testcase]

If your machine is affected, the CD / DVD rom drive will eject and / or open during boot or waking from suspend.

This can be seen on some hypervisors, particularly VMware.

[Where problems could occur]

Revision history for this message
Chris Guiver (guiverc) wrote :
description: updated
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote : Re: On booting Lubuntu impish daily - cd/dvd tray ejects

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1942299

tags: added: iso-testing
Revision history for this message
Chris Guiver (guiverc) wrote (last edit ):

I booted the same media on

- hp dc7700 (c2d-e6320, 5gb, nvidia quadro nvs 290)
- hp dc7900 (c2d-e8400, 4gb, intel 4 series integrated i915)
- hp 8200 elite sff (i5-2400, 8gb, nvidia quadro 600)
- dell [optiplex] 755 (c2d-e6850, 5gb, amd/ati radeon rv516/x1300/x1550)
- lenovo thinkpad sl510 (c2d-t6570, 2gb ram, i915)

no ejecting of CD/DVD tray on boot.

OF NOTE:

I shutdown my primary box where I reported the CD/DVD tray ejecting last week+ when I wake from suspend but NO ISSUES or ejecting of CD/DVD tray on boot (note: 7 wakes may take 10 days as I don't always turn box off)

- dell [optiplex] 960 (c2q-q9400, 8gb, amd/ati cedar radeon hd 5000/6000/7350/8350)

Revision history for this message
Chris Guiver (guiverc) wrote (last edit ): Re: On booting (or wake from suspend) Ubuntu/Lubuntu impish daily - cd/dvd tray ejects

Ubuntu daily today on same
- dell [optiplex] 780 (c2q-q9400, 8gb, amd/ati cedar radeon hd 5000/6000/7350/8350)

** First boot (eject on boot)
First boot; and CD/DVD ejects most likely just before plymouth (real life drew my attention away from box; I looked back when I heard tray being ejected & plymouth was then visible; it hadn't been before hand)...

** Second boot (no eject on boot; eject on wake-from-suspend)
Second boot; CD/DVD tray did NOT eject this time at boot !?

I played a little; then suspended system; it was sat idle as I looked out window at galahs/corella feeding briefly

On waking from suspend - CD/DVD tray ejects.. as it's been doing on my PRIMARY workstation (dell d960 optiplex)

I did a second suspend (but forgot to close tray; oh well)... waited and on wake the CD/DVD tray inserted itself at the start of the resume .. box recovered (music started, paused, continued) then CD/DVD tray ejected again.

I closed tray, let box sit awhile (looked at birds), then suspended third time..
Waited (look out windows), resumed and sound start/stops until it's resumed correctly but not before CD/DVD tray has ejected again.

summary: - On booting Lubuntu impish daily - cd/dvd tray ejects
+ On booting (or wake from suspend) Ubuntu/Lubuntu impish daily - cd/dvd
+ tray ejects
Revision history for this message
Chris Guiver (guiverc) wrote :

Ubuntu impish daily boot on
- dell [optiplex] 780 (c2q-q9400, 8gb, amd/ati cedar radeon hd 5000/6000/7350/8350)

the CD/DVD tray ejected whilst a black screen was still shown both displays... boot messages then wrote on screen so it was a fair bit before plymouth I'd say by this boot

Revision history for this message
Chris Guiver (guiverc) wrote :

This issue still gets noticed daily; as I wake my primary box from it's suspended sleep.

I just noticed https://bugs.launchpad.net/ubuntu/+source/udev/+bug/1943379

which refers to https://bugzilla.kernel.org/show_bug.cgi?id=213759
and fix https://github.com/torvalds/linux/commit/5c04243a56a7977185b00400e59ca7e108004faf which maybe related...

Revision history for this message
Veron Rado (junket) wrote :

This happens on 20.04 LTS Focal too.
Bug posted here
https://bugs.launchpad.net/ubuntu/+bug/1943616

Changed in linux (Ubuntu Impish):
status: Confirmed → Fix Committed
Changed in linux (Ubuntu Hirsute):
status: New → Fix Committed
Changed in linux (Ubuntu Focal):
status: New → Fix Committed
Changed in linux (Ubuntu Bionic):
status: New → Fix Committed
importance: Undecided → High
Changed in linux (Ubuntu Focal):
importance: Undecided → High
Changed in linux (Ubuntu Hirsute):
importance: Undecided → High
Changed in linux (Ubuntu Impish):
importance: Undecided → High
description: updated
tags: added: bionic focal hirsute regression-update sts
summary: - On booting (or wake from suspend) Ubuntu/Lubuntu impish daily - cd/dvd
- tray ejects
+ CD/DVD tray ejects on boot or waking from suspend
Revision history for this message
Matthew Ruffell (mruffell) wrote :

Hi everyone,

The kernels with the fix "scsi: sr: Return correct event when media event code is 3" were released to -updates yesterday.

Could you please install the latest kernel update, and double check that it fixes the issue for you?

List of new kernels:
Bionic 4.15.0-155-generic
Focal 5.4.0-82-generic
Hirsute 5.11.0-32-generic
Impish 5.13.0-1-generic

Thanks,
Matthew

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Sorry, the list of fixed kernels should be:

Bionic 4.15.0-159-generic
Focal 5.4.0-87-generic
Hirsute 5.11.0-37-generic
Impish 5.13.0-16-generic

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu Focal):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu Impish):
status: Fix Committed → Fix Released
Revision history for this message
Chris Guiver (guiverc) wrote :

Lubuntu impish:

I haven't noticed it (tray eject) in impish on my primary box for awhile (since I last rebooted most likely; uptime 10 days)

- dell [optiplex] 960 (c2q-q9400, 8gb, amd/ati cedar radeon hd 5000/6000/7350/8350)

or at least my last QA-test install on another box

- dell [optiplex] 780 (c2q-q9400, 8gb, amd/ati cedar radeon hd 5000/6000/7350/8350)

I didn't go looking for it specifically; but did note it in the QA-test report(s) I filed (ISO dated 20210925 most probably going by Lubuntu QA Checklist) as the tray used to eject during boot (that box is used in QA-testing at least once every 5-8 days)

My current system is running `5.13.0-16-generic` I note.

Revision history for this message
Veron Rado (junket) wrote (last edit ):

Fixed after updating to the latest kernel:
Linux 5.4.0-88-generic

(on Ubuntu 20.04 LTS Focal amd64)

Thank you :)

Revision history for this message
Liam Proven (lproven) wrote :

Bug still present. Affects 22.04.1 on multiple Lenovo Thinkpads for me.

I have found this report:

https://askubuntu.com/questions/1238485/ubuntu-20-04-cd-drive-keeps-opening-closing-randomly

Tried the fix; does not help.

That links to this:

https://superuser.com/questions/1343049/dvd-drive-opening-automatically

Tried that much longer fix. Does not help.

This bug is likely to lead to hardware failure through simple mechanical damage.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.