SEARCH

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

You are not logged in.

#1 2015-03-02 22:57:39

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

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

Is anyone else running into the unclean/imcomplete shutdown...thing?  It almost feels like the OS leaves the house but forgets to turn the lights off.  It's been happening to me with both Wally built from a netinstall and LXDE #base, and while it doesn't happen all the time, it seems to happen more often than not.  Interestingly, if I force a reboot after such an incomplete shutdown (holding down the power button), I can always get it to shutdown cleanly from LightDM immediately afterwards, while logging out from an extended session and shutting down from LightDM doesn't always work, so uptime may be a factor.

What logs would I look at to diagnose this, and are there existing threads here on the problem?  Google finds posts on about this on Debian forums going back at least as far as Lenny, and I've had trouble finding a post that mentions a solution. yikes

EDIT:  Seems the problem is the USB disk controller; drive gets waken up for unmounting, and the system has already "left the building" by the time the drive wakes up.  I'm pretty sure my issue is with Toshiba, not Linus or Lennart.

Last edited by pvsage (2015-03-12 05:42:13)

Offline

Be excellent to each other!

#2 2015-03-03 00:06:17

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

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

Just by chance... you're not using 'systemctl halt' are you?
Apparently that now just halts the system without turning off the power. You need 'systemctl poweroff'.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#3 2015-03-03 00:42:37

tknomanzr
#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

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

Wow. And here I have been thinking all of this time that improper shutdowns were just bad in Linux. Gotta check my exit script on that one.

Offline

#4 2015-03-03 06:55:52

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

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

@John:  Not sure; I'm using the lxsession-logout most of the time, and that is a compiled binary.  I'll try `systemctl poweroff` after leaving my desktop on for a couple hours and see if that works.

Offline

#5 2015-03-03 09:23:33

nore
>2^9
From: Lakeland
Registered: 2009-11-28
Posts: 740

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

I am using full XFCE4 desktop on Jessie, with its default logout dialog; no custom scrips or commands. I've experienced maybe five incomplete shutdowns out of 2-5 boots/day/four weeks. It looks like a stuck suspend before: lights are on, fans are humming, but screen is off and system is irresponsive.

Offline

#6 2015-03-03 12:58:55

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

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

The Contemplative Boss can confirm that, at least on this latest shutdown (after about 6 hours uptime), `systemctl poweroff` works.  After confirming that this works on at least 3 out of three shutdown attempts, I'll submit a bug report upstream to the lxsession maintainers.

EDIT: ...though I have noticed similar hangs on reboot as well... hmm

Last edited by pvsage (2015-03-03 12:59:50)

Offline

#7 2015-03-03 13:12:43

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

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

pvsage wrote:

Is anyone else running into the unclean/imcomplete shutdown...thing?  It almost feels like the OS leaves the house but forgets to turn the lights off.  It's been happening to me with both Wally built from a netinstall and LXDE #base, and while it doesn't happen all the time, it seems to happen more often than not.  Interestingly, if I force a reboot after such an incomplete shutdown (holding down the power button), I can always get it to shutdown cleanly from LightDM immediately afterwards, while logging out from an extended session and shutting down from LightDM doesn't always work, so uptime may be a factor.

It%20is%20now%20safe%20to%20turn%20off%20your%20computer..jpg

What logs would I look at to diagnose this, and are there existing threads here on the problem?  Google finds posts on about this on Debian forums going back at least as far as Lenny, and I've had trouble finding a post that mentions a solution. yikes

/var/log/syslog, grep for acpi-related messages that say *failfailfail*. Same for the systemd journalthing.


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

Offline

#8 2015-03-03 16:24:03

tknomanzr
#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

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

My Toshiba's inability to suspend without breaking USB connections, which results in me having to do an unclean shutdown, is almost certainly a bios problem. Dmesg shows some acpi problems. I looked it up and there is an acpi related bios update. However, the update requires me to be running Windows (go figure). I may pull a Vista drive out of another machine, put it in the Toshiba, watch Windows freak out about being on a machine with unknown hardware and possibly get a bios update going. The Toshiba is all Intel based hardware if that matters any.

Offline

#9 2015-03-03 18:29:05

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

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

nore wrote:

