Solved Thinkpad laptop: Unable to resume from S3 suspend

Hi all,

I am trying to get FreeBSD running one of my Thinkpads, the X201. I can get the machine to suspend but upon resume the screen is black. I can SSH into the machines just fine so it does come up, but I can't get the screen to come alive.
Looking on the forum some people recommend to run "sysctl hw.acpi.reset_video=1", so I tried this and suspended a second time. It goes to sleep ok, but upon resume the machine is completely unresponsive (can't SSH, not even the caps/scroll/num lock LEDs turn on when buttons are pressed) requiring a hard reboot.

This seems to be a common fault across all my machines. I've also tried with a T490 laptop and my Desktop (see here) all of which seem to have this issue

According to the FreeBSD laptop compatibility wiki, both the T490 and X201 entries state that suspend/resume works. So I must be doing something wrong. Is there any specific configuration I need to do to get it to work on the X201?

All I've found so far is on https://wiki.freebsd.org/SuspendResume, where they say if resume does not work to reset my BIOS and try again, which I've done with no change.
 
Try to disable TPM, it causes all kinds of bad things with resume as far as I can tell.
There also are several sysctl knobs dealing with vt switching you can play with, check "sysctl -a|grep switch" for an idea.
 
i think you have used GDM and gnome . that is gdm issue, i dont' have petty solution. you can disable gdm service in rc.conf. and manual start gnome-session. but this solution still have a issue about no locking screen function.
 
Thanks for the responses!

I guess I should mention: I don't use GDM or similar login managers. I start my X session with startx into windowmaker.

The above occurs whether I am in a X session or just on the plain console.

I also do not have TPM enabled, primarily because it seems to create more problems than it solves even outside of suspend/resume.

I will have a look at the switches in in sysctl and see if there is anything there that might help, but more guidance is always appreciated :)
 
I have T480 - last time i tried suspend - i had to restart wifi since then im not using suspend - power off and im fine. Takes extra seconds but i wont have any issues and dont need any extra configuration.
 
How the splash_changer works on practice? Does it appear during the whole boot after the boot menu? Or it just substitute the beastie logo in the middle of the boot? And what img format are you using?
 
Just to be sure I've just done a full update of my X201, and checked that suspend and resume still works. It takes about 3-4 seconds to suspend/resume, and emits a loud beep at the end of each. See screenshot. Config files attached. I use windowmaker with sddm.

PS I haven't tuned the config for a couple of years so it may be a bit flakey, but suspend and resume definitely works.
2024-09-07-15:57:46_1280x800.png
 

Attachments

  • loader.conf
    93 bytes · Views: 29
  • sysctl.conf
    1.2 KB · Views: 25
  • rc.conf
    1.2 KB · Views: 31
Just to be sure I've just done a full update of my X201, and checked that suspend and resume still works. It takes about 3-4 seconds to suspend/resume, and emits a loud beep at the end of each. See screenshot. Config files attached. I use windowmaker with sddm.

PS I haven't tuned the config for a couple of years so it may be a bit flakey, but suspend and resume definitely works.
View attachment 20256
Mine does the loud beep on suspend and resume as well, also takes 3-4 seconds, but the screen stays completely black upon resume.

I will apply your config and see if the issue gets fixed.
 
I'm running bios version 6QET70WW (1.40).

# dmidecode -t 0
# dmidecode 3.6
Scanning /dev/mem for entry point.
SMBIOS 2.6 present.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: LENOVO
Version: 6QET70WW (1.40 )
Release Date: 10/11/2012
Address: 0xE0000
Runtime Size: 128 kB
ROM Size: 8 MB
Characteristics:
PCI is supported
PC Card (PCMCIA) is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
ESCD support is available
Boot from CD is supported
Selectable boot is supported
EDD is supported
3.5"/720 kB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Targeted content distribution is supported
BIOS Revision: 1.64
Firmware Revision: 1.21
 
Thanks for that, looking at my machine I am running an older BIOS
Code:
# dmidecode 3.6

Scanning /dev/mem for entry point.

SMBIOS 2.6 present.
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
    Vendor: LENOVO
    Version: 6QET46WW (1.16 )
    Release Date: 06/07/2010
    Address: 0xE0000
    Runtime Size: 128 kB
    ROM Size: 8 MB
    Characteristics:
        PCI is supported
        PC Card (PCMCIA) is supported
        PNP is supported
        BIOS is upgradeable
        BIOS shadowing is allowed
        ESCD support is available
        Boot from CD is supported
        Selectable boot is supported
        EDD is supported
        3.5"/720 kB floppy services are supported (int 13h)
        Print screen service is supported (int 5h)
        8042 keyboard services are supported (int 9h)
        Serial services are supported (int 14h)
        Printer services are supported (int 17h)
        CGA/mono video services are supported (int 10h)
        ACPI is supported
        USB legacy is supported
        BIOS boot specification is supported
        Targeted content distribution is supported
    BIOS Revision: 1.22
    Firmware Revision: 1.9

