LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Not powering off (https://www.linuxquestions.org/questions/slackware-14/not-powering-off-491453/)

Bimbalhada 10-11-2006 10:43 AM

Not powering off
 
I have installed Slackware 11 recently (moved from Mandriva). Indeed I was fascinated by the speed increase and the ability to configure just about everything and the absence of fancy image loads during boot and so on. However, I stubled on some problems.

First, I am unable (as a user) to "shutdown -h now" or "halt" because I am not root user. How do I correct this?

Second, I swith over to root (either by logging in or "su") and issued a shutdown command. The procedure went fine, yes but it stopped at "power off". I should have powered down, but instead, kept consuming power. I press the computers power button but didn't work. So I kept it in for about 5 secs to force-power off. How do I fix this?

I'm using Slackware 11 (standard 2.4 kernel), DFI AK47-EC, AMD Athlon 800Mhz.

Thanks in advance.

adriv 10-11-2006 11:44 AM

Quote:

Originally Posted by Bimbalhada
Second, I swith over to root (either by logging in or "su") and issued a shutdown command. The procedure went fine, yes but it stopped at "power off". I should have powered down, but instead, kept consuming power. I press the computers power button but didn't work. So I kept it in for about 5 secs to force-power off. How do I fix this?

I'm using Slackware 11 (standard 2.4 kernel), DFI AK47-EC, AMD Athlon 800Mhz.

Thanks in advance.

No solution, but the same problem here.
My guess is that it's a bug.
I'm having the same issue with Ubuntu (on another machine), it's a known bug there.
:scratch:

yuchai 10-11-2006 11:59 AM

Don't have a solution for number 1. It doesn't bother me to have to run "halt" as a root user so I havent' looked into it. I'm sure you can set up some kind of "sudo" to enable it for a user. Note that you can reboot w/o being root by simply pressing Ctrl-Alt-Del anytime.

For problem #2 - try enabling APM by running "modprobe apm" as root and see if the system will power off automatically when you issue "halt". If that works you'll want to make sure the module is loaded during startup in /etc/rc.d/rc.modules

adriv 10-11-2006 03:02 PM

Quote:

Originally Posted by yuchai
For problem #2 - try enabling APM by running "modprobe apm" as root and see if the system will power off automatically when you issue "halt". If that works you'll want to make sure the module is loaded during startup in /etc/rc.d/rc.modules

That dit it!
Thanks. :)

@Bimbalhada,
What you can do is this: Start Control Centre (now I'm going to guess a bit, because my Slack is in Dutch, so it can be a bit different) --> Systemcontrol --> Login screen --> Shutdown.
There you can allow other users to shutdown.

Bimbalhada 10-13-2006 08:28 AM

Solved
 
The command "modprobe" solved the problem yes, but I didn't alter the rc.modules because I upgraded the kernel to 2.6 (and got a kernel panic because my root is reiserfs, but I solved it already) and the computer now powers off correctly without modprob'ing. Still I have the shutdown problem which was not solved by control panel. Somewhat I'll figure that out, but it's not a real problem anyway. Thanks for the help.

rigelan 10-13-2006 06:45 PM

If you issue a visudo command as root:

There are three lines you can uncomment, I think.

#ALL ALL=NOPASSWORD: /sbin/shutdown
#ALL ALL=NOPASSWORD: /sbin/halt
#ALL ALL=NOPASSWORD: /sbin/reboot

Assuming you know how to use vi, that should take care of it, and anybody who issues a /sbin/any of those three command should be able to shutdown, halt, or reboot.

Although I haven't actually done this, I assume it would work.

The other route, which I actually use is to use the KDE Login Manager, KDM. It allows me to log off no matter what person I am. And no, you don't have to use KDE & KDM. I use KDM to login, but then run fluxbox as my window manager.

checklist 10-13-2006 06:55 PM

Quote:

Originally Posted by Bimbalhada
Second, I swith over to root (either by logging in or "su") and issued a shutdown command. The procedure went fine, yes but it stopped at "power off". I should have powered down, but instead, kept consuming power. I press the computers power button but didn't work. So I kept it in for about 5 secs to force-power off. How do I fix this?


The "bareacpi.i" kernel solved this problem on all computers here.

msantinho 10-14-2006 04:41 AM

my /etc/sudoers

root ALL=(ALL) ALL

# Allow users on localhost to reboot this computer without asking for a password
%users localhost=NOPASSWD: /sbin/shutdown -r now

# Allow users on localhost to turn off this computer without asking for a password
%users localhost=NOPASSWD: /sbin/shutdown -h now

rigelan 10-14-2006 10:14 AM

msantinho has a better solution than mine. That way other users, such as the user who runs the apache webserver or other such things cannot shutdown the computer, only those who login can shut it down.

osor 10-14-2006 01:34 PM

The whole problem exists because of the kernel's confusion as whether to use APM or ACPI.

adriv 06-21-2007 05:59 AM

Quote:

Originally Posted by adriv
Quote:

Originally Posted by yuchai
For problem #2 - try enabling APM by running "modprobe apm" as root and see if the system will power off automatically when you issue "halt". If that works you'll want to make sure the module is loaded during startup in /etc/rc.d/rc.modules

That dit it!
Thanks. :)

