12.1 System shutdown problems

I’m in the process of upgrading my systems to 12.1. Have installed it on one laptop (Lenovo T60p), but am running into problems getting the system to shut down properly. I’ll give a rather wordy explanation, since all the related posts I’ve found seem to expect a much different setup than mine. I don’t use either KDE or Gnome (FVWM window manager instead).

Shutting down is a two step process: Ctrl-Alt-Backspace to shut down X, Ctrl-Alt-Del to shut down the system.

Shutting down X: From what I’ve read, in order to get C-A-B to work correctly in the new xorg release, I have to add a DontZap = false option to the config. The 12.1 install uses an xorg.conf.d directory instead of xorg.conf file, and from searching I found that either adding a file 02-dontzap.conf

Section "ServerFlags"
  Option "DontZap" "false"
EndSection

or editing the 10-evdev.conf file to add the lines


Section "InputClass]
  Identifier "KeyboardDefaults"
  MatchIsKeyboard "yes"
  Option "XkbOptions" "terminate:ctrl_alt_bksp"

Both those seem to be picked up in /var/log/Xorg.0.log, yet neither has effect. Pressing CAB once just causes a beep. Pressing it twice in very quick succession does kill X, but almost immediately brings up the display manager again. There’s only a very brief window in which I can press Ctrl-Alt-Del, so short that I only manage to do it about half the time.

Shutting down system: This should be controlled by /etc/inittab. I’ve changed the “shutdown -r now” to “shutdown -h -P now”, but it still causes a reboot rather than shutdown. Changing to root and entering “shutdown -h -P now” from a terminal does do a power off, though.

Any suggestions for getting this to work correctly will be appreciated,

James

I do not have the solution to your problem, but I do note that ‘shutdown -r now’ is NOT intended to shut OFF power. It is designed to RESTART.

Open a terminal and type “man shutdown” and you will see the options.

On 2012-03-03 21:26, jamesqf wrote:

> Shutting down is a two step process: Ctrl-Alt-Backspace to shut down X,
> Ctrl-Alt-Del to shut down the system.

C-A-B is intended to first beep, then crash the desktop. You should log out
first. And then about your window of opportunity…

Do this. First log off properly, then ctrl-alt-f1, then ctrl-alt-delete.
And take your time about it.

Alternatively, touch the power button briefly.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Yes, that is true. That is why I changed the -r (restart) option to -h -P, which per the man page should halt the system and power down, which is what I want to happen.

Sorry, but no. I have been using X since sometime in the late '80s/early '90s, and X on Linux pretty much since there’s BEEN Linux. C-A-B has always, until this last version of Xorg, been the way in which one shuts down X. That is why the “DontZap = false” option exists, in order to allow this behavior.

Do this. First log off properly, then ctrl-alt-f1, then ctrl-alt-delete.
And take your time about it.

Perhaps you would care to elaborate on your version of “properly”? And explain why I should take more time to shut down my system than I need to?

Alternatively, touch the power button briefly.

Right, and risk corrupting disks that aren’t synced, etc?

Touching power (not holding it) should initiate a normal shutdown.

The reason we ask for such things is to see what happens which might point to a real solution. I don’t think anyone is suggestion that is a normal or desirable way to shut things down. We just need to see if it works or not.

Also be sure that your system is up to date since several people recently have reported similar problems and a update seems to have corrected it.

On 2012-03-04 06:16, jamesqf wrote:

> That is why the “DontZap = false” option exists, in
> order to allow this behavior.

Ok, but I think that the two presses is better than one, I prefer the
modern way.

And I only use it on emergencies as it corrupts the desktop.

>
>> Do this. First log off properly, then ctrl-alt-f1, then
>> ctrl-alt-delete.
>> And take your time about it.
>
> Perhaps you would care to elaborate on your version of “properly”?

Use the logout entry on the menu of your desktop. It should be obvious.

> And
> explain why I should take more time to shut down my system than I need
> to?

Sigh…

The meaning is to take all the time you need at your leisure, no need to be
fast and catch a short window of opportunity.

>> Alternatively, touch the power button briefly.
>
> Right, and risk corrupting disks that aren’t synced, etc?