As I've not had any luck getting it to resume with your config, I will try to update the BIOS to the latest Lenovo provide to see if that fixes it.
 
Well I updated the BIOS, it is now the same as yours:

Code:
# dmidecode 3.6

Scanning /dev/mem for entry point.
SMBIOS 2.6 present.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
    Vendor: LENOVO
    Version: 6QET70WW (1.40 )
    Release Date: 10/11/2012
    Address: 0xE0000
    Runtime Size: 128 kB
    ROM Size: 8 MB
    Characteristics:
        PCI is supported
        PC Card (PCMCIA) is supported
        PNP is supported
        BIOS is upgradeable
        BIOS shadowing is allowed
        ESCD support is available
        Boot from CD is supported
        Selectable boot is supported
        EDD is supported
        3.5"/720 kB floppy services are supported (int 13h)
        Print screen service is supported (int 5h)
        8042 keyboard services are supported (int 9h)
        Serial services are supported (int 14h)
        Printer services are supported (int 17h)
        CGA/mono video services are supported (int 10h)
        ACPI is supported
        USB legacy is supported
        BIOS boot specification is supported
        Targeted content distribution is supported
    BIOS Revision: 1.64
    Firmware Revision: 1.21

The system is back up and running (Without the screen working), so I had a look at what happened in the logs between suspend and resume, the result:

Code:
Sep 10 13:40:33 Io acpi[1483]: suspend at 20240910 13:40:33
Sep 10 13:40:50 Io kernel: uhub0: at usbus1, port 1, addr 1 (disconnected)
Sep 10 13:40:50 Io kernel: ugen1.2: <vendor 0x8087 product 0x0020> at usbus1 (disconnected)
Sep 10 13:40:50 Io kernel: uhub2: at uhub0, port 1, addr 2 (disconnected)
Sep 10 13:40:50 Io kernel: ugen1.3: <Generic USB2.0-CRW> at usbus1 (disconnected)
Sep 10 13:40:50 Io kernel: umass0: at uhub2, port 1, addr 3 (disconnected)
Sep 10 13:40:50 Io kernel: da0 at umass-sim0 bus 0 scbus7 target 0 lun 0
Sep 10 13:40:50 Io kernel: da0: <Generic- Multi-Card 1.00>  s/n 20071114173400000 detached
Sep 10 13:40:50 Io kernel: (da0:umass-sim0:0:0:0): Periph destroyed
Sep 10 13:40:50 Io kernel: umass0: detached
Sep 10 13:40:50 Io kernel: ugen1.4: <Qualcomm Incorporated Qualcomm Gobi 2000> at usbus1 (disconnected)
Sep 10 13:40:50 Io kernel: u3g0: at uhub2, port 4, addr 4 (disconnected)
Sep 10 13:40:50 Io kernel: u3g0: detached
Sep 10 13:40:50 Io kernel: uhub2: detached
Sep 10 13:40:50 Io kernel: uhub0: detached
Sep 10 13:40:50 Io kernel: uhub1: at usbus0, port 1, addr 1 (disconnected)
Sep 10 13:40:50 Io kernel: ugen0.2: <vendor 0x8087 product 0x0020> at usbus0 (disconnected)
Sep 10 13:40:50 Io kernel: uhub3: at uhub1, port 1, addr 2 (disconnected)
Sep 10 13:40:50 Io kernel: ugen0.3: <Realtek USB 10/100/1000 LAN> at usbus0 (disconnected)
Sep 10 13:40:50 Io kernel: ure0: at uhub3, port 2, addr 3 (disconnected)
Sep 10 13:40:50 Io kernel: ue0: link state changed to DOWN
Sep 10 13:40:50 Io kernel: rgephy0: detached
Sep 10 13:40:50 Io kernel: miibus0: detached
Sep 10 13:40:50 Io kernel: ure0: detached
Sep 10 13:40:50 Io kernel: ugen0.4: <UPEK Biometric Coprocessor> at usbus0 (disconnected)
Sep 10 13:40:50 Io kernel: ugen0.5: <Broadcom Corp Broadcom Bluetooth Device> at usbus0 (disconnected)
Sep 10 13:40:50 Io kernel: ubt0: at uhub3, port 4, addr 5 (disconnected)
Sep 10 13:40:50 Io kernel: ubt0: detached
Sep 10 13:40:50 Io kernel: ugen0.6: <Chicony Electronics Co., Ltd. Integrated Camera> at usbus0 (disconnected)
Sep 10 13:40:50 Io kernel: uhub3: detached
Sep 10 13:40:50 Io kernel: uhub1: detached
Sep 10 13:40:50 Io kernel: pcib1: failed to set ACPI power state D2 on \_SB_.PCI0: AE_BAD_PARAMETER
Sep 10 13:40:50 Io kernel: acpi0: cleared fixed power button status
Sep 10 13:40:50 Io kernel: ns8250: UART FCR is broken
Sep 10 13:40:50 Io kernel: uhub0 on usbus0
Sep 10 13:40:50 Io kernel: uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
Sep 10 13:40:50 Io kernel: uhub1 on usbus1
Sep 10 13:40:50 Io kernel: uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
Sep 10 13:40:50 Io moused[1364]: failed to read from mouse: Interrupted system call
Sep 10 13:40:50 Io acpi[1547]: resumed at 20240910 13:40:50

I did notice some errors, could these be at fault?

Code:
Sep 10 13:40:50 Io kernel: pcib1: failed to set ACPI power state D2 on \_SB_.PCI0: AE_BAD_PARAMETER
Sep 10 13:40:50 Io kernel: acpi0: cleared fixed power button status
Sep 10 13:40:50 Io kernel: ns8250: UART FCR is broken
 
My work Thinkpad has a problem when resuming with the external power connected during resume. Sometimes it simply hangs, but it never does when I switch on the power after resume is trough. Maybe that is a thing to try?
 
I can get the machine to suspend but upon resume the screen is black. I can SSH into the machines just fine so it does come up, but I can't get the screen to come alive.

Mine does the loud beep on suspend and resume as well, also takes 3-4 seconds, but the screen stays completely black upon resume.

I see these same problems with Dell laptops using XFCE4.

Try and see if using another virtual terminal wakes it up.

<CTL><ALT><F8> This should bring you to another login screen for ttyv7 now without any inputs go back to your original console.
<CTL><ALT><F9>

See if that resumes the machine correctly.
 
I see these same problems with Dell laptops using XFCE4.

Try and see if using another virtual terminal wakes it up.

<CTL><ALT><F8> This should bring you to another login screen for ttyv7 now without any inputs go back to your original console.
<CTL><ALT><F9>

See if that resumes the machine correctly.

Actually I am not currently testing with X. I am just trying to suspend/resume from the console. I guess I can look to start a X session then see if I can switch the screen back to life using the <CTL><ALT> buttons.

My work Thinkpad has a problem when resuming with the external power connected during resume. Sometimes it simply hangs, but it never does when I switch on the power after resume is trough. Maybe that is a thing to try?

Unfortunately I have tried suspend/resume both with the AC power and on battery alone, with the same result
 
OK are you loading a DRM driver? Does this problem happen without the i915kms driver loaded?
This is what I was missing. I did not have i915kms installed or loaded. Once I installed the "drm-kmod" package and loaded the i915kms module, the laptop screen comes back to life after suspend :)

I've added kld_list="i915kms" to my /etc/rc.conf so it loads automatically.

With that loaded suspend/resume works on the console and in an X session, so I am happy to mark this solved. Thanks a lot everyone for the assistance :)
 
Thanks!

From last year's topic by Crivens, Sleep resume - caveats and gotchas.:

"Features that will not work with the system console frame buffer include:
  • sleep and wake (suspend and resume) of the computer."


The first bullet point, with added emphasis:
  • video drivers must successfully wake up and display video
That's essential – a must – but too vague.

The detail is in the same page of the wiki, but easily overlooked, in a table cell that is T450-specific:

"… i915kms.ko drivers are required for screen to reset after resume. …"

(It's no longer necessary to use .ko when loading.)

Things are less vague in the graphics area of the wiki, which I used to help maintain. Much of this area was moved to a chapter of the FreeBSD Handbook, however the chapter does not mention sleep, wake, suspend, or resume.

My 2022 bug report – Sleep, wake: document the requirement for Kernel Mode Setting (KMS) drivers; include the console context – was Closed FIXED. After closure:

No mention of keyword 'wake' anywhere in the FreeBSD Handbook. This omission can be corrected in a later edition.

Found: … direction to <…> for more information, however the #x11 area is where I did not find what was expected.



For future discussions, a hint:
  • always state the exact version of FreeBSD, and whether packages/ports are from quarterly or latest.
1726099508829.png


freebsd-version -kru ; uname -aKU

pkg -vv | grep -B 1 -e url -e priority

There should a comparable hint whenever you log in at a console.

The message of the day (motd):​

Thanks again.
 
Back
Top