LinuxQuestions.org
Review your favorite Linux distribution.
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 11-06-2011, 04:07 PM   #1
werdnaonaps
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Rep: Reputation: 0
Question Trouble getting sleep mode to work--Slackware 13.1 64 bit


Hello fellow Slackers! I've been using Slackware 13.1 for about a year now, and thus far I haven't run into any major problems after the first month or so that I it took for me to become acclimated to it. You know--learning how to Set it up for multilib, installing wine, installing the graphics card drivers and all those trivial things that still took my newbie mind a little while to grasp.


There is one thing that I can not get to work, however, and although I have used the search bar on this forum, and I have searched for a solution on google I have yet to find the solution. I can not suspend the darn thing to ram! When I use the KDE option, the screen simply turns black and the password prompt to resume session appears. But I can tell that the computer itself is not entering sleep mode, as the fan and the hard drive are still humming and the light next to the power button has not changed to indicate that it has entered sleep mode. I tried using pm-suspend as root without starting KDE but the screen simply blacks out for a second and then resumes running as though I had never called the command.


If it means anything, I'm dual booting with Windows 7 where sleep mode works just fine. I'm sort of lazy, and I don't feel like totally shutdown and booting up every time I'm away from my computer for an extended period of time. If anybody knows what the problem is and how to fix it, please let me know! If there is some kind of documentation that I missed I would also be overjoyed with a simple link. Any help is appreciated!
 
Old 11-10-2011, 12:30 AM   #2
mulyadi.santosa
Member
 
Registered: Sep 2011
Posts: 96

Rep: Reputation: 15
Hi...

you might find the following URL interesting to read:
http://help.lockergnome.com/linux/Sl...ict534346.html

try to read the whole thread until finish. One of the suggested solutions could be useful your case. No guarantee though
 
Old 11-11-2011, 09:40 AM   #3
veeall
Member
 
Registered: May 2007
Location: Estonia
Distribution: Slackware64-current
Posts: 298

Rep: Reputation: 56
And checking pm-suspend.log files in /var/log may help.
Be sure your user is in 'power' group too.
 
1 members found this post helpful.
Old 11-16-2011, 05:07 PM   #4
werdnaonaps
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by veeall View Post
And checking pm-suspend.log files in /var/log may help.
Be sure your user is in 'power' group too.
Hey, thanks to both of you! I was a little confused by the linked forum thread but I found an odd problem in my pm-suspend log.

Quote:
Thu Nov 10 22:26:53 EST 2011: performing suspend
/usr/lib64/pm-utils/pm-functions: line 295: echo: write error: No such file or directory
Thu Nov 10 22:27:00 EST 2011: Awake.
Thu Nov 10 22:27:00 EST 2011: Running hooks for resume
/usr/lib64/pm-utils/sleep.d/99video resume suspend:success.
/usr/lib64/pm-utils/sleep.d/98video-quirk-db-handler resume suspend:success.
/usr/lib64/pm-utils/sleep.d/95led resume suspend:not applicable.
/usr/lib64/pm-utils/sleep.d/94cpufreq resume suspend:success.
/usr/lib64/pm-utils/sleep.d/90clock resume suspend:not applicable.
/usr/lib64/pm-utils/sleep.d/75modules resume suspend:success.
/usr/lib64/pm-utils/sleep.d/55NetworkManager resume suspend:success.
/usr/lib64/pm-utils/sleep.d/49bluetooth resume suspend:not applicable.
/usr/lib64/pm-utils/sleep.d/01grub resume suspend:not applicable.
/usr/lib64/pm-utils/sleep.d/00powersave resume suspend:success.
/usr/lib64/pm-utils/sleep.d/00logging resume suspend:success.
Thu Nov 10 22:27:01 EST 2011: Finished.

As you can see, right after that error the computer automatically "wakes" itself from sleep mode. I am not personally doing anything to bring it back from sleep mode. When I try to use pm-suspend the computer appears to begin to sleep, but instantly brings itself back. I'm guessing that that error is the source of the problem? Obviously, something isn't there that should be, it doesn't work as root either so I don't think it's a user group issue. Do you know why that file isn't there and how I can fix it?
 
Old 11-16-2011, 06:20 PM   #5
veeall
Member
 
Registered: May 2007
Location: Estonia
Distribution: Slackware64-current
Posts: 298

Rep: Reputation: 56
For n00bs like me, first thing is to search google for this error message, this came up, and there're more:
http://www.linuxquestions.org/questi...to-ram-812694/

So which kernel is running your system, matters too. If you haven't already, first switch to generic kernel - you probably have to create an initrd for it. You can use /usr/share/mkinitrd/mkinitrd_command_generator.sh to simplify that. Also, make sure to update your boot loader to point to correct initrd file and kernel.
 
Old 11-16-2011, 06:54 PM   #6
werdnaonaps
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by veeall View Post
For n00bs like me, first thing is to search google for this error message, this came up, and there're more:
http://www.linuxquestions.org/questi...to-ram-812694/