I am using full XFCE4 desktop on Jessie, with its default logout dialog; no custom scrips or commands. I've experienced maybe five incomplete shutdowns out of 2-5 boots/day/four weeks. It looks like a stuck suspend before: lights are on, fans are humming, but screen is off and system is irresponsive.

Y'all are experiencing an xfce4-power-manager "bug". Here's the fix...
https://wiki.archlinux.org/index.php/xf … end_events


bunsenlabs     8)     forum mod squad

Offline

#10 2015-03-03 19:10:19

nore
>2^9
From: Lakeland
Registered: 2009-11-28
Posts: 740

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

Thanks for the tip!

Offline

#11 2015-03-03 20:40:33

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

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

@twoion:  I appreciate your sense of humor.

twoion wrote:

/var/log/syslog, grep for acpi-related messages that say *failfailfail*. Same for the systemd journalthing.

~$ sudo cat /var/log/syslog | grep fail
Mar  3 07:52:24 lxdebuns systemd-udevd[258]: failed to execute '/lib/udev/mtp-probe' 'mtp-probe /sys/devices/pci0000:00/0000:00:0a.0/0000:03:00.0/usb2/2-2 2 2': No such file or directory
Mar  3 07:52:24 lxdebuns systemd-udevd[261]: failed to execute '/lib/udev/mtp-probe' 'mtp-probe /sys/devices/pci0000:00/0000:00:12.0/usb6/6-5 6 2': No such file or directory
Mar  3 07:52:24 lxdebuns systemd-udevd[262]: failed to execute '/lib/udev/mtp-probe' 'mtp-probe /sys/devices/pci0000:00/0000:00:13.0/usb7/7-1 7 2': No such file or directory
Mar  3 07:52:24 lxdebuns kernel: [    8.373720] hid-generic: probe of 0003:05C7:2012.0002 failed with error -22
Mar  3 07:52:28 lxdebuns colord[747]: (colord:747): Cd-WARNING **: failed to get session [pid 513]: Unknown error -2
Mar  3 07:52:34 lxdebuns kernel: [   20.368555] r8169 0000:06:00.0: firmware: failed to load rtl_nic/rtl8168e-2.fw (-2)
Mar  3 07:52:34 lxdebuns kernel: [   20.368567] r8169 0000:06:00.0: Direct firmware load failed with error -2
Mar  3 15:14:39 lxdebuns systemd-udevd[245]: failed to execute '/lib/udev/mtp-probe' 'mtp-probe /sys/devices/pci0000:00/0000:00:12.0/usb6/6-5 6 2': No such file or directory
Mar  3 15:14:39 lxdebuns systemd-udevd[246]: failed to execute '/lib/udev/mtp-probe' 'mtp-probe /sys/devices/pci0000:00/0000:00:13.0/usb7/7-1 7 2': No such file or directory
Mar  3 15:14:39 lxdebuns systemd-udevd[248]: failed to execute '/lib/udev/mtp-probe' 'mtp-probe /sys/devices/pci0000:00/0000:00:0a.0/0000:03:00.0/usb2/2-2 2 2': No such file or directory
Mar  3 15:14:39 lxdebuns kernel: [    8.128749] hid-generic: probe of 0003:05C7:2012.0002 failed with error -22
Mar  3 15:14:43 lxdebuns colord[729]: (colord:729): Cd-WARNING **: failed to get session [pid 512]: Unknown error -2
Mar  3 15:14:49 lxdebuns kernel: [   20.362601] r8169 0000:06:00.0: firmware: failed to load rtl_nic/rtl8168e-2.fw (-2)
Mar  3 15:14:49 lxdebuns kernel: [   20.362614] r8169 0000:06:00.0: Direct firmware load failed with error -2

(Host name?  Slowly weeding down stuff from base LXDE to Bunsen.  That is all.  Yes, I realize more could be read into it. roll )
Couldn't find anything in the systemd journalthing.

EDIT:  I know the hid-generic error is mostly harmless (mechanical keyboard) and the rtl_nic firmware errors are my wired network adapter.

Last edited by pvsage (2015-03-03 20:44:39)

Offline

#12 2015-03-03 20:58:27

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

journalctl -b1

Will show the entries for the last boot.

Does your machine shut down cleanly if you use:

/sbin/poweroff

or

systemctl poweroff

My jessie system always shuts down cleanly but I don't use LXDE or a display manager and I call `/sbin/poweroff` via a keyboard shortcut under DWM and via a menu entry under PekWM.