@Bimbalhada,
What you can do is this: Start Control Centre (now I'm going to guess a bit, because my Slack is in Dutch, so it can be a bit different) --> Systemcontrol --> Login screen --> Shutdown.
There you can allow other users to shutdown.

But, on another machine where I installed Slackware, unfortunately, this doesn't work.
It's not a laptop, just a desktop, with a 2.6.18 kernel on a SATA-disk.

EDIT:
When I boot, log in (init 4) and choose for shutting down, it works.
Anyone an idea what is wrong?

H_TeXMeX_H 06-21-2007 12:55 PM

Quote:

Originally Posted by adriv
When I boot, log in (init 4) and choose for shutting down, it works.
Anyone an idea what is wrong?

Nothing wrong with that ... in fact, that's one of the better ways to achieve what you want, which is to be able to shutdown as regular user.

Usually shutdown problems happen on laptops that poorly support ACPI, in which case using APM instead, will solve the problem.

adriv 06-21-2007 01:36 PM

Quote:

Originally Posted by H_TeXMeX_H
Nothing wrong with that ... in fact, that's one of the better ways to achieve what you want, which is to be able to shutdown as regular user.

Usually shutdown problems happen on laptops that poorly support ACPI, in which case using APM instead, will solve the problem.

Well, it would be more convenient if commanding halt would do the job. ;)
I think you misunderstood me (my fault, I should have been more clear).

To get this straight:
Shutting down doesn't turn off the pc (all is stopped & unmounted, the led's go out), but to actually turn off power, I have to push the power button.
It's NOT a permissions-matter, as root it doesn't shut down properly either.

The strange thing is, when logging in (in kdm that is!), you can choose for Session (which desktopmanager you want) or System. In the latter menu choose for shutdown. That works!

How come it doesn't shut down in a normal way (when you click K-Menu --> Shutdown, etc., neither when you try it via command line (halt or shutdown -r)?

adriv 06-21-2007 03:41 PM

OK, been experimenting a bit:
Boot --> don't log in but choose for shutdown --> pc shuts down properly.
Boot --> log in to Fluxbox --> open xterm and type halt (as root) --> pc shuts down properly.
Boot --> log in to Xfce --> open xterm and type halt (as root) --> pc shuts down properly.
Boot --> log in to KDE --> open konsole and type halt (as root) --> pc does NOT shut down properly.
So I guess it's a KDE-thing.
But what?

H_TeXMeX_H 06-21-2007 03:47 PM

How very odd. I haven't seen anything like it. Must be something wrong with konsole. I recommend using something else.

This is very interesting tho, must remember this.


All times are GMT -5. The time now is 09:54 AM.