LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-11-2006, 10:43 AM   #1
Bimbalhada
LQ Newbie
 
Registered: Oct 2006
Distribution: Slackware 11
Posts: 5

Rep: Reputation: 0
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.
 
Old 10-11-2006, 11:44 AM   #2
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 659

Rep: Reputation: 38
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.
 
Old 10-11-2006, 11:59 AM   #3
yuchai
Member
 
Registered: Jan 2005
Location: New York, NY
Distribution: Slackware 13.0
Posts: 56

Rep: Reputation: 15
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
 
Old 10-11-2006, 03:02 PM   #4
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 659

Rep: Reputation: 38
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.
 
Old 10-13-2006, 08:28 AM   #5
Bimbalhada
LQ Newbie
 
Registered: Oct 2006
Distribution: Slackware 11
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 10-13-2006, 06:45 PM   #6
rigelan
Member
 
Registered: Jul 2005
Location: Iowa
Distribution: Slackware
Posts: 172

Rep: Reputation: 19
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.

Last edited by rigelan; 10-13-2006 at 06:49 PM.
 
Old 10-13-2006, 06:55 PM   #7
checklist
LQ Newbie
 
Registered: Oct 2006
Location: Springfield, IL
Distribution: Slackware
Posts: 4

Rep: Reputation: 0
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.

Last edited by checklist; 10-14-2006 at 10:16 AM.
 
Old 10-14-2006, 04:41 AM   #8
msantinho
Member
 
Registered: Oct 2005
Location: Lisbon
Distribution: Slackware
Posts: 51

Rep: Reputation: 15
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
 
Old 10-14-2006, 10:14 AM   #9
rigelan
Member
 
Registered: Jul 2005
Location: Iowa
Distribution: Slackware
Posts: 172

Rep: Reputation: 19
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.
 
Old 10-14-2006, 01:34 PM   #10
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
The whole problem exists because of the kernel's confusion as whether to use APM or ACPI.
 
Old 06-21-2007, 05:59 AM   #11
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 659

Rep: Reputation: 38
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?

Last edited by adriv; 06-21-2007 at 10:42 AM.
 
Old 06-21-2007, 12:55 PM   #12
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
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.
 
Old 06-21-2007, 01:36 PM   #13
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 659

Rep: Reputation: 38
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)?

Last edited by adriv; 06-21-2007 at 01:45 PM.
 
Old 06-21-2007, 03:41 PM   #14
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 659

Rep: Reputation: 38
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?

Last edited by adriv; 06-21-2007 at 03:43 PM.
 
Old 06-21-2007, 03:47 PM   #15
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
monitor powering off dive Slackware 4 04-13-2006 12:05 AM
Powering off when powering off, how hard can it be? Ian_Hawdon Slackware 14 01-19-2006 03:19 PM
Powering up Interface TMH Linux - Networking 3 02-26-2005 06:07 PM
Powering off... daihard Linux - Software 1 12-22-2004 04:20 PM
Powering down a harddrive when it's idle. jsbush Linux - Hardware 6 11-03-2003 11:38 AM


All times are GMT -5. The time now is 11:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration