LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-13-2010, 08:16 PM   #31
Galib
Member
 
Registered: Mar 2009
Location: $HOME
Distribution: Slackware64
Posts: 69

Original Poster
Rep: Reputation: 17

Bump.
 
Old 03-14-2010, 08:00 PM   #32
Galib
Member
 
Registered: Mar 2009
Location: $HOME
Distribution: Slackware64
Posts: 69

Original Poster
Rep: Reputation: 17
Here's an output of lspci if anyone finds this helpful.

Code:
00:00.0 RAM memory: nVidia Corporation MCP78S [GeForce 8200] Memory Controller (rev a2)     
00:01.0 ISA bridge: nVidia Corporation Device 075e (rev a2)                                 
00:01.1 SMBus: nVidia Corporation MCP78S [GeForce 8200] SMBus (rev a1)                      
00:01.3 Co-processor: nVidia Corporation MCP78S [GeForce 8200] Co-Processor (rev a2)        
00:01.4 RAM memory: nVidia Corporation MCP78S [GeForce 8200] Memory Controller (rev a1)
00:02.0 USB Controller: nVidia Corporation MCP78S [GeForce 8200] OHCI USB 1.1 Controller (rev a1)
00:02.1 USB Controller: nVidia Corporation MCP78S [GeForce 8200] EHCI USB 2.0 Controller (rev a1)
00:04.0 USB Controller: nVidia Corporation MCP78S [GeForce 8200] OHCI USB 1.1 Controller (rev a1)
00:04.1 USB Controller: nVidia Corporation MCP78S [GeForce 8200] EHCI USB 2.0 Controller (rev a1)
00:06.0 IDE interface: nVidia Corporation MCP78S [GeForce 8200] IDE (rev a1)
00:07.0 Audio device: nVidia Corporation MCP72XE/MCP72P/MCP78U/MCP78S High Definition Audio (rev a1)
00:08.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Bridge (rev a1)
00:09.0 IDE interface: nVidia Corporation MCP78S [GeForce 8200] SATA Controller (non-AHCI mode) (rev a2)
00:0a.0 Ethernet controller: nVidia Corporation MCP77 Ethernet (rev a2)
00:0b.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Express Bridge (rev a1)
00:14.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Bridge (rev a1)
00:18.0 Host bridge: Advanced Micro Devices [AMD] Mobile K10 [Turion X2, Athlon X2, Sempron] HyperTransport Configuration (rev 40)
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 11h [Turion X2, Athlon X2, Sempron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] Mobile K10 [Turion X2, Athlon X2, Sempron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] Mobile K10 [Turion X2, Athlon X2, Sempron] Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] Mobile K10 [Turion X2, Athlon X2, Sempron] Link Control
02:00.0 VGA compatible controller: nVidia Corporation C77 [GeForce 8200M G] (rev a2)
07:00.0 Ethernet controller: Atheros Communications Inc. AR5001 Wireless Network Adapter (rev 01)
 
Old 03-16-2010, 09:53 PM   #33
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
Could you use suspend to disk as an alternative?
 
Old 03-23-2010, 11:42 PM   #34
Galib
Member
 
Registered: Mar 2009
Location: $HOME
Distribution: Slackware64
Posts: 69

Original Poster
Rep: Reputation: 17
Suspend to disk is not a valid alternative since I use my laptop at school and on the move a lot. Having it turn on quickly and go back to sleep when needed is crucial. Anyone have any thoughts on this issue?
 
Old 03-24-2010, 12:24 AM   #35
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
We could try to debug the suspend..

Hi Galib,

I'm not sure what's going on with your machine, or even if I can help figure it out. As mentioned within my suspend script's comments, anything weird dealing with ACPI or broken BIOS's, the script may not be able to deal with without some modification (and even then, who knows..). I haven't got a modern laptop, and of course, everything works fine for me when suspending my desktop.

What I suggest, is that you perform the debugging which is available within the script, as referenced in this snippet of the suspend2 script here:
Code:
#--------------------------------------------pm debug---------
 debug_pm_does_exist () {
  # To test/debug your system's suspend abilities, read the kernel
  # documentation about enabling/using CONFIG_PM_DEBUG
  # note: only one line must be uncommented at any time.
  #
  echo none > /sys/power/pm_test # really suspend (default)
  #echo freezer > /sys/power/pm_test # least invasive test
  #echo devices > /sys/power/pm_test # test device susp/resume
  #echo platform > /sys/power/pm_test # only w/suspend to disk
  #echo processors > /sys/power/pm_test # test CPU susp/resume
  #echo core > /sys/power/pm_test # most invasive test
 }
