EzDevInfo.com

suspend interview questions

Top suspend frequently asked interview questions

How to troubleshoot suspend and hibernate in Ubuntu

I have Ubuntu Lucid installed on a Panasonic Toughbook CF-29. Most things work well, but, under Gnome, suspend and hibernate do not work. Interestingly, in Xubuntu, hibernate does work. So my question is twofold:

1) How do I troubleshoot the hibernate function in Gnome desktop (since I know the laptop can hibernate in Ubuntu), and

2) How to go about troubleshooting the suspend function? I got as far as looking at the /var/log/pm-suspend.log, but that just tells me the things that ran successfully... I'm kind of stuck there.


Source: (StackOverflow)

How to make GNOME 3 use suspend-hybrid?

How can I make GNOME 3 use pm-suspend-hybrid instead of pm-suspend when closing the lid or using suspend from the menu?


Source: (StackOverflow)

Advertisements

Is it safe to remove USB media when a computer is suspended?

We are often cautioned against unplugging USB drives in case it is currently being read from or written to. When a computer is suspended, hibernated, or asleep is it obviously not writing any data; it may have been in the middle of a read/write, however, it will have put such an operation on hold.

Since no arms are moving (for USB hard-drives), or bytes on the drive flickering on and off (for flash drives), is it then "safe" to unplug a drive?

