SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#26 2015-03-04 13:40:05

pingu
#! Junkie
Registered: 2014-12-05
Posts: 367

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

Could that be the shutdown hook missing from the initrd (that's always the first thing I check since I had problems with it before)?

edit: A user on the arch forums solved a possibly similar problem by disabling EHCI and enabling XHCI in the bios.
https://bbs.archlinux.org/viewtopic.php?id=192821

Last edited by pingu (2015-03-04 13:59:00)


"We don't merge kernel code just because user space was written by a retarded monkey on crack."
Linus f****g Trovalds

Offline

Help fund CrunchBang, donate to the project!

#27 2015-03-04 20:56:56

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

^ Any idea what area of the BIOS to look for this, or if its name could be different on different BIOSes?  I'm pretty sure I dug through every subscreen of my ASUS BIOS, and couldn't find anything that looked relevant.

A little searching for "initrd shutdown hook" suggests it is no longer recommended, and is in fact counterindicated in most cases.

spacex wrote:

What is the output of

loginctl show-session $XDG_SESSION_ID --property=Active

when this occurs?

Active=yes

Offline

#28 2015-03-04 21:53:30

pingu
#! Junkie
Registered: 2014-12-05
Posts: 367

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

I guess I took this info too seriously from the mkinitcpio.conf file in my arch install:

##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.

(They did use the capslock... but their wiki is up to date.)

I'm gonna look into my bios (also an asus) when I get home and see if I can find those settings.

Last edited by pingu (2015-03-04 21:56:19)


"We don't merge kernel code just because user space was written by a retarded monkey on crack."
Linus f****g Trovalds

Offline

#29 2015-03-05 00:19:15

pingu
#! Junkie
Registered: 2014-12-05
Posts: 367

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

Ok, I found that thing.
My bios has this under "advancend/usb/xhci - enable-disable-auto".

Last edited by pingu (2015-03-05 00:20:43)


"We don't merge kernel code just because user space was written by a retarded monkey on crack."
Linus f****g Trovalds

Offline

#30 2015-03-05 07:13:40

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

After searching for just xhci, I see that's the USB3 protocol.  I think that my external USB3 HDD has been mounted every time the system hangs; I'll see if manually unmounting it before shutdown makes a difference; could be that waiting for the drive to spin down and park is throwing off the shutdown signal to the PSU.  (I think xHCI is just referred to as USB3 in my BIOS.)

Offline

#31 2015-03-05 14:52:12

pingu
#! Junkie
Registered: 2014-12-05
Posts: 367

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

pvsage wrote:

After searching for just xhci, I see that's the USB3 protocol.  I think that my external USB3 HDD has been mounted every time the system hangs; I'll see if manually unmounting it before shutdown makes a difference; could be that waiting for the drive to spin down and park is throwing off the shutdown signal to the PSU.  (I think xHCI is just referred to as USB3 in my BIOS.)

That's it. Was it set to automatic?
The arch guy had it set to "smart-auto", and that caused him this problem, which was solved when he enabled it. 
My bios had it set to auto, so that's probably the factory defaults.

Last edited by pingu (2015-03-05 14:52:44)


"We don't merge kernel code just because user space was written by a retarded monkey on crack."
Linus f****g Trovalds

Offline

#32 2015-03-05 19:43:47

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

I think you should try running it without the display manager to see if that it the cause.

# systemctl disable lightdm
# systemctl stop lightdm

Then set LXDE as the default DE with:

# update-alternatives --config x-session-manager

You can then start LXDE by either using `startx` or add this to ~/.bash_profile to start it automatically after console log in:

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx -- vt7

As I say, my Debian jessie shuts down cleanly and I use the above method to start my X server.

Offline

#33 2015-03-05 20:42:30

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

pingu wrote:
pvsage wrote:

After searching for just xhci, I see that's the USB3 protocol.  I think that my external USB3 HDD has been mounted every time the system hangs; I'll see if manually unmounting it before shutdown makes a difference; could be that waiting for the drive to spin down and park is throwing off the shutdown signal to the PSU.  (I think xHCI is just referred to as USB3 in my BIOS.)

That's it. Was it set to automatic?
The arch guy had it set to "smart-auto", and that caused him this problem, which was solved when he enabled it. 
My bios had it set to auto, so that's probably the factory defaults.

Only options in my BIOS for USB3.0 Controller are "Enabled" or "Disabled". neutral

By the way, two successful shutdowns in a row with the USB3 drive dismounted first.

Last edited by pvsage (2015-03-05 20:45:01)

Offline

#34 2015-03-05 23:05:31

twoion
Moderator
Registered: 2012-05-11
Posts: 1,648

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

pvsage wrote:
pingu wrote:
pvsage wrote:

After searching for just xhci, I see that's the USB3 protocol.  I think that my external USB3 HDD has been mounted every time the system hangs; I'll see if manually unmounting it before shutdown makes a difference; could be that waiting for the drive to spin down and park is throwing off the shutdown signal to the PSU.  (I think xHCI is just referred to as USB3 in my BIOS.)

That's it. Was it set to automatic?
The arch guy had it set to "smart-auto", and that caused him this problem, which was solved when he enabled it. 
My bios had it set to auto, so that's probably the factory defaults.

Only options in my BIOS for USB3.0 Controller are "Enabled" or "Disabled". neutral

By the way, two successful shutdowns in a row with the USB3 drive dismounted first.

I have the same problem with one of my external "USB3" disks, and now people who also do. Some el-cheapo (or early) USB3<>SATA bridges are utter crap; in my case, the thing doesn't even manage to sustain a stable USB link: You see the disk appear in the syslog, it gets its block device /dev/sdX, but soon after (of course, you have already mounted the partitions) the link goes down (indicative xchi message spamming in the syslog) and the disk disappears; only to go live a few seconds later at /dev/sdY. The USB cable is not defective, it works wonderfully with that other USB3 disk.

Maybe you would like to test that too; at least in my case I got to know that it is not the chipset's fault.

Last edited by twoion (2015-03-05 23:06:21)


Tannhäuser ~ {www,pkg,ddl}.bunsenlabs.org/{gitlog,repoidx}

Offline

#35 2015-03-06 04:30:55

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

^ What I have is a cheapish 3TB Toshiba drive.  If it's spun down, it takes about 10 seconds to spin up before it starts reading data.

Three successful shutdowns or reboots now after unmounting the drive manually.  (I forgot to mention that the system hangs on reboot as well, not just shutdown.  This is probably relevant information.)  Might get around to making a shutdown script that sends umount to any mounted external drives and wraps `systemctl poweroff` is a 10-second wait.

So does this still sound like something that warrants a bug report?  I'm not sure if it does, unless systemctl is responsible for powering down external drives at shutdown/reboot.

Offline

#36 2015-03-11 05:48:42

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

OK, after a few more tests and attempts to deliberately reproduce the problem, I think I understand what's going on, and I'm fairly sure systemd is not to blame.  The hangs happen if the external drive is mounted, but has spun down.  Apparently, on shutdown an unmount signal is sent to the drive, which keeps the PSU running while the OS exits; by the time the drive has spun up and re-parked...well, I'll stick with the metaphor that there's nobody home to turn the lights off.

So is there still a bug report in this?  If so, what package would I file the bug report against?  Fuse?

Offline

#37 2015-03-12 00:56:07

pingu
#! Junkie
Registered: 2014-12-05
Posts: 367

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

pvsage wrote:

OK, after a few more tests and attempts to deliberately reproduce the problem, I think I understand what's going on, and I'm fairly sure systemd is not to blame.  The hangs happen if the external drive is mounted, but has spun down.  Apparently, on shutdown an unmount signal is sent to the drive, which keeps the PSU running while the OS exits; by the time the drive has spun up and re-parked...well, I'll stick with the metaphor that there's nobody home to turn the lights off.

So is there still a bug report in this?  If so, what package would I file the bug report against?  Fuse?

Um... maybe it's a kernel thing?  what kernel version are you running?
I heard Linus is usually extra happy to receive bug emails. ]:D

Is there a way to properly  figure out "who's" the actual culprit?

Last edited by pingu (2015-03-12 01:00:29)


"We don't merge kernel code just because user space was written by a retarded monkey on crack."
Linus f****g Trovalds

Offline

#38 2015-03-12 05:38:33

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: [SOLVED - USB disk controller] Dat ol' incomplete shutdown dance...

pingu wrote:

Is there a way to properly  figure out "who's" the actual culprit?

I can see if there's a Fuse log that survives reboot, but since the hang happens right when the system is going down, I doubt it gets logged.  I'll chalk it up to USB disk controller and mark this [SOLVED].

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo