1

I have a laptop with Linux Slackware 14, KDE 4.8.5, kernel 3.9.0-rc6. When I close the lid and pull out the power cord, the machine goes into sleep mode. When I wake it, plugging the cord back in and opening the lid, the LEDs turn on, but the screen doesn't. The system responds via ssh. Maybe, it's Intel video driver?

What is going on? How can I fix it?

EDIT #1

Here is some additional info regarding my system:

Here's info about my video card:

lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor   
Family Integrated Graphics Controller (rev 09)

EDIT #2

Looking at the output in the log pm-suspend.log there is mention of an illegal instruction at line #48 of the 99video script. Here are the contents of that section of the script:

reset_brightness()
{
        for bl in /sys/class/backlight/* ; do
                [ -f "$bl/brightness" ] || continue
                BR="$(cat $bl/brightness)"
                echo 0 > "$bl/brightness"
                echo "$BR" > "$bl/brightness"
        done
}
user4035
  • 1,065
  • 2
  • 14
  • 35

2 Answers2

2

Debugging this type of issue can be tricky. I would first start with trying to manually force it into suspend mode with the following command:

PM_DEBUG=true pm-suspend

Then check /var/log/pm-suspend.log for hints on what might be going wrong. Perhaps something is going wrong during suspend mode.

Here's a good article on the Ubuntu wiki on how to debug this resumes from suspend.

Diagnosing PCI Bus of Video Card

On my laptop:

% lspci -v
...
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])
    Subsystem: Lenovo Device 215a
    Flags: bus master, fast devsel, latency 0, IRQ 45
    Memory at f2000000 (64-bit, non-prefetchable) [size=4M]
    Memory at d0000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 1800 [size=8]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: <access denied>
    Kernel driver in use: i915
    Kernel modules: i915

The address 00:02.0 corresponds to:

% ls "/sys/bus/pci/devices/0000:00:02.0/"
boot_vga                  drm/                      i2c-5/                    remove                    rom
broken_parity_status      enable                    irq                       rescan                    subsystem/
class                     firmware_node/            local_cpulist             reset                     subsystem_device
config                    graphics/                 local_cpus                resource                  subsystem_vendor
consistent_dma_mask_bits  i2c-0/                    modalias                  resource0                 uevent
device                    i2c-1/                    msi_bus                   resource2                 vendor
dma_mask_bits             i2c-2/                    numa_node                 resource2_wc              
driver/                   i2c-4/                    power/ 

To turn on the power control:

See what it's set to

% cat "/sys/bus/pci/devices/0000:00:02.0/power/control" 
auto

Set it to on

% echo "on" > "/sys/bus/pci/devices/0000:00:02.0/power/control" 

References

slm
  • 363,520
  • 117
  • 767
  • 871
  • I was wrong: the system responds through ssh. iptables were blocking. I got the log, but I don't know, what to search there - it's big. – user4035 Apr 20 '13 at 15:18
  • http://pastebin.com/iq5Q8CXz – user4035 Apr 20 '13 at 15:30
  • In this thread https://bbs.archlinux.org/viewtopic.php?id=158751&p=2 the guy said, that he enabled the screen by sending data into the file: `echo on > /sys/bus/pci/devices/0000\:00\:19.0/power/control`. How can I find, which file to use: I don't have this dir. – user4035 Apr 20 '13 at 15:48
  • cat "/sys/bus/pci/devices/0000:00:02.0/power/control" gives `on` to me – user4035 Apr 20 '13 at 16:46
  • both give `Illegal instruction` output. echo 'on' to `/sys/bus/pci/devices/0000:00:02.0/power/control` also doesn't change anything. – user4035 Apr 20 '13 at 17:03
  • xset dpms force off -> `xset: unable to open display ""` Can you come to chat? – user4035 Apr 20 '13 at 17:17
  • haha: `xset: unable to open display ":0.0"` – user4035 Apr 20 '13 at 17:22
  • One more thing to try: XAUTHORITY=/home/$YOURUSER/.Xauthority DISPLAY=:0.0 xset dpms force off. You need the XAUTHORITY variable and the DISPLAY variable for xset to work I believe. – slm Apr 20 '13 at 17:28
  • Let's clean up the comments! – slm Apr 20 '13 at 17:29
  • I am working as root there. Does it change anything about XAUTHORITY? – user4035 Apr 20 '13 at 17:29
  • Point to whatever user you use to login to the desktop. That's the .Xauthority file you need to have access to. – slm Apr 20 '13 at 17:30
  • I think, that this won't help. Because I didn't have X started on my system when I suspended. Of course, xset can't find the display. – user4035 Apr 20 '13 at 21:29
0

I fixed it. Here are the instructions:

1. I didn't have the swap - as I had 4 Gb of RAM. But swap is necessary for suspend mode. So I had to create a swap file of 4 Gb, using the instructions here: www.cyberciti.biz/faq/linux-add-a-swap-file-howto/

2 . Removed nomodeset kernel param from lilo.conf

user4035
  • 1,065
  • 2
  • 14
  • 35