Is this true even if data is being written to it, but the operation temporarily "suspended"? (assuming you don't mind that specific file only having been half-written to the drive)


Source: (StackOverflow)

Is there a way to call a script when Ubuntu wakes up from suspend or hibernate mode?

I have a little shell script that I run automatically when I log on to my Ubuntu machine; it will set the parameters of my touchpad the way I like it. However, when Ubuntu wakes up after being hibernated or suspended, my touchpad reverts to its default state and I have to run my little script again.

Is there some way I can automate this process thus that the script will be magically called when the machine wakes up again?


Source: (StackOverflow)

How to run a task every time computer resumes from suspend or hibernate in Windows

Is there a way in Windows XP to run a task every time a computer resumes from suspend/hibernate? On workstation unlock would also work.


Source: (StackOverflow)

Is my computer in ACPI S3 mode?

I recently got a new motherboard for my Intel Core 2 Quad 9300-based PC (the old motherboard was fried). The old motherboard was an ASUS IP35 Pro, while the new one is a Gigabyte G41MT-S2.

Since the change in motherboard/chipset, I've noticed that when the PC is idle for a long time, the power LED is turned off and the computer doesn't respond to keyboard/mouse events. However, pressing the power button results in a near-instant restoration of state.

The computer is clearly not in S1 suspend state, since the PSU appears to be off. Is this normal behaviour for any of the ACPI states? Is this what is supposed to happen in S3?


Source: (StackOverflow)

Inhibit suspend under Gnome

I have enabled the gnome (2.30) screensaver and set it to suspend the machine after so many minutes. It works fine!

Now, there are cases that I want to use the machine in "server mode". That is, there would not be physical activity on the machine while it serves files, or acts as a ssh terminal. As there is not physical activity, the machine would suspend after the time elapses. Is there a utility/script/something to inhibit suspend?

ps. I had no luck with the dbus/python scripts do circulate in the Internet, nor is the "inhibit" applet anywhere available in my gnome distribution. I use ubuntu lucid.


Source: (StackOverflow)

command line to suspend windows XP?

I'd like to suspend my windows machine after a specified time like

shutdown -s -t 3600

but I don't want to turn it off, but only switch to suspend mode. Is there a command line to do this?


Source: (StackOverflow)

Does Windows use an RTC wake up to switch from suspend to hibernate?

In Windows 7 power management, you can state that suspend should happen after x minutes, and hibernate should happen after y minutes.

So if x=10 and y=180, then the machine must come out of suspend at 180 minutes in order to carry out a hibernate.

If we want to do a similar thing under linux, we use RTC wake to tell the bios to automatically unsuspend in time for the hibernate process to happen (see this)

My question is - are these approaches the same, is Windows doing the same thing? Or does Windows do something else to get from one state to the other?

(note that this is not hybrid sleep, which allows for power-loss during suspend by effectively doing a hibernate before suspend - the above process works even with hybrid sleep disabled)


Source: (StackOverflow)

What is the relationship between s2disk and hibernate?

On a Debian system, there are packages called uswsusp and hibernate. The former contains a program named s2disk, the latter contains a program called hibernate. Superficially, these both do the same thing: the suspend the machine to disk. Usually, this works fine, but since I'm often using Debian testing and there are lots of changes in kernel and other packages (I assume), somethings this breaks. But then, when one of these programs doesn't work, sometimes the other works. Often, hibernate works when s2disk doesn't. Somewhat annoyingly, however, the "Suspend" or "Hibernate" buttons in the graphical user interfaces (e.g., LXDE, KDE) appear to be wired up to the s2disk program, so when that breaks I have to use hibernate manually.

So, what is the difference between these packages? Interestingly, the hibernate package "recommends" uswsusp, but the package description says that it "smartly puts your computer to sleep ... using one of the various methods available in the kernel". So apparently it can fall back to something else when the s2disk method fails?

And if hibernate is more powerful, why wouldn't the GUIs use it instead?


Source: (StackOverflow)

How do I diagnose Windows XP failure to automatically suspend on idle?

Since upgrading my hardware (mobo, CPU and memory) a couple months ago my computer no longer automatically suspends and hibernates after the configured idle periods. Both functions work just fine manually, but if I leave the computer on overnight it's still active the next morning even though it's configured to sleep after 3 hours and hibernate after 6 hours.

The system is:

Mobo       : MSI 790GX-G65
CPU        : AMD Phenom II 965 BE at 3.4 GHz
Memory     : Corsair DDR3 1600, at 1333 MHz and 9-9-9-21
HDDs       : 1 EIDE (System - O/S, Programs, etc), 2 SATA in RAID-0 (Data)
DVD        : 1 LITE-ON DVDRW SOHW-1673S
Card Reader: 1 multi-card reader
O/S        : Windows XP Pro SP3

Keyboard is attached via PS2 and mouse is USB.

How do I diagnose the cause of this?


EDIT: 2010-07-22

Since it seems most likely that this is an application or service resetting the idle counter, does anyone know how to observe and/or track this counter?


EDIT: 2010-07-28

Some testing shows that it automatically suspends up to 30 minutes, but not when set to 3 hours. Or perhaps it suspends only when Admin is logged on. Or perhaps it depends on which account is left active.


Source: (StackOverflow)

Laptop turns on spontaneously

I have a Dell Inspiron 1525 laptop, about three years of age. Usually I suspend it (put into sleep) in the evening and resume in the morning. Recently the laptop started turning on by itself during the night — not to mention that this always happens at about the same time!

The internet (e.g., this question) mainly suggests turning off Wake-On-LAN for the Ethernet card (I've long had it disabled through ethtool, let alone that there's no cable plugged in), or inspecting scheduled tasks. But I use GNU/Linux (kernel version 3.1.7, x86-64 arch), so the second option also doesn't seem plausible. The BIOS is at the latest version. I've checked the package manager logs and there were no suspicious/interesting changes during the period when this started happening.

Having spent some time looking into the problem online, I dare not ask for a ready solution, but for at least a suggestion of what could be wrong, and if this is likely to be a software or a harware problem. I imagine that it could be due to dust or partially broken/bent wires causing a short circuit and a pulse somewhere on the power button or other reset lines; but a software problem seems possible as well.

UPDATE: Thanks for the suggestions. Some additional info:

  • dmesg has no suspicious lines
  • The BIOS does not have (or show) any resume-on-alarm settings

Source: (StackOverflow)

Resume from Suspend comes back Locked now, what could have changed?

Win 7 Pro, 64 bit, on Dell Laptop. I use Suspend to RAM and Resume all the time, often 5-6 times a day. I rarely if ever shut down.

Recently I noticed that upon resume, I get screen that my account is Locked, and I need to click or hit enter to get a password box to login.

Prior to this, it would always resume to the password box, no need to click.

I have no issue with the password prompt, I like that since it slows someone down who finds my laptop (For the amount of time it takes to boot to a Linux ISO..).

I am curious what might have caused this change from just resuming to a password prompt, to now resuming to a screen saying Account Locked, click, and then password prompt. Any thoughts? I get suspicious when common behavior changes suddenly.

Edit: And then a week later it stopped doing it! Even stranger.


Source: (StackOverflow)

Disabling Keyboard Wakeup for Ubuntu 10.04 on Acer 1810TZ

My Acer Aspire 1810TZ laptop suspends fine but wakes up on any slight key-press. I would like to disable this behaviour. I read that it involves disabling something in the /proc/acpi/wakeup but SLPB does not seem to be listed at all.

root@1810TZ:/etc# cat /proc/acpi/wakeup 
Device  S-state   Status   Sysfs node
UHC0      S3     disabled  pci:0000:00:1d.0
UHC1      S3     disabled  pci:0000:00:1d.1
UHC2      S3     disabled  pci:0000:00:1d.2
UHCR      S3     disabled  
EHC1      S3     disabled  pci:0000:00:1d.7
UHC3      S3     disabled  pci:0000:00:1a.0
UHC4      S3     disabled  
UHC5      S3     disabled  
EHC2      S3     disabled  pci:0000:00:1a.7
EXP1      S4     disabled  pci:0000:00:1c.0
PXSX      S4     disabled  pci:0000:01:00.0
EXP2      S4     disabled  
PXSX      S4     disabled  
EXP3      S4     disabled  
PXSX      S4     disabled  
EXP4      S4     disabled  pci:0000:00:1c.3
PXSX      S4     disabled  pci:0000:02:00.0
EXP5      S4     disabled  
PXSX      S4     disabled  
EXP6      S4     disabled  
PXSX      S4     disabled

However, the relevant bits seem to be detected from dmesg.

[    0.357628] ACPI: AC Adapter [ACAD] (on-line)
[    0.357749] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[    0.357754] ACPI: Power Button [PWRB]
[    0.357817] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1
[    0.359319] ACPI: Lid Switch [LID0]
[    0.359390] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2
[    0.359394] ACPI: Sleep Button [SLPB]
[    0.359475] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
[    0.359479] ACPI: Power Button [PWRF]

Not quite sure what to do next.


Source: (StackOverflow)

Is there a way to suspend individual desktop applications to disk? (primarily Linux)

Note that this question is different than, but related to, "How do I suspend my computer?" It is also different than, but related to, questions about the "session management" capability in popular Linux desktop platforms.

Here's the scenario: It takes me 10 minutes to get my programming environment all set up the way I want it. I write a bunch of code. I go to sleep. The next morning I have to do something other than write code. Maybe it's compose a presentation. My coding tools are hogging a bunch of system resources, but I don't want to terminate them because they're a pain to set up again. Is there a way to take an application or group of applications and suspend them to disk in a kind of "live session" that I can then "unfreeze" later?

Note that this is a general problem; replace "programming environment" with "running a giant simulation" (or whatever) in the previous paragraph. It seems like this sort of thing should exist but maybe I just don't know what it's called. That, or there are some very good technical reasons for why it doesn't exist. I'm interested to hear about either.

Respondents should focus primarily on Linux desktop platforms. Though if, for example, this capability exists on Windows and not on Linux as a result of fundamental differences between them, I'd be interested to hear about it.

Thanks!

PS - Sorry for the namespace collisions in the problem description. Are there better terms than "suspend" and "session?"


Source: (StackOverflow)