HELP: Can't shut down openSUSE 11.2

Recently I installed openSUSE 11.2 (GNOME) on my HP DC7100 machine. I was very excited about it until shortly, when I started discovering the problems.

One of the more severe problems is that I can’t shut down the system:
Pressing the “Shut Down” button brings me back to the login screen. From there I still can’t shut down, but I also can’t log-in any more. The only option left is the hard shut down.

“Restart” sometimes works, but often ends up in the login screen too.

As far as the “Suspend” and “Hibernate” is concerned, I did not experience any problems there.

By the way, after the installation, I consumed all available updates (including the kernel upgrade). I’m not aware it the problem existed before the updates.

Can someone please help me with this?
Thanks in advance.

As I see that you have two computers, could you try to open a ssh session to that computer and shutdown or restart from there by typing : shutdown -r now (to restart) or shutdown -h now (to shutdown) as root in the ssh terminal ?

Another alternative is to enable SysReq first (you can do that at any time, so better before you get stuck). Type :
sudo echo 1 > /proc/sys/kernel/sysrq
Then to reboot, hold the ALT+SysRq keys together and type:
R E I S U B
by waiting about 5 seconds between each key.
At least , it should reboot the system cleanly without damaging the filesystem.
The SysRq key is the PrtScn key (Print Screen).

Thanks for the sugestion, but I don’t understand how to use this.
I did as you explain:

boris@linux-nc7100:~> sudo echo 1 > /proc/sys/kernel/sysrq
bash: /proc/sys/kernel/sysrq: Permission denied

I did not work, so I did the following:

boris@linux-nc7100:~> su
Password: 
linux-nc7100:/home/boris # echo 1 > /proc/sys/kernel/sysrq
linux-nc7100:/home/boris # 

When I pressed “ALT+SysRq” and typed R E I S U B, 200 screnshots were made. It took me 5 minutes to close all windows.
I suppose I’m doing something wrong, but I see on my keyboard that Print Screen is indeed SysRq.

Hmm … Maybe the Alt key is not acting as modifier. In that case, you would just print the screen, which I understand can be very annoying.

what are the output of :

xmodmap -pm | grep Alt

and

xmodmap -pk | grep Sys_Req

But anyway, this trick can help you to reboot cleanly. It’s not intended to solve the problem.

Try to open an ssh session to that computer. It will tell you at least if the console is locked. Also you might get some informations about running processes with “top” an “ps ax” and have a look in /var/log/messages (from the ssh terminal).

When you cannot login, what happens if you press “CTRL-ALT-F2” ? Do you get a console login prompt ?

boris@linux-nc7100:~> xmodmap -pm | grep Alt
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
boris@linux-nc7100:~>
boris@linux-nc7100:~> xmodmap -pk | grep Sys_Req
    107    	0xff61 (Print)	0xff15 (Sys_Req)	0xff61 (Print)	0xff15 (Sys_Req)	0xff61 (Print)	0xff15 (Sys_Req)	
boris@linux-nc7100:~>

“CTRL-ALT-F2” does not do anything when the system is stuck during logon.

SSH will not work, since there is no wirelles connection at logon screen. Wirelles gets reconnected after I login.

SSH will not work, since there is no wirelles connection at logon screen. Wirelles gets reconnected after I login.

Hmm … I guess you’r using the NetworManager. I don’t know if it’s required for wireless devices but with the traditional ifup method, network devices should be activated at boot time (before login), whether they use static ips or dhcp.

Have you tried to boot in runlevel 3 (console login) ?

Also if you’re using kdm, as many people do, it would be interesting to have a look in /usr/share/kde4/config/kdm/kdmrc and maybe (for testing purpose) change the line “Allowshutdown=Root” in “Allowshutdown=All”. Make a copy of this file first !

However that’s the hard way. Maybe you can do this from Yast too or within kdm (sorry, I don’t know).

Yes I’m using the Network Manager. I tried ifup method, but firefox was too slow with that one and it frequently lost connection. So, I went with the good old Network Manager and my network connection has never been better.

As far as KDM is concerned, I don’t have it, I’m using GNOME.


In the meantime I reinstalled openSUSE 11.2 from scratch.
I still can’t shut down. So, it is not my mistake. It is a bug in the openSUSE.
I also checked my installation DVD, did not find any errors.

The only way to shut down my system, as I recently discovered, is to Logout and the press Shut Down button at the login screen.

I can’t imagine that Novell messed this up. It’s a basic feature of an OS to be able to shut it down.

First you have to find out if you’re using gdm or kdm. The new version of gdm (entirely rewritten from scratch) is so bad that I could imagine that openSUSE would install kdm by default, even with Gnome.

If you type : **ps ax | grep -e gdm -e kdm **
What does it say ?

In the meantime I reinstalled openSUSE 11.2 from scratch.
I still can’t shut down. So, it is not my mistake. It is a bug in the openSUSE.

What are you trying to do exactly ? Login as user from gdm (?) into Gnome desktop, then shutdown or restart from there ( System > shutdown ), right?

I just did it and it works. However I never boot in grapic mode (runlevel 5), always in runlevel 3 and start X from console (either with startx, gdm, kdm or xdm).

What you could do is login as root in Gnome (I’m aware that most people here won’t like that idea :\ ) and see if you can shutdown the system as root from the Gnome desktop. Maybe your gnome user profile is messed up or users don’t have the right to shutdown for some reason. You can also create a new user and see if he can shutdown.

Once you have a network connection, can you do ssh from another computer and monitor what’s happening when you try to shutdown. Does the following command provide any useful information:

sudo tail -f /var/log/messages ?

The only way to shut down my system, as I recently discovered, is to Logout and the press Shut Down button at the login screen.

That’s how I would do anyway. But shutdown from your Gnome session should be possible too.

boris@linux-nc7100:~> ps ax | grep -e gdm -e kdm 
 1280 ?        S      0:00 /usr/sbin/gdm
 1281 ?        S      0:00 /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1
 1282 tty7     Ss+    1:35 /usr/bin/Xorg :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-pWrf0C/database -nolisten tcp vt7
 1995 ?        S      0:00 /usr/lib/gdm/gdm-session-worker
 6580 pts/0    S+     0:00 grep -e gdm -e kdm
boris@linux-nc7100:~> 

I’m not doing anything unusual.
Login as user in GNOME and the shut down or restart indeed.
I’m using openSUSE 11.0 (GNOME) on this very machine and I can shut down and restart without any issue.

My gnome user profile can’t be messed up, as I still did not mount my /home partition. I’m using default /home created by the installation. I didn’t touch anything not even a screen-saver is changed.

Could you give me some instructions how to connect SSH? I have no experience with it. Do I need to install any clients or daemons?

In the meantime I’ll search through the /var/log/messages.

Did you press Ctrl+Alt+F1 immediately after the login screen appeared?
If you open terminal and run

sudo shutdown -r now

does login screen appear?

Check if the sshd daemon is running on the machine you want to connect to :

**chkconfig | grep sshd
**
If it says “off”, enable it with :

chkconfig --level 35 sshd on

Of course you’re doing that as root. This is the “hard way” (which I would call the “simple way”) but it can be achieved with Yast too if you prefer the GUI method.

On the other, machine, just type :
ssh -l user computer

where user is your login name on the server and computer the name or the ip of the computer you want to connect to. Of course your lan has to be configured properly : both computer on the same network and knowing each others (if you use computer names).

If you 're running the firewall on the server, it has to allow ssh (which I think is the default).

I did not press Ctrl+Alt+F2 immediately. I did it after trying to login back to GNOME desktop. The screen froze and then I pressed Ctrl+Alt+F2, but nothing happened.

Now I have repeated the exercise, pressing the Ctrl+Alt+F2 immediately. The following showed up in a black terminal:

Welcome to openSUSE 11.2 "Emerald"-Kernel 2.6.31.8-0.1-default (tty3)

linux-dc7100 login:

However, from there I was stuck. Trying to type my root password, type anything, but it did not react.


sudo shutdown -r now from the GNOME terminal results in following

boris@linux-nc7100:~> sudo shutdown -r now
root's password:
sudo: shutdown: command not found
boris@linux-nc7100:~> 

However, as root shutdown -r now resulted in a normal shut down.

try: sudo /sbin/shutdown -r now
If it works, it means that /sbin is not in the sudoers path.

You should add yourself to the group ‘wheel’ and uncomment one of these two lines in /etc/sudoers :

%wheel ALL=(ALL) ALL

%wheel ALL=(ALL) NOPASSWD: ALL

depending if you like to be asked for a password or not while running sudo. If we are lucky, it might solve your shutdown problem too.

When back at login screen I repeatedly press “Shutdown” button but nothing happened. Apparently this does not work always as well.
In /var/log/messages I only see the following line repeating:

Jan 23 17:09:57 linux-nc7100 shutdown[3111]: shutting down for system halt
Jan 23 17:10:04 linux-nc7100 shutdown[3122]: shutting down for system halt
Jan 23 17:10:10 linux-nc7100 shutdown[3126]: shutting down for system halt
Jan 23 17:10:16 linux-nc7100 shutdown[3130]: shutting down for system halt
Jan 23 17:10:21 linux-nc7100 shutdown[3134]: shutting down for system halt
Jan 23 17:10:25 linux-nc7100 shutdown[3138]: shutting down for system halt
Jan 23 17:10:30 linux-nc7100 shutdown[4258]: shutting down for system halt
Jan 23 17:10:36 linux-nc7100 shutdown[5672]: shutting down for system halt
Jan 23 17:10:40 linux-nc7100 shutdown[5676]: shutting down for system halt
Jan 23 17:10:45 linux-nc7100 shutdown[5680]: shutting down for system halt
Jan 23 17:10:49 linux-nc7100 shutdown[5684]: shutting down for system halt
Jan 23 17:10:53 linux-nc7100 shutdown[5688]: shutting down for system halt
Jan 23 17:10:58 linux-nc7100 shutdown[5692]: shutting down for system halt

Please find a larger fragment from /var/log/messages here. For me this is unreadable, but maybe you can get some clues.

sudo /sbin/shutdown -r now resulted in a normal shutdown.

I added myself to the wheel group, and modified /etc/sudoers as you advised.
sudo shutdown -r now still does not work.

What is the function of “wheel” group?
I checked my user settings in openSUSE 11.0 there I’m not a member of the “wheel” group. Still in openSUSE 11.0 shutdown work normally.

Actually it is normal, since users are not supposed to type “shutdown”. However it would work if you added /sbin to your user path by typing :
export PATH=$PATH:/sbin
before running shutdown.

You can use which to find out if a command is available for a user. After adding /sbin to your path, which shutdown will output : /sbin/shutdown, which indicates that the command has been found at this location.

But all that doesn’t explain nor solve your problem. Sorry about that.

What is the function of “wheel” group?

On BSD systems and some Linux distros, it’s a group of privileged users, who are allowed to run admin tasks (with or without password as explained in /etc/sudoers )

If I understand this thread correctly, the only thing wrong is that your path
does not include /sbin. If that is what you want to fix, then add the following
to .bashrc in your home directory:

PATH=$PATH:/sbin:/usr/sbin

This version also adds /usr/sbin to your path so that the commands there will
also be available.

Thanks for the explanation!

I tired another shutdown, successfully of course. This time I was logging the time of my actions (to compare it with the /var/log/messages).

This is the relevant part of the /var/log/messages:

Jan 23 18:55:24 linux-nc7100 init: Switching to runlevel: 0
Jan 23 18:55:27 linux-nc7100 gdm-simple-greeter[5888]: GLib-GObject-CRITICAL: g_param_spec_flags: assertion `G_TYPE_IS_FLAGS (flags_type)' failed
Jan 23 18:55:27 linux-nc7100 gdm-simple-greeter[5888]: GLib-GObject-CRITICAL: g_object_class_install_property: assertion `G_IS_PARAM_SPEC (pspec)' failed
Jan 23 18:58:39 linux-nc7100 shutdown[5902]: shutting down for system halt
Jan 23 18:59:35 linux-nc7100 shutdown[5907]: shutting down for system halt
Jan 23 19:03:00 linux-nc7100 shutdown[5932]: shutting down for system halt
Jan 23 19:06:07 linux-nc7100 gdm-simple-slave[5750]: WARNING: Child process -5870 was already dead.
Jan 23 19:06:07 linux-nc7100 gdm-simple-slave[5750]: WARNING: Unable to kill D-Bus daemon
Jan 23 19:06:07 linux-nc7100 gdm-session-worker[5891]: gkr-pam: couldn't get the password from user: Conversation error
Jan 23 19:06:07 linux-nc7100 gdm-session-worker[5891]: pam_unix2(gdm:auth): conversation failed
Jan 23 19:06:07 linux-nc7100 gdm-session-worker[5891]: PAM pam_putenv: NULL pam handle passed
Jan 23 19:10:48 linux-nc7100 pm-profiler: Power Button pressed, executing /sbin/shutdown -h now
Jan 23 19:10:48 linux-nc7100 shutdown[5955]: shutting down for system halt
Jan 23 19:11:00 linux-nc7100 pm-profiler: Power Button pressed, executing /sbin/shutdown -h now
Jan 23 19:11:00 linux-nc7100 shutdown[5961]: shutting down for system halt
Jan 23 19:11:04 linux-nc7100 pm-profiler: Power Button pressed, executing /sbin/shutdown -h now
Jan 23 19:11:04 linux-nc7100 shutdown[5967]: shutting down for system halt
Jan 23 19:11:09 linux-nc7100 pm-profiler: Power Button pressed, executing /sbin/shutdown -h now
Jan 23 19:11:09 linux-nc7100 shutdown[5973]: shutting down for system halt
Jan 23 19:11:13 linux-nc7100 pm-profiler: Power Button pressed, executing /sbin/shutdown -h now
Jan 23 19:11:13 linux-nc7100 shutdown[5979]: shutting down for system halt
Jan 23 19:12:34 linux-nc7100 kernel: imklog 4.4.1, log source = /proc/kmsg started.

I assume that Switching to runlevel: 0 is when I initiated the shutdown.

Once back at the login screen I tried clicking (3 times) the “Shutdown” button.
In the log this is shown as 3 subsequent shutdown[590]: shutting down for system halt* lines.

Then I tried user login to get back into the GNOME desktop. At that point WARNING: Child process -5870 was already dead.WARNING: Child process -5870 was already dead. shows up.

The login attempt was unsuccessful. I ended up with a blank screen.

The I pressed (5 times) the “Power” button of my PC. It is shown as pm-profiler: Power Button pressed, executing /sbin/shutdown -h now lines.

As you can see there is no way to shut down the PC, or login to GNOME desktop.
I notice that the power button initiates /sbin/shutdown -h now which worked before from the GNOME terminal, but in this case it does not work. What could be the reason?