Project

General

Profile

Bug #5447

Fix DVD eject at shutdown

Added by Tails over 4 years ago. Updated almost 2 years ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

QA Check:
Feature Branch:
Type of work:
Research
Blueprint:
Starter:
No
Affected tool:

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 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.


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 over 4 years ago

  • Tracker changed from Feature to Bug

#2 Updated by intrigeri about 4 years ago

  • Starter set to No

#3 Updated by intrigeri over 3 years ago

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

#4 Updated by BitingBird over 3 years ago

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

#5 Updated by hybridwipe over 2 years ago

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

#6 Updated by intrigeri over 2 years ago

  • 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 over 2 years ago

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

  1. 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 about 2 years ago

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 about 2 years ago

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:

  1. 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

  1. 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 about 2 years ago

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 about 2 years ago

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 almost 2 years ago

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

Thanks!

#13 Updated by emmapeel almost 2 years ago

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.

Also available in: Atom PDF