You are not logged in.

#1 2011-02-28 20:14:14

Young
Member
Registered: 2009-04-26
Posts: 50

DVD tray closing right after opening.

Hi, everybody!

I just bought a sata DVD recorder and I'm having some problems with it. During the startup, I receive the following message repeatedly:

ata4: hard resetting link
ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata4.00: configured for UDMA/100
ata4: EH complete
ata4.00: exception Emask 0x100 SAct 0x0 SErr 0x0 action 0x6
ata4: hard resetting link

Then, when I try to open the tray, it closes right after opening (either by pressing the eject button or using the command line). Even with only one second, I managed to insert a disc, just to see if the system would recognize it. The DVD was read normally, but I almost broke the disc trying to insert it on the drive. First, I thought it could be a problem with the drive, so I replaced it with another model, but the problem persisted. I have dual boot with Windows XP and the problem is not happening in that OS. I don't know what kind of information would be useful to provide. My system is up-to-date and I tried both a Samsung drive and a LG (which is the current one).

Thanks.

Offline

#2 2011-02-28 20:29:50

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: DVD tray closing right after opening.

Offline

#3 2011-02-28 20:59:08

Young
Member
Registered: 2009-04-26
Posts: 50

Re: DVD tray closing right after opening.

I tried, but the double eject is still happening. Any other ideas?

Offline

#4 2011-02-28 22:51:56

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: DVD tray closing right after opening.

Offline

#5 2011-02-28 23:20:07

Young
Member
Registered: 2009-04-26
Posts: 50

Re: DVD tray closing right after opening.

I tried all the suggestions from that post, but the result is the same. The tray still opens and closes immediately after.

Last edited by Young (2011-02-28 23:22:17)

Offline

#6 2011-03-01 20:36:19

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: DVD tray closing right after opening.

Perhaps https://bbs.archlinux.org/viewtopic.php … 98#p890998?  Otherwise, the only other effective work-around I know is to press the eject button again immediately after the drive tray closes.  It used to work for me before I found my fix.

Offline

#7 2011-03-01 20:54:59

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: DVD tray closing right after opening.

It's actually strange that these issues arise over and over again on some systems. I'm experiencing the same after a current switch of motherboard and optical drive. Suggested workaround don't work here either.

Offline

#8 2011-03-01 23:54:58

Young
Member
Registered: 2009-04-26
Posts: 50

Re: DVD tray closing right after opening.

Ok, I have some news. I don't use KDE, so I couldn't remove the KDM daemon from /etc/rc.conf. Even removing LXDM from the list (I'm using LXDE) the tray is still is double ejecting. The problem disappears if I remove dbus from the daemon list, but since it is necessary for the system to run properly, this is not a solution. I also noticed that the following message keeps repeating at every second in /var/log/messages.log:

Mar  1 20:43:51 localhost kernel: ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Mar  1 20:43:51 localhost kernel: ata4.00: configured for UDMA/100
Mar  1 20:43:51 localhost kernel: ata4: EH complete

Any help will be appreciated.

PS: Pressing the eject button after the tray closes didn't worked too.

Last edited by Young (2011-03-02 02:49:06)

Offline

#9 2011-03-02 20:37:40

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: DVD tray closing right after opening.

Anything for a challenge...if the drive is being polled every second or so and killing dbus stops that behaviour then perhaps it's down to hal or some other daemon that's checking the drive for media changes?  Other daemons I don't know about (could be udisks-daemon, could be something else) but it is possible to disable hal's disk polling:

$ sudo hal-disable-polling --device /dev/sr0
Password: 
Polling for drive /dev/sr0 have been disabled. The fdi file written was
  /etc/hal/fdi/information/media-check-disable-storage_serial_TSSTcorp_CDDVDW_SH_S223C_R7716GHZ404117.fdi

Status of hald-addon-storage before:

$ ps ax | grep hald-addon-storage
 3994 ?        S      0:00 hald-addon-storage: polling /dev/sdg (every 2 sec)
 4004 ?        S      0:00 hald-addon-storage: polling /dev/sr0 (every 2 sec)
 4005 ?        S      0:00 hald-addon-storage: polling /dev/sdc (every 2 sec)
 4006 ?        S      0:00 hald-addon-storage: polling /dev/sdd (every 2 sec)
 4007 ?        S      0:00 hald-addon-storage: polling /dev/sde (every 2 sec)
 4008 ?        S      0:00 hald-addon-storage: polling /dev/sdf (every 2 sec)

and after:

$ ps ax | grep hald-addon-storage
 3994 ?        S      0:00 hald-addon-storage: polling /dev/sdg (every 2 sec)
 4005 ?        S      0:00 hald-addon-storage: polling /dev/sdc (every 2 sec)
 4006 ?        S      0:00 hald-addon-storage: polling /dev/sdd (every 2 sec)
 4007 ?        S      0:00 hald-addon-storage: polling /dev/sde (every 2 sec)
 4008 ?        S      0:00 hald-addon-storage: polling /dev/sdf (every 2 sec)
11140 ?        S      0:00 hald-addon-storage: no polling on /dev/sr0 because it is explicitly disabled

Doing this shouldn't affect automounting for sata drives.  Now tell me that you don't have hal installed ;-)