Offline

#13 2015-03-03 21:03:36

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

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

~$ journalctl -b1
No journal files were found.
Failed to look up boot +1: Cannot assign requested address

Only done the one manual `systemctl poweroff` so far via LXsession's equivalent of GMrun.  If I'm two for two in a few minutes, I'll assume the LXDE dialog (and LightDM) aren't sending the proper shutdown command and consider this matter resolved.

Offline

#14 2015-03-03 21:11:10

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

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

...and...nope.

Robert Palmer wrote:

The lights are on, but you're not home

`systemctl poweroff` failed to completely shut down a few moments ago.

Offline

#15 2015-03-03 21:20:48

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

You could try following the advice in this link and file a bug report with the information:
http://freedesktop.org/wiki/Software/sy … eventually

There was a poster in the Debian forums with the same problem but we never did get to the bottom of it.

Offline

#16 2015-03-03 21:26:31

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

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

^ Thanks for the link.  Looks like my problem is "shutdown never finishes", as I once went to sleep after issuing a shutdown and woke up several hours later to find the PSU fan was still running.  Will file a bug report with Debian after work tonight.

Offline

#17 2015-03-03 22:26:19

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

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

@pvsage, my earlier post was meant for you too, or are you not using xfce4-power-manager?


bunsenlabs     8)     forum mod squad

Offline

#18 2015-03-04 00:38:33

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

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

Head_on_a_Stick wrote:

You could try following the advice in this link and file a bug report with the information:
http://freedesktop.org/wiki/Software/sy … eventually

There was a poster in the Debian forums with the same problem but we never did get to the bottom of it.

Everybody who is running systemd is running 'testing'.


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

Offline

#19 2015-03-04 01:05:12

spacex
ew
From: Norway
Registered: 2015-01-17
Posts: 385
Website

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

cb-exit works perfectly for me, each and every time. Without adding anything to the sudoers file and stuff.

A strange thing though. I was struggling with the shutdown when I used slim. Wouldn't shutdown if I had reconfigured or restarted the openbox-session. Or logged out. Because the session was no longer active. But then i installed lightdm, and reverted back to slim, and suddenly the shutdown issues were solved for slim also. So I'm not using lightdm. Slim it is....

For anyone that wants to use cb-exit with systemd, edit the suspend section to look like this:

def suspend_action(self,btn):
		self.disable_buttons()
		self.status.set_label("Suspending, please standby...")
		os.system("cb-lock")
		os.system("dbus-send --print-reply --system --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Suspend boolean:true")
		gtk.main_quit()

Last edited by spacex (2015-03-04 01:10:44)


Regards,
spacex/ew
http://tweaklinux.org

Offline

#20 2015-03-04 01:22:20

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

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

Doesn't this work?

os.system("systemctl suspend")

Last edited by damo (2015-03-04 01:22:56)


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#21 2015-03-04 01:48:58

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

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

^those short commands work for me.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#22 2015-03-04 01:54:38

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

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

Now that pvsage has reported hangs even with 'systemctl poweroff' we seem to have eliminated lxsession as a suspect, but there is

Corrected connect and emit signals for lxsession-db to fix hanging in some cases.

in ver. 0.5.2: http://blog.lxde.org/?tag=lxsession

(btw lxsession's README (in /usr/share/docs) has some interesting stuff about customization.)


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#23 2015-03-04 07:00:43

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

twoion wrote:
Head_on_a_Stick wrote:

You could try following the advice in this link and file a bug report with the information:
http://freedesktop.org/wiki/Software/sy … eventually

There was a poster in the Debian forums with the same problem but we never did get to the bottom of it.

Everybody who is running systemd is running 'testing'.

Yes, pvsage is running Testing.

Offline

#24 2015-03-04 07:06:24

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

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

hhh wrote:

@pvsage, my earlier post was meant for you too, or are you not using xfce4-power-manager?

Nope, not one piece of xfce4 in my LXDE install.

Offline

Help fund CrunchBang, donate to the project!

#25 2015-03-04 13:25:41

spacex
ew
From: Norway
Registered: 2015-01-17
Posts: 385
Website

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

What is the output of

loginctl show-session $XDG_SESSION_ID --property=Active

when this occurs?


Regards,
spacex/ew
http://tweaklinux.org

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