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! |
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 :) |
And checking pm-suspend.log files in /var/log may help.
Be sure your user is in 'power' group too. |
Quote:
Quote:
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? |
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. |
Quote:
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. |
Quote:
Code:
man lilo Quote:
|
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 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. :) |
Quote:
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 :) |
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 |
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 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. ;) |
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!
|
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 |
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. |
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.
|
Cool! :) 13.37 is nice release anyway, i'm enjoying it on my netbook.
|
Quote:
Well, AFAIK, best practice in most cases for upgrade is by doing reformat and full install. The exception is probably a rolling release distro, but it has its own quirks too. Glad you make it man! :) Maybe it's the swap formatter, maybe it's the power manager.... :) |
All times are GMT -5. The time now is 05:47 AM. |