Offline

#10 2011-03-02 23:29:15

Young
Member
Registered: 2009-04-26
Posts: 50

Re: DVD tray closing right after opening.

Hi again!

Yes, I do have hal installed. Even using the command you suggested or disabling hal resulted the same, the problem persists. This is the line of daemons in my /etc/rc.conf:

DAEMONS=(syslog-ng dbus hal network netfs crond pacmandb !cups sensors alsa pcscd lxdm !gdm)

Any other hints?

Offline

#11 2011-03-03 21:02:35

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: DVD tray closing right after opening.

It won't necessarily be a daemon that's started from rc.conf, e.g. in my searching I have seen references to a component of MythTV causing exactly the same problems.  To eliminate (at least part of) that possibility, boot to a console and see what happens.  Alternatively, run pstree and study the output.

init─┬─acpid
     ├─3*[agetty]
     ├─canberra-gtk-pl───{canberra-gtk-p}
     ├─conky───4*[{conky}]
     ├─conky
     ├─console-kit-dae───64*[{console-kit-da}]
     ├─crond
     ├─cupsd
     ├─2*[dbus-daemon]
     ├─dbus-launch
     ├─dhcpcd
     ├─gconfd-2
     ├─gdm-binary─┬─gdm-simple-slav─┬─Xorg
     │            │                 ├─gdm-session-wor─┬─openbox─┬─new-saver-disab───sleep
     │            │                 │                 │         ├─openbox-session───tint2
     │            │                 │                 │         ├─package-update-───sleep
     │            │                 │                 │         ├─parcellite
     │            │                 │                 │         ├─ssh-agent
     │            │                 │                 │         ├─volumeicon
     │            │                 │                 │         └─xscreensaver
     │            │                 │                 └─{gdm-session-wo}
     │            │                 └─{gdm-simple-sla}
     │            └─{gdm-binary}
     ├─gnome-settings-───{gnome-settings}
     ├─gvfs-fuse-daemo───3*[{gvfs-fuse-daem}]
     ├─gvfsd
     ├─hald─┬─hald-runner─┬─hald-addon-acpi
     │      │             ├─hald-addon-inpu
     │      │             ├─6*[hald-addon-stor]
     │      │             └─hald-addon-usb-
     │      └─{hald}
     ├─lircd
     ├─master─┬─pickup
     │        └─qmgr
     ├─mpd───4*[{mpd}]
     ├─2*[ntpd]
     ├─2*[polkit-gnome-au───{polkit-gnome-a}]
     ├─polkitd───{polkitd}
     ├─pulseaudio─┬─gconf-helper───{gconf-helper}
     │            └─4*[{pulseaudio}]
     ├─pulseaudio─┬─gconf-helper───{gconf-helper}
     │            └─2*[{pulseaudio}]
     ├─rtkit-daemon───2*[{rtkit-daemon}]
     ├─runvdr───vdr───15*[{vdr}]
     ├─syslog-ng───syslog-ng
     ├─udevd───2*[udevd]
     ├─udisks-daemon─┬─udisks-daemon
     │               └─2*[{udisks-daemon}]
     ├─upowerd───{upowerd}
     ├─urxvtd───bash───pstree
     └─vdradmind