[ -f $pm_debug_exist ] && debug_pm_does_exist
#---------------------------------------------end pm debug-----
Before trying to debug, make sure that kernel_log=/var/log/kernel on or about line #88 of the script, is correct for your kernel log file. I may have set that special for my own system, so I can't recall if your kernel log is named /var/log/kernel or /var/log/kernel.log so make sure it is correct.
Also, make sure that the line here is set to 'y' on around line #76 of the script:
Code:
want_to_log_the_process='y' # change to y to log the suspend
So to try to debug suspend, you would comment out the first bold entry there in the chunk of script I pasted above (comment out that line with "echo none...") and UNcomment the next line (the freezer line) and try the script.

After each try suspending to mem like that, assuming your machine recovers properly and the hard disk is working normally (doing the script with each of those lines, one by one uncommented) please move the suspend2 logfile to another name (call it freezer.log for example) and then repeat this process for each of the debug lines possible in the script.

At some point, probably at one of the further-down of the debug lines, your machine will be screwed up as it is when your resume fails (i.e. the HDD will be read-only etc..) so you'll have to I suppose reboot and then save the suspend2 logfile again as another backup. After you're done all this, you now have a bunch of saved logfiles generated by the suspend2 script, one for each method of debugging (freezer, devices, platform, etc..). I would be willing to examine the logs and see if I can figure out what might be the problem. You can email them to me, rather than posting a whole whack of logs here (I will post back any logs that show particularly interesting stuff that might be related to the problem, since I alone may not be able to figure out what-all is the problem, and so if we DO figure it out, everyone else can see what it is.)

NO GUARANTEES or PROMISES but I'm willing to have a look. Also (you may have already said this) please tell me what make & model of laptop it is.

Final Note: In order for you to do ANY of this debugging at all, your kernel needs to have been built with Power Management Debugging enabled. The kernel config options required are as follows:
Code:
CONFIG_PM=y
CONFIG_PM_DEBUG=y
CONFIG_PM_VERBOSE=y
You can check if you have these by either manually checking your kernel's .config file, or by using the following command:
Code:
 zgrep CONFIG_PM /proc/config.gz
Sasha

Last edited by GrapefruiTgirl; 03-24-2010 at 12:28 AM. Reason: Added line about enabling logging the process.
 
Old 03-25-2010, 08:54 PM   #36
Galib
Member
 
Registered: Mar 2009
Location: $HOME
Distribution: Slackware64
Posts: 69

Original Poster
Rep: Reputation: 17
Thank you for the detailed response. I will have all of this posted soon enough, gotta finish writing a few papers. You'll hear from me soon.

Thanks again.
 
Old 04-01-2010, 08:59 PM   #37
Galib
Member
 
Registered: Mar 2009
Location: $HOME
Distribution: Slackware64
Posts: 69

Original Poster
Rep: Reputation: 17
Sorry for the delay. I've got a Compaq CQ-60, with an Nvidia 8000M Graphics card. One problem though is that my kernel wasn't built with debugging. When I do
Quote:
zgrep CONFIG_PM /proc/config.gz
I get
Quote:
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_SLEEP=y
CONFIG_PM_STD_PARTITION="\"\""
# CONFIG_PMIC_DA903X is not set
I don't know how to enable it, so I guess the first step for me would be to enable the debugging before I can follow your steps.

Thanks again!
 
Old 04-02-2010, 04:47 AM   #38
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
rebuild your slackware kernel

After looking at your above post, it occurred to me to have another look at my own .config file to see what I have in there, since I don't look too often. So, having done that, I notice the options in bold I have enabled. I strongly suspect that you already have those enabled as well (or the machine probably wouldn't even go to suspend, let alone pake up). But anyhow, either check your config by the same zgrep command as you did before, looking for these options as well, to make sure they are enabled.
Code:
#
# Power management and ACPI options
#
CONFIG_PM=y
CONFIG_PM_DEBUG=y
CONFIG_PM_VERBOSE=y
CONFIG_CAN_PM_TRACE=y
# CONFIG_PM_TRACE_RTC is not set
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
# CONFIG_HIBERNATION is not set
# CONFIG_PM_RUNTIME is not set
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
NOTE: You can either use zgrep like we already did (just to have a look), OR, since you want to enable kernel PM_DEBUG anyways, proceed with rebuilding your kernel (you need to do this to enable the options you don't have.)

So, if you want to rebuild your kernel to enable PM_debugging, there's how I would proceed (you're using Slackware, which is great, because so am I, so this procedure should be easy to run through ). I assume you're using LILO bootloader, and will use `xconfig` to configure the kernel:

1) make sure you have the kernel sourcecode installed. This folder should be located at:
/usr/src/linux which is often a symlink to:
/usr/src/<linux-version>
where <linux-version> is your kernel version;
for example: /usr/src/linux-2.6.32.5 - if you are running the 2.6.32.5 version of the kernel.
NOTE: you can check your kernel version by this command: uname -r

2) Copy that /proc/config.gz file over into the kernel sourcecode folder and give it a name like config.orig, like so:
Code:
# zcat /proc/config.gz > /usr/src/$(uname -r)/config.orig
3) cd into the kernel sourcecode folder.

4) do this:
Code:
# make clean
# make xconfig
5) you should now have a full-screen configuration application running, with loads of options everywhere. You can use the mouse or keyboard. Using the "File" menu item, open the config file we called "config.orig". Now you're ready to configure stuff; do not double-click anything by mistake, or it will toggle the setting!! You can single-click any text item to present its options.

6) In the "General Setup" section, double-click "Local Version - Append to kernel release". This will produce a text field where you type a name (a suffix) for the kernel you're about to build. Enter something like "-pmdebug" (without the quotations) and hit enter.

7) Now, you have to poke around to locate the PM_CONFIG and PM_DEBUG options, and enable what you need. I think most of them (all of them?) that you need are under the section "Power Management and ACPI Options".
NOTE: you will see there an option called "Suspend/resume event tracing" -- I do not have this enabled, but read the help there (and the warning about the clock) and see if you want to enable this. It might help, or might not.

8) When you have checked (enabled) the PM_debugging items and anything else you want/need, you can save the file. I always save the file twice: one version called ".config" which is what the build process looks for, and a second version called (in this case) "kconf-pmdebug" which is so that I know which kernel it belongs to, should I want to load it up and configure it again at a later date. Anyhow, by clicking the little DISK icon near the top left, this saves the ".config" file; then, click FILE > SAVE AS and enter a name you'll recognize, like "kconf-pmdebug". Now hit exit/quit.

9) You're back in the terminal now. type:
Code:
# make
# make modules_install
10) when those two commands are all done, your new kernel is ready. It is called bzImage, and it is located in the kernel sourcecode folder:
/usr/src/<linux-version>/arch/x86/boot/bzImage

Copy that item into your main /boot folder in the main filesystem, and rename it something you'll recognize (such as "2.6.33-pmdebug" or whatever you like that you'll recognize. Don't go nuts -- there's a limit on length of the name.)

11) Final steps: configure LILO bootloader.
Open the /etc/lilo.conf file with your text editor, and create a new image section for the new kernel you just installed. This should be fairly easy, using the already-pre-existing kernel's image section as a template; just copy the existing section, and change the names to reflect the name we used in step #10, and the name you want to see in your LILO menu at bootup. Save the file.

12) In your terminal again, type:
Code:
lilo
and expect something like this (the one with the asterisk is the default, or the top one in your LILO boot menu):
Code:
2.6.33-pmdebug
2.6.33    *
2.6.29
Your kernel names will vary from mine, but the point is: make sure you see your new kernel there, and that there is NO ERROR!! Very Important: No errors. If there's an error, don't turn off the machine. Fix the error first, and run the `lilo` command again until it's all clear.

All done. Reboot your new kernel. If you have for example an nVidia driver installed, you'll have to re-install it now, onto the new kernel (after booting).

Final Note: Right up until you run the `lilo` command, not much really changes on your machine. If things all go to crap while editing the kernel configuration, or if you can't figure out the lilo.conf file, don't panic! Let us know where you're at, what's been done, what the problem is, and someone will help you fix it and continue.

Good luck!
Sasha
 
1 members found this post helpful.
  


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
Lock screen (requiring password to unlock) when resuming from suspend theoldman Linux - Laptop and Netbook 2 12-17-2009 09:35 PM
Suspend to RAM yegnal Linux - Hardware 1 05-23-2009 06:21 PM
Plz explain Suspend to Disk and Suspend to Ram pkhera_2001 Linux - Newbie 2 02-18-2008 07:23 AM
Unable to unlock session with KDE 3.5.4 swampdog2002 Slackware 4 09-06-2006 11:41 PM
Unable to unlock sessions in kubuntu badbunny Ubuntu 0 03-14-2006 04:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:08 AM.

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