So which kernel is running your system, matters too. If you haven't already, first switch to generic kernel - you probably have to create an initrd for it. You can use /usr/share/mkinitrd/mkinitrd_command_generator.sh to simplify that. Also, make sure to update your boot loader to point to correct initrd file and kernel.
Ha, well I'm not trying to come across as pretentious or anything. I'm not sure if you meant to be sarcastic when you said that but I get the impression you're a lot less new than me. I responded to that last post right after I read it, and I honestly have checked google and I've been finding posts where people seem to have the same problem as me, one blog I read said that it was a problem with shutting down the USB3 ports (which I do have). Honestly though, these threads are so full of unfamiliar technical jargon that I have trouble determining exactly what everybody is saying. That's why I created my own thread, so that I could learn more about my particular problem and ask questions pertaining to it and hopefully gain a better understanding of linux. I know that slackware has a steep learning curve, and I'm just trying to create a thread where I can ask questions directly.

Now, I've been going through the slackbook some, but I'm not entirely sure how to boot between two different kernels. How is a generic kernel different from the default kernel? Isn't the generic kernel supposed to be the kernel installed by default? I'm not sure how to modify the boot loader either.
 
Old 11-17-2011, 04:55 AM   #7
alekow
Member
 
Registered: Sep 2009
Distribution: Slackware
Posts: 230

Rep: Reputation: 75
Quote:
I'm not sure how to modify the boot loader either.
Take a look at /etc/lilo.conf and read the following:
Code:
man lilo
man lilo.conf
Also check line 295 of /usr/lib64/pm-utils/pm-functions file as that's where you may find the answer.
Quote:
Thu Nov 10 22:26:53 EST 2011: performing suspend
/usr/lib64/pm-utils/pm-functions: line 295: echo: write error: No such file or directory
Good luck!
 
Old 11-17-2011, 08:09 AM   #8
veeall
Member
 
Registered: May 2007
Location: Estonia
Distribution: Slackware64-current
Posts: 298

Rep: Reputation: 56
Sorry, werdnaonaps, if i sounded sarcastic, that was totally not my intention. I honestly consider myself quite n00b myself, i don't crasp bash scripting, deeper operating system internals etc, though i've been running slack since 2005. My english is not that good either, may cause misunderstandings.

Since you haven't fiddled with slack default kernels, i assume you are running 'huge' kernel, which happened to be cause for suspending trouble in the post i linked to.

So first you should switch to generic kernel. I do this by reinstalling it: 'slackpkg reinstall kernel' (as root) and uncheck kernels you don't want to reinstall (make sure only the generic one is checkmarked). By reinstalling 3 symlinks are created/replaced in /boot directory: vmlinuz, config and System.map.

Then you probably need to create an initrd file: issue '/usr/share/mkinitrd/mkinitrd_command_generator.sh' as root in terminal, it outputs a command that you can use to create an initrd file in /boot. Here it outputs this command: 'mkinitrd -c -k 2.6.37.5-mar -f ext4 -r /dev/sda1 -m usbhid:ehci-hcd:uhci-hcd:ext4 -u -o /boot/initrd.gz' - run it(your version of it) as root in terminal to create initrd, it will be named '/boot/initrd.gz' and lilo boot loader wants to know this.

Next step is to make your boot loader aware about the changes. If you bootloader is lilo, then you should edit /etc/lilo.conf. Type 'nano /etc/lilo.conf' in terminal as root (nano is a command line text editor). Since you reinstalled generic kernel the vmlinuz symlink it created (mentioned on the line 'image = /boot/vmlinuz' in lilo.conf) should already point to the correct kernel and you should only add a line marked in Bold:

Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section

...

# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda1
label = Slackware
initrd = /boot/initrd.gz
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
If done editing, save the changes by hitting Control+o and Enter (Control+x exits nano) and issue a command 'lilo -v' to update the boot loader. Watch for any error messages. That should be it, after reboot, you should be running a generic kernel. Test if suspending now works.

note:
I was assuming that you've been using 'lilo' as boot loader, since this is default in slackware. For 'grub' instructions would be slightly different, for legacy grub that is, i've never fiddled with grub2.

note2:
Of course, messing up with a boot loader or kernel can make your system unbootable - slackware installation media can become handy to boot into an already installed system - instructions are displayed at the first screen when booting from the dvd.

note3:
Just a sidenote: a 'huge' kernel is massive kernel with all modules built in to be compatible with most systems, for general use it is recommended to install a generic kernel and to create an initrd for modules needed to be available early at boot in slackware.