Moving on, If killing hal doesn't work and you have udisks installed then try inhibiting polling by the udisks-daemon (more at https://bbs.archlinux.org/viewtopic.php?id=95002).

If inhibiting polling by the udisks-daemon doesn't have any effect then - and desperation is setting in now - try searching the net for the make/model of your dvd drive + "drive tray auto-retract".

And there's more.  Do you have ahci enabled or not?  Do you have all sata drives or a mixture of ide and sata?  I've seen a reference to the auto-retract problem being caused by the pci-ide-generic kernel module (http://bugs.gentoo.org/315739).

Edit: Added a few more potential solutions

Last edited by azleifel (2011-03-03 21:14:39)

Offline

#12 2011-03-03 23:03:12

Young
Member
Registered: 2009-04-26
Posts: 50

Re: DVD tray closing right after opening.

Here's the output of pstree:

init─┬─6*[agetty]
     ├─console-kit-dae───64*[{console-kit-da}]
     ├─crond
     ├─2*[dbus-daemon]
     ├─dbus-launch
     ├─dhcpcd
     ├─firefox─┬─plugin-containe───8*[{plugin-contain}]
     │         └─15*[{firefox}]
     ├─gconfd-2
     ├─gdu-notificatio
     ├─goldendict───4*[{goldendict}]
     ├─gvfs-fuse-daemo───3*[{gvfs-fuse-daem}]
     ├─gvfsd
     ├─gvfsd-trash
     ├─hald─┬─hald-runner─┬─hald-addon-acpi
     │      │             ├─hald-addon-inpu
     │      │             └─hald-addon-stor
     │      └─{hald}
     ├─lxdm-binary─┬─X
     │             └─lxsession─┬─lxpanel
     │                         ├─openbox
     │                         └─pcmanfm
     ├─lxterminal─┬─bash───pstree
     │            ├─gnome-pty-helpe
     │            └─{lxterminal}
     ├─menu-cached
     ├─mount.ntfs-3g
     ├─pcscd───{pcscd}
     ├─polkit-gnome-au───{polkit-gnome-a}
     ├─polkitd───{polkitd}
     ├─syslog-ng───syslog-ng
     ├─udevd───2*[udevd]
     └─udisks-daemon─┬─udisks-daemon
                     └─2*[{udisks-daemon}]

When I run the command to inhibit polling (udisks --inhibit-all-polling), the problem of auto retracting disappears, but it doesn't read any of my discs until I cancel the command. The BIOS of my computer doesn't have an option to enable or disable ahci. I didn't do anything to enable it, so I think it is disabled. I have only one hard drive and this dvd recorder, both are sata. My BIOS is updated to the latest version. (should I be afraid? O.o)

Offline

#13 2011-03-04 20:55:23

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: DVD tray closing right after opening.

Setting up ahci may be the answer.  No need for fear just yet because your BIOS might be calling ahci something else, e.g. native mode.  Have a read of the ahci wiki article (https://wiki.archlinux.org/index.php/AHCI).  Otherwise, you're probably going to have to discover what ide/ata-related kernel modules are loading and perhaps blacklist the odd one or two.

Offline

#14 2011-03-05 13:51:22

Young
Member
Registered: 2009-04-26
Posts: 50

Re: DVD tray closing right after opening.

I checked my BIOS a hundred times and it has no option to enable AHCI and Google doesn't know the answer either. I tried to enable it by following the steps described on the wiki, but the problem is still here. How can I find these modules that I have to blacklist? Is there any other option?

Offline

#15 2011-03-05 19:19:48

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: DVD tray closing right after opening.

Information gathering:

Drive type:

dmesg | egrep "DVD|cdrom"

Related kernel modules (and some unrelated stuff too as a side effect)

lsmod | egrep "ata|pci|ide"

Udev attributes for the drive

udevadm info --name=/dev/dvd --attribute-walk

Interrupts, just in case another device is sharing an interrupt with the dvd

cat /proc/interrupts

Offline

#16 2011-03-06 19:37:14

Young
Member
Registered: 2009-04-26
Posts: 50

Re: DVD tray closing right after opening.

Here's the output:

dmesg | egrep "DVD|cdrom":

ata4.00: ATAPI: HL-DT-ST DVDRAM GH22NS50, TN03, max UDMA/100
scsi 3:0:0:0: CD-ROM            HL-DT-ST DVDRAM GH22NS50  TN03 PQ: 0 ANSI: 5
cdrom: Uniform CD-ROM driver Revision: 3.20

lsmod | egrep "ata|pci|ide":

videodev               57747  1 gspca_main
v4l1_compat            13986  1 videodev
i2c_core               16029  2 videodev,nvidia
pci_hotplug            21691  1 shpchp
sata_sis                3074  6 
pata_acpi               2348  0 
pata_sis                7504  1 sata_sis
libata                151324  5 sata_sis,pata_acpi,pata_sis,ahci,libahci
scsi_mod              107414  4 sg,sr_mod,sd_mod,libata

udevadm info --name=/dev/dvd --attribute-walk:

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:05.0/host3/target3:0:0/3:0:0:0/block/sr0':
    KERNEL=="sr0"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{range}=="1"
    ATTR{ext_range}=="1"
    ATTR{removable}=="1"
    ATTR{ro}=="0"
    ATTR{size}=="2097151"
    ATTR{alignment_offset}=="0"
    ATTR{discard_alignment}=="0"
    ATTR{capability}=="19"
    ATTR{stat}=="       0        0        0        0        0        0        0        0        0        0        0"
    ATTR{inflight}=="       0        0"

  looking at parent device '/devices/pci0000:00/0000:00:05.0/host3/target3:0:0/3:0:0:0':
    KERNELS=="3:0:0:0"
    SUBSYSTEMS=="scsi"
    DRIVERS=="sr"
    ATTRS{device_blocked}=="0"
    ATTRS{type}=="5"
    ATTRS{scsi_level}=="6"
    ATTRS{vendor}=="HL-DT-ST"
    ATTRS{model}=="DVDRAM GH22NS50 "
    ATTRS{rev}=="TN03"
    ATTRS{state}=="running"
    ATTRS{timeout}=="30"
    ATTRS{iocounterbits}=="32"
    ATTRS{iorequest_cnt}=="0xb84"
    ATTRS{iodone_cnt}=="0x2eb"
    ATTRS{ioerr_cnt}=="0x2"
    ATTRS{modalias}=="scsi:t-0x05"
    ATTRS{evt_media_change}=="0"
    ATTRS{queue_depth}=="1"
    ATTRS{queue_type}=="none"

  looking at parent device '/devices/pci0000:00/0000:00:05.0/host3/target3:0:0':
    KERNELS=="target3:0:0"
    SUBSYSTEMS=="scsi"
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:05.0/host3':
    KERNELS=="host3"
    SUBSYSTEMS=="scsi"
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:05.0':
    KERNELS=="0000:00:05.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="sata_sis"
    ATTRS{vendor}=="0x1039"
    ATTRS{device}=="0x0180"
    ATTRS{subsystem_vendor}=="0x1043"
    ATTRS{subsystem_device}=="0x810e"
    ATTRS{class}=="0x010485"
    ATTRS{irq}=="17"
    ATTRS{local_cpus}=="ff"
    ATTRS{local_cpulist}=="0-7"
    ATTRS{modalias}=="pci:v00001039d00000180sv00001043sd0000810Ebc01sc04i85"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{broken_parity_status}=="0"
    ATTRS{msi_bus}==""

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""

cat /proc/interrupts:

           CPU0       CPU1       
  0:         46          0   IO-APIC-edge      timer
  1:       1851          0   IO-APIC-edge      i8042
  3:          2          0   IO-APIC-edge    
  4:          3          0   IO-APIC-edge    
  6:          5          0   IO-APIC-edge      floppy
  7:          0          0   IO-APIC-edge      parport0
  8:          4          0   IO-APIC-edge      rtc0
  9:          0          0   IO-APIC-fasteoi   acpi
 12:      44294          0   IO-APIC-edge      i8042
 14:          0          0   IO-APIC-edge      pata_sis
 15:          0          0   IO-APIC-edge      pata_sis
 16:      93752          0   IO-APIC-fasteoi   nvidia
 17:      37865          0   IO-APIC-fasteoi   sata_sis
 18:      45068          0   IO-APIC-fasteoi   SiS SI7012
 19:      45015          0   IO-APIC-fasteoi   eth0
 20:     191288          0   IO-APIC-fasteoi   ohci_hcd:usb2
 21:          0          0   IO-APIC-fasteoi   ohci_hcd:usb3
 22:          0          0   IO-APIC-fasteoi   ohci_hcd:usb4
 23:          2          0   IO-APIC-fasteoi   ehci_hcd:usb1
NMI:         12         10   Non-maskable interrupts
LOC:     236425     264084   Local timer interrupts
SPU:          0          0   Spurious interrupts
PMI:         12         10   Performance monitoring interrupts
IWI:          0          0   IRQ work interrupts
RES:     451444     491406   Rescheduling interrupts
CAL:        609        534   Function call interrupts
TLB:       2219       3424   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:          6          6   Machine check polls
ERR:          1
MIS:          0

Offline

#17 2011-03-06 22:23:07

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: DVD tray closing right after opening.

That all looks reasonable to me and I'm pretty much out of ideas now.  I can make my drive behave like yours, i.e. continually resetting, by deliberately forcing it to use a transfer mode that isn't supported.  Once it goes into the endless reset cycle the drive door won't even open -  I guess that your PC must take a little longer between resets or the drive mechanism is more tolerant, allowing the drive door to open a little before snapping shut again.

Google is telling me that UDMA/100 is normal for your drive but how about trying something different, e.g. by booting with either

libata.force=4:udma/60

or

libata.force=4:pio4

added to grub's kernel line.

Last edited by azleifel (2011-03-06 22:23:36)

Offline

#18 2011-03-08 17:43:28

Young
Member
Registered: 2009-04-26
Posts: 50

Re: DVD tray closing right after opening.

I tried both of your suggestions, but none of them worked. I noticed that the problem only occurs after I login in LXDM. Before that, the drive opens normally. What else could I try?

Offline

#19 2011-03-12 18:21:07

Young
Member
Registered: 2009-04-26
Posts: 50

Re: DVD tray closing right after opening.

Ideas?

Offline

#20 2011-03-17 23:11:30

Young
Member
Registered: 2009-04-26
Posts: 50

Re: DVD tray closing right after opening.

A lot of updates and it is still NOT working. Please, help me.

Offline

#21 2011-03-18 18:57:37

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: DVD tray closing right after opening.

So, some program that runs after you log into your LXDE account is regularly polling the DVD drive and provoking a hard reset of the link to the drive.  The problem, however, is most likely not with the program that's polling the drive but with the configuration of the drive itself.  There are a limited number of software configuration options for a sata drive and I believe that we've explored the important ones already.  What we haven't investigated is the set up of the hardware.  Is the power cable properly inserted?  Pull it out and put it back a few times just to check (and, as a side effect, clean the contacts).  Is the sata cable properly connected at the drive and motherboard ends?  Sata cables are notorious for drifting loose, even the type with securing clips.  Does the sata cable run near any other data cables, particularly the hdd cable(s)?  Sata cables are normally unscreened therefore if it does run close to another data cable then it could be picking up stray signals so try re-routing it.

Offline

#22 2011-03-23 01:51:36

Young
Member
Registered: 2009-04-26
Posts: 50

Re: DVD tray closing right after opening.

Unfortunately, I checked all the cables and contacts, but the drive still doesn't work. I also tried to switch from LXDE to Gnome, but the problem wasn't solved either. Any other suggestion will be greatly appreciated.

Offline

#23 2011-03-27 21:00:03

Young
Member
Registered: 2009-04-26
Posts: 50

Re: DVD tray closing right after opening.

What else can I try?

Offline

Board footer

Powered by FluxBB