Bug #5447

Fix DVD eject at shutdown (on some computers)

Added by Tails 2013-07-18 07:41:14 . Updated 2018-03-28 09:43:06 .

Status:
Rejected
Priority:
Normal
Assignee:
anonym
Category:
Target version:
Start date:
Due date:
% Done:

0%

Feature Branch:
Type of work:
Research
Blueprint:

Starter:
0
Affected tool:
Deliverable for:

Description

Two probably related 0.14 regressions:

It might be that the old inverted logic bug that forced us to pretend to lock the DVD eject button in order to effectively unlock it, was fixed. Who knows.

> Indeed, linux 2.6.38-rc1 [[reworked disk event handling|http://lwn.net/Articles/423619/]]
> and adds block.events_dfl_poll_msecs that can be used to set the
> interval for polling block devices for events. This does not seem
> to work properly though: settings it to 1000 makes it work in
> VirtualBox with its virtual CD-ROM drive, but no value seems to work
> on the one real machine I have available with a CD-ROM drive.


Subtasks


Related issues

Related to Tails - Feature #7194: Check the status of #5447 and #5677 and update /doc/first_steps/shutdown/ accordingly Resolved

History

#1 Updated by intrigeri 2013-07-19 02:59:00

  • Tracker changed from Feature to Bug

#2 Updated by intrigeri 2013-09-30 07:56:52

  • Starter set to No

#3 Updated by intrigeri 2014-05-10 01:51:15

  • related to Feature #7194: Check the status of #5447 and #5677 and update /doc/first_steps/shutdown/ accordingly added

#4 Updated by BitingBird 2014-06-09 10:48:35

  • Subject changed from fix DVD eject at shutdown to Fix DVD eject at shutdown

#5 Updated by hybridwipe 2015-08-09 23:36:47

With tails 1.4.1, sudo eject fails, but sudo eject -m works for me (running the iso in VirtualBox)

#6 Updated by intrigeri 2015-08-18 05:40:47

  • Assignee set to hybridwipe
  • QA Check set to Info Needed

> With tails 1.4.1, sudo eject fails, but sudo eject -m works for me (running the iso in VirtualBox)

Did you run these commands by hand, or in the udev-watchdog-wrapper?
By the way, I think that one needs to restart it after modifying it, which might be tricky to do without triggering the emergency shutdown. Building an ISO with this change would be an easier and more convincing way to test.

#7 Updated by hybridwipe 2015-08-26 12:19:59

intrigeri wrote:
> > With tails 1.4.1, sudo eject fails, but sudo eject -m works for me (running the iso in VirtualBox)
>
> Did you run these commands by hand, or in the udev-watchdog-wrapper?

I was running the commands by hand.

> By the way, I think that one needs to restart it after modifying it, which might be tricky to do without triggering the emergency shutdown. Building an ISO with this change would be an easier and more convincing way to test.

Sure. I built from devel branch (currently 569ac94ef99590ff59bc5ee21dd8f2e94f19d2a2), and tested that, which gave the same results as before, namely:

  • ‘sudo eject’ fails to eject the disk
  • ‘sudo eject -m’ works

I then made this change to the code:
diff —git a/config/chroot_local-includes/usr/local/sbin/udev-watchdog-wrapper b/config/chroot_local-includes/usr/local/sbin/udev-watchdog-wrapper
index ac9d108..b29ebfb 100755
—- a/config/chroot_local-includes/usr/local/sbin/udev-watchdog-wrapper
+ b/config/chroot_local-includes/usr/local/sbin/udev-watchdog-wrapper
@@ –82,7 +82,7 @@ DEV_TYPE=“${DEV_TYPE_LINE#*=}”
# event. See [[bugs/sdmem_on_eject_broken_for_CD]].
# FIXME: we might be able to do the more sane “-i off” with future kernel/udev
if [ “$DEV_TYPE” = “cd” ]; then
- eject -i on “${BOOT_DEVICE}” 2>&1 >/dev/null
+ /usr/bin/eject -i off “${BOOT_DEVICE}” 2>&1 >/dev/null
fi

# Start udev-watchdog and stop on clean exit.

and rebuilt. With that change, I see the same results:

  • ‘sudo eject’ fails to eject the disk
  • ‘sudo eject -m’ works

#8 Updated by intrigeri 2015-10-23 08:15:27

Thanks for all the tests and information! Sounds like we’re closer to fixing an old, painful issue :)

Just to confirm we’re on the same page, this ticket is about this scenario:

When I start Tails from DVD
And I press the Eject button
Then Tails is automatically shut down
And The Tails DVD is ejected

Can you please confirm that:

  1. on current Tails, everything works except that the DVD is not ejected;
  2. adding the -m option and replacing -i on with -i off (in the same ISO image) makes this scenario work fully.

?

#9 Updated by hybridwipe 2015-10-28 17:04:31

intrigeri wrote:
> Thanks for all the tests and information! Sounds like we’re closer to fixing an old, painful issue :)
>
> Just to confirm we’re on the same page, this ticket is about this scenario:
>
> […]
>
> Can you please confirm that:
>
> # on current Tails, everything works except that the DVD is not ejected;

No. I built 1.7-rc1 (no changes), burned to DVD and put in desktop. Booted tails, and once logged in, pressed DVD eject button. Tails did NOT shut down. ‘eject -m’ (as amnesia, not root) triggered an emergency shutdown

> # adding the -m option and replacing -i on with -i off (in the same ISO image) makes this scenario work fully.

Those changes make no difference. Eject button still fails, eject -m still works.

#10 Updated by intrigeri 2015-11-01 06:49:01

OOOOOOK. Then I’m afraid I don’t understand what exact problem you’re working on solving. Can you please clarify? (using the Gherkin “Given/When/Then” format may help.)

#11 Updated by hybridwipe 2015-11-01 19:49:49

intrigeri wrote:
> OOOOOOK. Then I’m afraid I don’t understand what exact problem you’re working on solving. Can you please clarify? (using the Gherkin “Given/When/Then” format may help.)

I didn’t report it, just trying to fix bugs I find interesting ;). Anyway, from the report:
When I start Tails from DVD
And I press the Eject button
Then Tails is automatically shut down
And The Tails DVD is ejected