note4:
It occured to me that there's one more potential stumbling block in these instructions: if you've never previously used slackpkg, then first, you must uncomment a server closest to your location in '/etc/slackpkg/mirrors'. Double check to uncomment the correct mirror for your version of slackware, triple check for architecture (32bit, or 64bit if you've installed slackware64). Here in 32bit slackware-13.37 installation, the 'mirrors' file only lists servers for 32bit slackware, but previously servers for both architectures were listed, as i remember. Secondly you must update slackpkg database with 'slackpkg update', after which you can proceed with 'slackpkg reinstall kernel'.

note4-2:
There's even more potential blockages if you dig into it. There may be kernel updates available for slackware-13.1, in which case your best bet would probably be to install all updates beforehand with 'slackpkg upgrade-all', or if not all then at least kernel packages. 'man slackpkg' or 'slackpkg --help' for info on available command switches. Beware that after updating kernels, proprietary drivers (nvidia etc) might need to be reinstalled too. That's not actually that tricky just basics, though this is the longest post i've ever written in LQ.

Last edited by veeall; 11-17-2011 at 09:24 AM.
 
Old 11-17-2011, 11:48 AM   #9
mulyadi.santosa
Member
 
Registered: Sep 2011
Posts: 96

Rep: Reputation: 15
Quote:
Originally Posted by werdnaonaps View Post
Hey, thanks to both of you! I was a little confused by the linked forum thread but I found an odd problem in my pm-suspend log.
Hi....

Try to use the following command:
sed -n 293,297p /usr/lib64/pm-utils/pm-functions

The above command will show you the codes inside that pm-functions file starting from line 293 to 297. Paste here and let's solve it together. Or better, maybe you can get the clue right from it
 
Old 11-17-2011, 12:08 PM   #10
the_penguinator
Member
 
Registered: Jan 2009
Location: Canada
Distribution: slackware, OpenBSD, OSX
Posts: 233

Rep: Reputation: 25
what type of machine is it? desktop? laptop? what chipset is your video card?
do: foo@bar$lspci -vvand give the results for your vid card
 
Old 11-17-2011, 04:59 PM   #11
veeall
Member
 
Registered: May 2007
Location: Estonia
Distribution: Slackware64-current
Posts: 298

Rep: Reputation: 56
I just want to add, that for switching kernels there's even more simple and maybe safer way. Just look into /boot and note down a name for the generic kernel image, might be something alike: vmlinuz-generic-smp-2.6.37.5-smp

Create initrd.

Now, in lilo.conf, duplicate this section of your lilo.conf, don't just copy mine:
Code:
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda1
label = Slackware
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
Change label, must be single word.
Add 'initrd = /boot/initrd.gz' line.
Change 'image = /boot/vmlinuz' line to, from my example: image = /boot/vmlinuz-generic-smp-2.6.37.5-smp

And you're done, run 'lilo -v', watch for errors, and reboot. At lilo prompt choose the new entry you just created. If it doesn't work out, you can still boot into your current kernel.

I hope you haven't fried your system already by following my advices.
 
1 members found this post helpful.
Old 11-18-2011, 08:38 PM   #12
werdnaonaps
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Hey, thanks Veeall! I completely misread your post before, and I apologize for the misunderstanding! You're English is terrific, by the way. American secondary education is awful especially when it comes to foreign languages so I can not say that I have a firm grasp on any second language myself, though I hope college will change that. I appreciate the extensive detail of you put into your instructions. Compromising my boot files sounds pretty risky, but it's a free operating system so why not? I think I'm going to update to 13.37 before trying this though. Anyway, thanks again!
 
Old 11-25-2011, 05:17 PM   #13
werdnaonaps
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Original Poster
Rep: Reputation: 0
BAH! Well, I changed the kernel to generic kernel and I still had no luck.

Here's what line 295 of /usr/lib64/pm-utils/pm-functions


do_suspend() { echo -n "mem" >/sys/power/state; }


This is causing the following error:

/usr/lib64/pm-utils/pm-functions: line 295: echo: write error: No such file or directory
 
Old 11-26-2011, 04:48 AM   #14
veeall
Member
 
Registered: May 2007
Location: Estonia
Distribution: Slackware64-current
Posts: 298

Rep: Reputation: 56
Sorry, that's over my head. Here 'cat /sys/power/state' outputs 'mem disk'. You can try if you have the file, but i have no idea what this means.

Maybe you should give more information about your system as the_penguinator suggests, so maybe someone with the same hardware can step in.
 
Old 11-26-2011, 02:45 PM   #15
werdnaonaps
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Original Poster
Rep: Reputation: 0
The strange thing is that I formatted my partition to do a full install of the new 13.37 ( I was encountering a few obscure problems, so I wanted to do a full install) and the problem totally disappeared. Maybe there was some hardware driver update that fixed some issue? I guess I don't need help anymore though.
 
  


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
Having trouble installing php/apache in 32 bit mode danbopes Linux - Software 1 09-07-2011 07:37 AM
Ubuntu 10.04 sleep mode won't work cferron Linux - Laptop and Netbook 8 10-24-2010 02:36 PM
Suspend/Sleep mode doesn't work in any linux distro ayush.27 Linux - Hardware 12 09-23-2010 04:02 AM
how to disable sleep/hibernate mode in runlevel 3 mode libin88 Linux - General 1 11-23-2008 04:54 AM
Sleep Mode Doesn't Work RemusX2 Linux - Hardware 1 06-26-2004 07:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:39 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration