You are not logged in.

#1 2011-05-20 03:39:06

noaham
Member
Registered: 2011-03-13
Posts: 8

System hangs on shutdown

Hi,

I've been using Linux as my main operating system for about a year now and I guess like most people have spent a lot of time distro hopping. I am very glad though, that I finally decided to try Arch, It really seems to be the best fit for what I want and with fantastic package management as well. I haven't even needed to post on these forums at all because the wiki is so great and if its not there then most likely its been already posted about here.

Anyway, my problem is that system hangs whenever I shut down. This happens only when I try and shut down, rebooting the machine is fine. This has only started happening since I installed the tuxonice kernel (which I installed and compiled with the default kernel settings from AUR). The machine (when running on the tuxonice kernel) has no problem hibernating or resuming from hibernation.

The really strange thing is that the machine hangs regardless of whether I am running the tuxonice kernel or the standard arch kernel.

I know that it is probably not possible to diagnose the problem just from what I have saud about but let me know what I should post and I will put it up.

Cheers and thanks in advance for your help,

noah

Offline

#2 2011-05-20 05:28:21

lukaszan
Member
Registered: 2011-05-05
Posts: 117

Re: System hangs on shutdown

When you say 'hangs', do you mean it goes through the shutdown procedure, but doesn't actually do the final power off ?

If this is the case, then it seems like some kernel+bios setting. I've had the same problem ever since I changed my motherboard. Haven't properly looked into it, maybe I will over the weekend and let you know the outcome.

Offline

#3 2011-05-20 07:02:01

noaham
Member
Registered: 2011-03-13
Posts: 8

Re: System hangs on shutdown

Thanks lukaszan, I think I found the issue though. After turning off gdm (which I should have done before I posted the first time, oh well) I can see that the system is entering single-user mode when I run shutdown. If I run halt however the system goes down fine. What could be causing this?

Offline

#4 2011-05-20 10:34:07

lukaszan
Member
Registered: 2011-05-05
Posts: 117

Re: System hangs on shutdown

Sorry, when is it going single and when is going down ?

Offline

#5 2011-05-20 12:10:48

noaham
Member
Registered: 2011-03-13
Posts: 8

Re: System hangs on shutdown

So when I run "shutdown now" from the command line it goes into runlevel 1 and then into single user mode. If I run "halt" then it shuts down fine. From a GUI, however it seems to hang regardless.

Offline

#6 2011-05-20 12:50:03

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: System hangs on shutdown

noaham wrote:

So when I run "shutdown now" from the command line it goes into runlevel 1.

This is supposed to happen. See man shutdown:

       Runlevel 0 is used to  halt
       the  system, runlevel 6 is used to reboot the system, and runlevel 1 is
       used to put to system into a state where administrative  tasks  can  be
       performed; this is the default if neither the -h or -r flag is given to
       shutdown.

Use "shutdown -h now" to halt the system, or "shutdown -r now" to reboot.


To know or not to know ...
... the questions remain forever.

Offline

#7 2011-05-20 13:04:37

vadmium
Member
Registered: 2010-11-02
Posts: 63

Re: System hangs on shutdown

Looks like that's what “shutdown” is meant to do: have a look at “man shutdown”. I’ve always used the “poweroff” and “reboot” commands (there’s also “halt”, and I recently started using “kexec”), which apparently just invoke shutdown with one of the -h/P/r options.

Anyway, have a look at the man pages; I think you might be trying to do things the “wrong” (or at least unusual) way.

Offline

#8 2011-05-21 08:08:55

noaham
Member
Registered: 2011-03-13
Posts: 8

Re: System hangs on shutdown

Hi guys thanks for your help. I realised that I am slightly confused. I see exactly what you mean about the shutdown command. In my gui I have an openbox menu item configured to execute "shutdown -h now". When I booted into the command line however I only executed "shutdown now". I will try and give another discription of the problem (hopefully I'll get it right this time!)

From a CLI I can run the commands shutdown -h/halt/poweroff without problem. From a GUI, however, the machine hangs on a blank screen when I run halt/shutdown -h/poweroff. I could be wrong but it seems as though gdm/openbox is not shutting down properly. I have tried to dig through the logs but unfortunately I dont know my way around enough to find out anything useful. The last thing I can see in my everthing.log is syslog-ng terminating (the next thing I see is the maching booting up again when I turn it back on).

Can someone maybe point me in the right direction as to which log files might contain some useful info? I am using gdm-old from AUR, could there be a possible conflict with gnome3 (which I have installed as well - but don't really use)?

Thanks again for all your help

Offline

#9 2011-05-23 07:17:15

vadmium
Member
Registered: 2010-11-02
Posts: 63

Re: System hangs on shutdown

By CLI do you mean you still have GDM or Openbox running in the background but you switch to a text console, or do you mean no graphics loaded and running at all? If possible I’d try doing a shutdown from the GUI (maybe “sleep 4 && shutdown”) and immediately switching to the console (Ctrl-Alt-F1) to see if it hangs that way and if there are any interesting messages. But maybe it only hangs if you don’t switch.

Also, do you mean to say if you do “shutdown” or “halt” from the GUI it hangs without shutting down properly, but if you do a “reboot” from the GUI it reboots fine?

When I shut down or reboot my Arch computer from the GUI it closes the GUI and reverts to the text console and prints out stuff about stopping all that rc.d runlevel service stuff. At what point does yours hang?

It’s sounding more difficult to solve. For instance the logging programs might have already shut down, or if the kernel is crashing then maybe the most recent logs won’t actually be saved to disk. What’s the last message in your everything.log? Mine is “syslog-ng shutting down”.

Offline

#10 2011-05-25 03:02:35

noaham
Member
Registered: 2011-03-13
Posts: 8

Re: System hangs on shutdown

vadmium wrote:

By CLI do you mean you still have GDM or Openbox running in the background but you switch to a text console, or do you mean no graphics loaded and running at all? If possible I’d try doing a shutdown from the GUI (maybe “sleep 4 && shutdown”) and immediately switching to the console (Ctrl-Alt-F1) to see if it hangs that way and if there are any interesting messages. But maybe it only hangs if you don’t switch.

No I mean, GDM/Openbox are not running. I'll give that a try though and see what messages pop up.

vadmium wrote:

Also, do you mean to say if you do “shutdown” or “halt” from the GUI it hangs without shutting down properly, but if you do a “reboot” from the GUI it reboots fine?

Yes, thats exactly right.

vadmium wrote:

When I shut down or reboot my Arch computer from the GUI it closes the GUI and reverts to the text console and prints out stuff about stopping all that rc.d runlevel service stuff. At what point does yours hang?

It is hanging before it reverts to the console. This made me think that it was gdm which turned out to be completely correct. I disabled gdm and now just login and startx from the text console, which is fine and shutting down works  normally.

vadmium wrote:

It’s sounding more difficult to solve. For instance the logging programs might have already shut down, or if the kernel is crashing then maybe the most recent logs won’t actually be saved to disk. What’s the last message in your everything.log? Mine is “syslog-ng shutting down”.

The last thing in everything.log is “syslog-ng shutting down", everything before this looks normal.

I am happy just to not use a dm at the moment. The strangest thing about this is that it only started happening when I installed the tuxonice kernel but I have the same problem regarless of which kernel I boot.Thanks for your help.

Offline

#11 2011-05-25 22:39:58

diegoviola
Member
Registered: 2010-12-16
Posts: 134

Re: System hangs on shutdown

Deleted.

Last edited by diegoviola (2023-04-17 22:39:36)

Offline

#12 2011-05-26 03:03:01

noaham
Member
Registered: 2011-03-13
Posts: 8

Re: System hangs on shutdown

Cheers for that. I will keep my eye on that thread and bug report.

Offline

Board footer

Powered by FluxBB