Can't suspend on Surface Pro 3

Bug #1380076 reported by Akdor 1154
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

With my Surface Pro 3 when I suspend from the GUI nothing happens. Doing it manually also fails, and nothing appears in dmesg:
#echo "mem" > /sys/power/state

Error while writing to stdout
write_loop: Invalid argument

And, more interestingly:
cat /sys/power/state

freeze disk

Using the not-so-good-and-apparently-unsupported:
echo "freeze" > /sys/power/state

does seem to successfully suspend, however I cannot resume from this (assumed to be a separate issue).

I am using a modified utopic unicorn kernel compiled from git at kernel.ubuntu.com, with the following patch to enable mykeyboard to work:
http://www.spinics.net/lists/linux-input/msg34918.html

The official kernel behaves identically, as does vanilla 3.17 from the mainline folder of kernel-ppa.

WORKAROUND: Use hibernate.

---
ApportVersion: 2.14.7-0ubuntu5
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: jarrad 2491 F.... pulseaudio
 /dev/snd/controlC0: jarrad 2491 F.... pulseaudio
CurrentDesktop: XFCE
DistroRelease: Ubuntu 14.10
HibernationDevice: RESUME=UUID=178ac532-25db-4ef3-a587-f1fdd2649bf0
InstallationDate: Installed on 2014-10-10 (57 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Alpha amd64 (20140923)
MachineType: Microsoft Corporation Surface Pro 3
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.16.4-surface3 root=UUID=f6c17817-9127-4792-be23-a39a07e7f240 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.16.0-21.28-generic 3.16.4
RelatedPackageVersions:
 linux-restricted-modules-3.16.4-surface3 N/A
 linux-backports-modules-3.16.4-surface3 N/A
 linux-firmware 1.135
Tags: utopic
Uname: Linux 3.16.4-surface3 x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 10/16/2014
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 3.11.0350
dmi.board.asset.tag: 0
dmi.board.name: Surface Pro 3
dmi.board.vendor: Microsoft Corporation
dmi.board.version: 1
dmi.chassis.asset.tag: 0
dmi.chassis.type: 9
dmi.chassis.vendor: Microsoft Corporation
dmi.chassis.version: 1
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr3.11.0350:bd10/16/2014:svnMicrosoftCorporation:pnSurfacePro3:pvr1:rvnMicrosoftCorporation:rnSurfacePro3:rvr1:cvnMicrosoftCorporation:ct9:cvr1:
dmi.product.name: Surface Pro 3
dmi.product.version: 1
dmi.sys.vendor: Microsoft Corporation

Revision history for this message
Akdor 1154 (akdor1154) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.17 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-utopic/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Akdor 1154 (akdor1154)
tags: added: kernel-bug-exists-upstream
Revision history for this message
Akdor 1154 (akdor1154) wrote :

it looks like the SP3 legitimately does not expose the S3 state, and instead only allows MS's Connected Standby / InstantGo spec. As such there are two issues here that I can see:
1) pm-utils does not fall back on freeze
2) freeze state is using much more power than connected standby does on windows.

Let's restrict this bug to the first one as it's a couple of lines of bash to fix. Should I reassign this myself?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pm-utils (Ubuntu):
status: New → Confirmed
Revision history for this message
Marco Ceppi (marcoceppi) wrote :

What couple of lines of bash would fix this with regards to pm-utils?

Revision history for this message
Fastguy (erenoglu) wrote :

What about supporting the real thing, ie "connected standby" or "InstantGO" function. Isn't it yet supported by linux kernel? Without this and without real S3 state, linux won't be really useful on a SP3 I'm afraid.

Revision history for this message
penalvch (penalvch) wrote :

Akdor 1154, could you please execute the following via a terminal in order for the necessary debugging information to be attached:
apport-collect 1380076

no longer affects: pm-utils (Ubuntu)
Changed in linux (Ubuntu):
importance: Medium → Low
Revision history for this message
Akdor 1154 (akdor1154) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected utopic
description: updated
Revision history for this message
Akdor 1154 (akdor1154) wrote : BootDmesg.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : CRDA.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : IwConfig.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : Lspci.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : Lsusb.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : ProcEnviron.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : ProcModules.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : PulseList.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : RfKill.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : UdevDb.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : UdevLog.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote : WifiSyslog.txt

apport information

Revision history for this message
Akdor 1154 (akdor1154) wrote :

also here is the "couple of lines of bash" referenced before that makes pm-utils fall back to freeze if nothing else is available.

tags: added: patch
Revision history for this message
penalvch (penalvch) wrote :

Akdor 1154, please do not toggle attachments as a patch unless it's fixing the originally reported issue (not a WORKAROUND, hack, etc.) and is ready to be accepted into the Ubuntu repositories as outlined in https://wiki.ubuntu.com/Bugs/Patches .

Despite this, could you please test the latest mainline kernel via 3.18-rc7 and advise to the results?

Also, could you please provide the code you use to enable your keyboard?

tags: added: latest-bios-3.11.0350 needs-upstream-testing
removed: patch surfacepro3
Changed in linux (Ubuntu):
importance: Low → Medium
Revision history for this message
Akdor 1154 (akdor1154) wrote :

Hi,
Sorry, I thought that was just for categorization of attachments.
I would argue that it DOES fix the issue at hand properly, though; the SP3 does not expose any support for S3, only for MS/Intel's InstantGo. Linux's freeze method is thus legitimately the only suspend state available*. One would then expect that pm-utils uses this suspend state if it is the only one available, and my patch addresses that directly.

Anyway, 3.18-rc7 behaves identically. The keyboard patch (against 3.18, it doesn't apply automatically against 3.16 but it's trivial to backport) is at
http://www.spinics.net/lists/linux-input/msg34918.html

*S3 support is apparently possible if you enable the Hyper-V hypervisor but I have not yet explored this avenue.

Revision history for this message
Akdor 1154 (akdor1154) wrote :

P.S. just done some more reading, looks like my previous footnote was false; using Hyper-V does not expose S3, it simply hibernates immediately instead of suspending.

Jarrad

Revision history for this message
penalvch (penalvch) wrote :

Akdor 1154, could you please provide the direct URL to the git Utopic Unicorn kernel you are using?

tags: added: kernel-bug-exists-upstream-3.18-rc7
removed: needs-upstream-testing
description: updated
Revision history for this message
Keith McClelland (zismylaptop) wrote :

I made Akdor's pm-functions patch using 3.19RC3. Suspend did not change at all; it still bounced right back. Note that this kernel is unaware of the battery (I've read that 3.16 kernels don't have that problem) so maybe there is some interaction there.

Revision history for this message
Keith McClelland (zismylaptop) wrote :

I got that wrong yesterday, I think. IWhen the freeze patch is installed, it seems to do something akin to suspending, but I haven't figured out how to get it back (not power button or mouse movement). Instead you have to hold the power button long enough to kill it and then start over. Note that this computer bounces back in Windows 8.1 when you try "sleep". I understood that a kernel patch had fixed that, but I'm up to date with Windows updates and that's what I see.

Revision history for this message
Keith McClelland (zismylaptop) wrote :

Kernel bug 84651 addresses the power button issue. As of today it is still being tested. On my computer (now running 4.0-RC4 with patches but NOT the freeze patch from comment 26) suspending still bounces back, but with their patch it goes to the lock screen mode.

I will now try putting that in and see if the it is possible to both suspend and resume.

Revision history for this message
Keith McClelland (zismylaptop) wrote :

With the freeze patch installed and the power button patch in the kernel it can still fail to stay suspended. However I think there are two causes in my system and without them it will stay frozen at least until there is a power glitch:
- Bluetooth on, even with nothing paired, is certain to cause return from freeze
- Some things on USB can cause return from freeze (I had a USB hub and a card reader dongle and removed them both so I don't know which did it). Note that my Microsoft wireless mouse & keyboard (which has a tiny USB transceiver) does not cause any trouble.

Revision history for this message
penalvch (penalvch) wrote :

Keith McClelland, it would help immensely if you filed a new report via a terminal:
ubuntu-bug linux

Please feel free to subscribe me to it.

tags: added: bios-outdated-3.11.0450
removed: latest-bios-3.11.0350
tags: added: needs-upstream-testing
removed: kernel-bug-exists-upstream
Revision history for this message
Keith McClelland (zismylaptop) wrote :

I have created bug 1436620. It's a bit of a messy situation but I hope I described it well enough.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.