Why would it? Linux intercepts that key press and shuts down the system
properly. When I’m using gnome and do that in my laptop I get a window that
prompts me to select the action to do: power off, hibernate, suspend…

Yes, the power button on modern machines does that.

Why would it corrupt your disk? If it does, you have a broken installation.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Which of course is your privilege, just as it is mine not to like doing things your way :slight_smile:

And I only use it on emergencies as it corrupts the desktop.

But as I believe I mentioned, I don’t HAVE a “desktop” in the sense of a Windoze-like interface. Not to get into rants, but if I wanted something that looked & acted like Windoze, I wouldn’t have wiped the pre-installed version of it off the disk when I bought the machine.

Use the logout entry on the menu of your desktop. It should be obvious.

Perhaps it would, IF I used KDE, Gnome, or some other “desktop”, but I don’t, and don’t want one. Nor do I want to have to laboriously mouse around through menus (something that is quite difficult for me) to perform a simple action that I’ve always done with a couple of keystrokes.

The meaning is to take all the time you need at your leisure, no need to be
fast and catch a short window of opportunity.

If someone would just tell me how to set up C-A-B to work as it always did, I wouldn’t have to be fast. I’m not the one that decided the default would be two keypresses in very quick succession to give a window of opportunity measured in milliseconds to shut down. I’m just asking how to change this default because it doesn’t suit me.

Why would it? Linux intercepts that key press and shuts down the system
properly. When I’m using gnome and do that in my laptop I get a window that
prompts me to select the action to do: power off, hibernate, suspend…

Again, I don’t use Gnome, and I don’t want to get a menu of selections. When I decide to shut the system, it’s because I know that’s what I want to do. As for shutting down “properly”, exactly the same shutdown actions should (or could) be invoked by the keypresses as by clicking on a menu button.

Why would it corrupt your disk? If it does, you have a broken installation.

Pressing the power button should shut off the power. Shutting off the power always risks not having disks synced and so on.

A brief touch of the power button does nothing at all. (not even a write to /var/log/messages)

Also be sure that your system is up to date since several people recently have reported similar problems and a update seems to have corrected it.

How recently is up-to-date? The system was installed (from network) a couple of weeks ago - 2/17 to be exact. The online update option in Yast shows only about half a dozen updates to be installed, none that seem relevant to the OS. (There’s a zypper one, something to python, etc.)

On 2012-03-04 20:36, jamesqf wrote:
> > robin_listas;2445662 Wrote:
>>

>> And I only use it on emergencies as it corrupts the desktop.
>
> But as I believe I mentioned, I don’t HAVE a “desktop” in the sense of

You said you are using fvwm, and that is a desktop in the linux sense. I
did not mention Windows here, as far as I remember.

> If someone would just tell me how to set up C-A-B to work as it always
> did,

I understood you already edited “DontZap”. Is it not working? Then you
should post another thread with an appropriate title to attract those that
know about that setting. I don’t. I know it exists but I never cared to
change it.

About powering off via keyboard easily, I already told you that the
sequence “ctrl-alt-f1” and then “ctrl-Alt-delete” should work. You haven’t
commented on that, instead you started to rant those that tried to help you.

>> Why would it corrupt your disk? If it does, you have a broken
>> installation.
>
> Pressing the power button should shut off the power. Shutting off the
> power always risks not having disks synced and so on.

Not in a modern computer with a modern operating system. Modern here can
mean several years. It only powers off the computer if the operating system
accepts, and when it accepts and in its own terms, meaning it goes through
the entire procedure of halting graphics, stopping all the processes,
syncing the disks, and finally, power off. There is absolutely no danger.

If this doesn’t happen on your machine, then you have some problem. And
that is the easiest and faster way of achieving what you want. One key press.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

FVWM is a window manager, not a desktop in the Linux sense - or at
least not in the sense that my fraction of the Linux community uses the
term. Not to get too far off, but a desktop is pretty much defined by
its use of the Windows paradigm, where files &c are represented as icons,
the user interacts by clicking (or worse, double-clicking) on them.

I understood you already edited “DontZap”. Is it not working? Then you
should post another thread with an appropriate title to attract those that
know about that setting. I don’t. I know it exists but I never cared to
change it.

Yes, setting DontZap in xorg.conf.d is not working. Apologies if I failed
to make that clear in my original post. And I thought one post addressing
two related problems would be simpler for everyone.

About powering off via keyboard easily, I already told you that the
sequence “ctrl-alt-f1” and then “ctrl-Alt-delete” should work. You haven’t
commented on that, instead you started to rant those that tried to help you.

Perhaps I failed to comment on the C-A-F1 because it didn’t address my
question, which was how to fix 12.1 so I can shut down X using C-A-B,
as I have been doing for the last twenty years or more.

If you see my responses as a rant, try to look at it from my point of view
for a moment. I asked a question. Instead of providing a responsive
answer, you try to evangelize me into doing things your way. (And yes,
I did search for previous posts on the question :-)) I didn’t intend a rant:
my intent was to explain (I hoped patiently) that I do not want to do things
your way (or Bill Gates’ way, Steve Jobs’ way, KDE’s way, etc.). I have tried
those ways, and they don’t work well for me.

Not in a modern computer with a modern operating system. Modern here can
mean several years.

Well, I did say that the machine I’m doing the install on is a Lenovo T60p, which
is not exactly the newest machine on the block (I think I bought it in '08). I keep
it as a spare, and use it to do things like installing new OS releases, so that I don’t
risk having either of my work machines out of service.

In any case, whether it’s down to hardware or an OS issue, it doesn’t work on
that machine.

On 2012-03-05 05:56, jamesqf wrote:
>
> robin_listas;2445801 Wrote:

> FVWM is a window manager, not a desktop in the Linux sense - or at
> least not in the sense that my fraction of the Linux community uses

That’s been picky. :slight_smile:

You should have understood and not wander off on side tracks. I could be
more picky :slight_smile: and say that a window manager in Linux is only part of the
picture, because the window manager in gnome is only windowmaker or
whatever they use now. It could be enlightement or something else. At least
it could be done in the past, maybe not so easy nowdays.

The wikipedia definition says:

+++···················
A window manager is system software that controls the placement and
appearance of windows within a windowing system in a graphical user
interface.[1] Most window managers are designed to help provide a desktop
environment. They work in conjunction with the underlying graphical system
which provides required functionality such as support for graphics
hardware, pointing devices, and a keyboard, and are often written and
created using a widget toolkit.[2]
···················+±

Notice the wording “desktop environment”. If you read the article,
microsoft is mentioned after xwindows.

But that is wandering off following roads that do not help your problem, so
lets go back.

> Yes, setting DontZap in xorg.conf.d is not working. Apologies if I failed
> to make that clear in my original post. And I thought one post addressing
> two related problems would be simpler for everyone.

It was not clear, and in these fora we tend to concentrate on one question
only, the main one as stated in the subject, that is, that power off is
problematic for you. You want to power off fast, and we offer solutions
that we know on how to power off fast. I gave two fast methods, and you
like neither. What can I do?

I do not comment on how to make dontzap work because I don’t use it and
thus I don’t know. If it is documented and it doesn’t work, you can raise a
bug, but I would first ask specifically about that feature in the subject
line, perhaps somebody knows about it.

I ggogled the word and saw several references. Some are for ubuntu, some
for bsd:

+++···················
This is due to the fact that “DontZap” is no longer an option in the X
server and has become an option in XKB instead.
···················+±

> for a moment. I asked a question. Instead of providing a responsive
> answer, you try to evangelize me into doing things your way. (And yes,

No, I did not evangelize. I’m sorry you thought that.

> In any case, whether it’s down to hardware or an OS issue, it doesn’t
> work on that machine.

It should… and your machine is not that old (machines from 2000 had this
feature working). If you are interested, we can try to find out why. It
could be a bios bug or feature, or that acpi is disabled in the kernel.
perhaps a perusal of the booting log would say. The button can be
configured to do other things: I had my desktop set to hibernate instead.
Maybe it can be configured to ignore, but I doubt it is the default. Maybe
fvwm ignores it, but the login manager (I don’t know which one you use)
should capture it. It can even work in text mode.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-03-05 13:58, Carlos E. R. wrote:

> I do not comment on how to make dontzap work because I don’t use it and
> thus I don’t know. If it is documented and it doesn’t work, you can raise a
> bug, but I would first ask specifically about that feature in the subject
> line, perhaps somebody knows about it.
>
> I ggogled the word and saw several references. Some are for ubuntu, some
> for bsd:
>
> +++···················
> This is due to the fact that “DontZap” is no longer an option in the X
> server and has become an option in XKB instead.
> ···················+±

Something else.

If you get C-A-B working with a single hit, you will have the same problem:
graphics mode is restored instantly, and this is of course intentional. You
can kill the current graphical session or the login manager, be it gdm, kdm
or xdm; but the login manager will restart and prompt you to login as fast
as it can return. It is this login manager which controls actions as reboot
or power down.

To defeat this I think you have to hack at the initialization scripts of
systemv or systemd, which will not be easy as it is working as intended.

You may be tempted to use startx instead, but this functionality will be
short lived: they intend to remove it from all distributions.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

OK, that’s one of those “I’m firm, you’re stubborn, he’s pigheaded” discussions.
What I’d intended to do was explain the problem fully. The important point
in this is that I use FVWM (and am not interested in switching), and it has no
button, menu item, or other way to shut down X or the system. It might be
possible to implement such, but then it should equally be possible to hook the
necessary commands to any key combination…

It was not clear, and in these fora we tend to concentrate on one question
only, the main one as stated in the subject, that is, that power off is
problematic for you. You want to power off fast, and we offer solutions
that we know on how to power off fast. I gave two fast methods, and you
like neither. What can I do?

I guess I didn’t express my question clearly. The “power off quickly” will
(I hope!) be a side effect of getting an answer to my real question, which
is how to make my SUSE 12.1 install behave the same way that previous
versions did WRT shutting down. As I said, I have been using X and Linux/
unix for a lot of years: I have ways of working that work well for me, and
I’m not interested in changing unless I can see some benefit to be gained.

(Besides, my dogs have learned to recognize the C-A-B, C-A-Del keystrokes,
and know that means it’s time to go for a hike, so I’d have to retrain them,
too.)

I ggogled the word and saw several references. Some are for ubuntu, some
for bsd:

I did the same (or similar) searches before posting here, but none of the solutions
I found worked for me.

It should… and your machine is not that old (machines from 2000 had this
feature working). If you are interested, we can try to find out why. It
could be a bios bug or feature, or that acpi is disabled in the kernel.
perhaps a perusal of the booting log would say.

It would be interesting to know, even if I don’t use the feature. There’s
nothing in the BIOS setup that seems relevant. The kernel is the plain
vanilla install one. I do get some lines in /var/log/warn about “Outdated
ThinkPad BIOS/EC firmware”, and “Deprecated procfs I/F for A/C and
battery”, which I don’t see on my newer T61 with SuSE 11 installed.

The button can be configured to do other things: I had my
desktop set to hibernate instead. Maybe it can be configured to ignore,
but I doubt it is the default. Maybe fvwm ignores it, but the login manager
(I don’t know which one you use) should capture it.

I don’t remember seeing anything in FVWM docs about it, though I’m hardly
an expert. Login manager (= displaymanager?) is xdm. Power button
doesn’t do anything from it, either.

Thanks,
James

PS: Irrelevant digression:

The wikipedia definition says:

+++···················
A window manager is system software that controls the placement and
appearance of windows within a windowing system in a graphical user
interface.[1] Most window managers are designed to help provide a desktop
environment.
···················+±

Notice the wording “desktop environment”.

Yes, generally a “desktop environment” is built on top of a window manager
(logically, at least, even if the actual code is integrated), in the same way that
the window manager is built on top of the graphics core. It’s the common
“layers of functionality” paradigm. So I want the window manager layer, but
not the “desktop full of icons” one, because I’ve never been able to extract any
real meaning from those pictures…

On 03/05/2012 07:36 PM, jamesqf wrote:
> robin_listas;2445899 Wrote:

> OK, that’s one of those “I’m firm, you’re stubborn, he’s pigheaded”
> discussions.

No problem, use what you like :slight_smile:

It is possible, though, that a solution you like does not exist, or that
we don’t know it. We know other methods yo do not like.

>> I ggogled the word and saw several references. Some are for ubuntu,
>> some for bsd:
>
> I did the same (or similar) searches before posting here, but none of
> the solutions I found worked for me.

The ubuntu one points that the xorg definition of that variable does not
work now, that you have to do it somewhere else. More than that I do not
know.

> vanilla install one. I do get some lines in /var/log/warn about
> “Outdated ThinkPad BIOS/EC firmware”, and “Deprecated procfs I/F for A/C and
> battery”, which I don’t see on my newer T61 with SuSE 11 installed.

Mmmm. It could be that.

>
>> The button can be configured to do other things: I had my
>> desktop set to hibernate instead. Maybe it can be configured to ignore,
>> but I doubt it is the default. Maybe fvwm ignores it, but the login manager
>> (I don’t know which one you use) should capture it.
>
> I don’t remember seeing anything in FVWM docs about it, though I’m
> hardly an expert. Login manager (= displaymanager?) is xdm. Power button
> doesn’t do anything from it, either.

Well, that’s a pity.
I had to stop using xdm, which I preferred, because somethings did not
work from there, and this could be one.

Don’t forget the other post I sent some hours ago.


Cheers / Saludos
Carlos E. R.

Sounds like the issue I am experiencing is similar to the one in this thread.

I recently completed an upgrade from an earlier version, 11.0 if you must know, to 12.1. If I am logged into KDE, and I briefly touch the power button, what happens in 12.1 is that the system logs me out of KDE and goes back to the log on screen. It does not shut down. It takes a subsequent brief press of the power button to shut the system down. In 11.0, pressing the power button while logged in to KDE shut down the computer. This is the behavior I would like to see. Is there a way to change this behavior so that the computer shuts down when logged into KDE?

Also, I run BOINC. I have a script that starts BOINC when the computer boots, and should shut BOINC down when the computer is shut down. While shutting down the computer with 12.1, I noted that BOINC was trying to make contact with the World Community Grid project site, and the computer was failing to shut down - KDE had shut down, and virtually every other proc had shut down, but BOINC was still running. This appeared to be keeping the computer from shutting down.

My script used killproc to shutdown BOINC; however, even running killproc from the command line was not killing BOINC, and using killproc -v I was able to determine that the killproc was actually sending SIGTERM, then SIGKILL to the proper process. My solution to this was to run 'kill -1 ps -e|grep boinc|cut -d ' ' -f2’ (I am not at my machine, so this might not be totally accurate). The ps, grep, cut combo gets the pid of BOINC and feeds it to kill.

Anyway, seems like there might be some unexpected behavior with killproc. I do not know whether killproc is not working with other processes, however, in my case, it is not working for the boinc process anymore. It did work in 11.0. Perhaps some of the problems that people are experiencing with the computer not shutting down are related to the usage of killproc in shutdown scripts??

On 2012-03-08 16:56, wiyosaya wrote:
>
> Sounds like the issue I am experiencing is similar to the one in this
> thread.
>
> I recently completed an upgrade from an earlier version, 11.0 if you
> must know, to 12.1.

An upgrade with a jump so large is not supported, so I wonder what method
you used for the upgrade. You might have leftovers from 11.0.

Re boinc, the normal shutdown procedure does something like that. It calls
the init.d scripts in order, then issues a kill signal to remaining
processes, waits a bit, then issues a kill 9 to the remaining processes.
You would only need your script to be non-locking.

However, the entire init system in 12.1 has been changed to systemd, things
have changed a lot in this respect.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

As for the upgrade process, please see this thread -
http://forums.opensuse.org/english/get-technical-help-here/applications/472669-suseregister-error.html
Cheers.

I forgot to mention that there is a known bug in 12.1 with systemd see this. It causes the system to shutdown all processes without powering off. The suggested work-around is in comment 20 on the bug thread. Basically, the work-around is to install the sysvinit-init package.

All the best.

On 2012-03-09 03:26, wiyosaya wrote:

> As for the upgrade process, please see this thread -
> http://tinyurl.com/6mrcflb

Ah, ok, so you cleared the leftovers. You could just have said that :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)