This does not happen with 1.7-rc1. Typing ‘eject -m’, however, does shut down Tails and eject the DVD.

#12 Updated by intrigeri 2016-02-28 14:05:33

  • Description updated
  • Assignee deleted (hybridwipe)
  • QA Check deleted (Info Needed)
  • Type of work changed from Test to Research

Thanks!

#13 Updated by emmapeel 2016-03-04 08:59:33

User reports that when running Tails 2.0, 2.0.1 and 2.2~rc1 , DVD is not ejected when shutting down by the menu button, even when complete shutdown happens.

This makes it impossible, at least on that specific hardware (Desktop PC with Samsung internal DVD rewriter) to retrieve the DVD with normal shutdown. Only with emergency shutdow is possible to retrieve the DVD.

#14 Updated by Anonymous 2018-01-19 17:17:41

Is this still an issue?

#15 Updated by sajolida 2018-02-06 18:05:22

  • Subject changed from Fix DVD eject at shutdown to Fix DVD eject at shutdown (on some computers)

#16 Updated by anonym 2018-02-06 18:10:17

  • Assignee set to anonym
  • Target version changed from Hole in the Roof to Tails_3.6

TODO:

  • try to reproduce on all my DVD readers (I know I wasn’t affected by this when preparing Tails 3.5, when I did this after doing the squashfs sort profiling)
  • ask frontdesk if this seems to be an issue still

#17 Updated by anonym 2018-02-09 11:39:36

I’ve asked Tails testers if this is still a problem: https://mailman.boum.org/pipermail/tails-testers/2018-February/000953.html

#18 Updated by anonym 2018-02-09 15:22:00

anonym wrote:
> TODO:
> * try to reproduce on all my DVD readers (I know I wasn’t affected by this when preparing Tails 3.5, when I did this after doing the squashfs sort profiling)

Not done yet.

> * ask frontdesk if this seems to be an issue still

Done!

#19 Updated by anonym 2018-02-10 10:30:04

anonym wrote:
> anonym wrote:
> > * ask frontdesk if this seems to be an issue still
>
> Done!

I got this answer from the Help desk team: “re Bug #5447 only one of us saw it like maybe 3 times very long ago.” So unless the question I sent to tails-testers@ uncovers something, I’ll reject this ticket. I’ll give them until the end of this (3.6) cycle.

#20 Updated by sajolida 2018-02-23 17:34:13

This should include updating the “Tails DVD eject failure” issue in our known issues.

#21 Updated by bertagaz 2018-03-14 11:32:04

  • Target version changed from Tails_3.6 to Tails_3.7

#22 Updated by intrigeri 2018-03-28 09:43:06

  • Status changed from Confirmed to Rejected