Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resume from suspending is broken after update to Xen 4.14 #6066

Closed
jevank opened this issue Sep 18, 2020 · 73 comments · Fixed by QubesOS/qubes-vmm-xen#88 or QubesOS/qubes-vmm-xen#141
Closed
Labels
affects-4.1 This issue affects Qubes OS 4.1. C: power management C: Xen diagnosed Technical diagnosis has been performed (see issue comments). hardware support P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. r4.1-bookworm-stable r4.1-bullseye-stable r4.1-buster-stable r4.1-centos8-stable r4.1-centos-stream8-stable r4.1-dom0-stable r4.1-stretch-stable r4.2-host-cur-test r4.2-vm-bookworm-cur-test r4.2-vm-bullseye-cur-test

Comments

@jevank
Copy link

jevank commented Sep 18, 2020

Qubes R4.1

I`ve tested with X1 Thinkpad gen6. Hyperthreading is disabled in UEFI, kernel 5.4.51 and 5.4.61. With Xen 4.13 all works fine.

Tried with and without VMs running. Looks like suspend successful (thinkpad's led smooth blinked), but it doesn't resume.

Is problem specific to me?


There are multiple bugs causing this, summary below.

S3 related bugs in Xen 4.14 summary:

@jevank jevank added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug labels Sep 18, 2020
@andrewdavidwong
Copy link
Member

X1 Thinkpad gen6

Was suspend ever working on this model in Qubes? I thought I remember hearing a long time ago that it wasn't working.

P.S. -- Please use the issue template. This is borderline unsuitable for qubes-issues.

@andrewdavidwong andrewdavidwong added C: other hardware support needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Sep 18, 2020
@andrewdavidwong andrewdavidwong added this to the Release 4.1 milestone Sep 18, 2020
@jevank
Copy link
Author

jevank commented Sep 18, 2020

Yes, It works with Xen 4.13 till upgrading to 4.14.

P.S. -- ok

@marmarek
Copy link
Member

The same happens in openQA: #6049

@marmarek
Copy link
Member

Bisected to xen-project/xen@633ecc4a7cb

@marmarek
Copy link
Member

@andrewdavidwong andrewdavidwong added diagnosed Technical diagnosis has been performed (see issue comments). C: Xen waiting for upstream This issue is waiting for something from an upstream project to arrive in Qubes. Remove when closed. and removed C: other hardware support needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Sep 27, 2020
marmarek added a commit to marmarek/qubes-vmm-xen that referenced this issue Sep 27, 2020
@jevank
Copy link
Author

jevank commented Sep 28, 2020

In my case patch gives me reboot while resume action...

@marmarek
Copy link
Member

I do have a system where the resume is still broken, but looks like a proper panic instead of instant reboot now (5s timeout before reboot, instead of instant). Sadly I don't have serial console there, so I don't know what really happened.

@jevank
Copy link
Author

jevank commented Sep 28, 2020

Looks like I have similar timeout and have no serial port at laptop too

@marmarek
Copy link
Member

@pwmarcz
Copy link

pwmarcz commented Sep 30, 2020

Seeing the same on System76 Galago Pro 4. Suspend worked on Xen 4.13. On 4.14 fans and screen wake up, the Fn-1 fan control works, but the laptop doesn't respond to anything else, and there is nothing on the logs after suspending.

@jevank
Copy link
Author

jevank commented Sep 30, 2020

@pwmarcz Have you tried patch from PR?

@pwmarcz
Copy link

pwmarcz commented Sep 30, 2020

@jevank I tried it just now, but there's no change, also with all the VMs stopped.

I should also mention that on this laptop reboot doesn't work, so it's possible that Xen was trying to reboot and froze the computer.

@marmarek
Copy link
Member

marmarek commented Oct 1, 2020

I've run yet another bisection and here are the findings: https://lists.xenproject.org/archives/html/xen-devel/2020-10/msg00002.html

@marmarek
Copy link
Member

marmarek commented Oct 3, 2020

Few bisection runs later... I've updated issue description with the summary.

@marmarek
Copy link
Member

marmarek commented Oct 5, 2020

@pwmarcz I've force-pushed QubesOS/qubes-vmm-xen#88 with fixes collected so far. Can you test it?

@qubesos-bot
Copy link

Automated announcement from builder-github

The package vmm-xen has been pushed to the r4.1 testing repository for the CentOS centos-stream8 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.1-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component vmm-xen (including package python3-xen-4.14.5-11.fc32) has been pushed to the r4.1 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package vmm-xen has been pushed to the r4.2 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing bookworm-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package xen_4.14.5-11 has been pushed to the r4.1 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing buster-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Oct 29, 2022
The service is called to allow VM to prepare for suspend, but it's just
a notification - if the call fails, suspend anyway.
This especially is important for HVM with PCI devices - if the service
fails, userspace might be not prepared for the suspend, but later
suspend by the kernel in many cases is enough for the VM to recover. If
VM isn't suspended (but paused by Xen instead), it almost never survive
resume.

While at it, improve logging of both service failure and actual suspend
failure.

QubesOS/qubes-issues#6066
marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Oct 31, 2022
The service is called to allow VM to prepare for suspend, but it's just
a notification - if the call fails, suspend anyway.
This especially is important for HVM with PCI devices - if the service
fails, userspace might be not prepared for the suspend, but later
suspend by the kernel in many cases is enough for the VM to recover. If
VM isn't suspended (but paused by Xen instead), it almost never survive
resume.

While at it, improve logging of both service failure and actual suspend
failure.

QubesOS/qubes-issues#6066
marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Oct 31, 2022
The service is called to allow VM to prepare for suspend, but it's just
a notification - if the call fails, suspend anyway.
This especially is important for HVM with PCI devices - if the service
fails, userspace might be not prepared for the suspend, but later
suspend by the kernel in many cases is enough for the VM to recover. If
VM isn't suspended (but paused by Xen instead), it almost never survive
resume.

While at it, improve logging of both service failure and actual suspend
failure.

QubesOS/qubes-issues#6066
@qubesos-bot
Copy link

Automated announcement from builder-github

The component vmm-xen (including package python3-xen-4.14.5-12.fc32) has been pushed to the r4.1 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package vmm-xen has been pushed to the r4.1 stable repository for the CentOS centos-stream8 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package xen_4.14.5-12+deb10u1 has been pushed to the r4.1 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@andrewdavidwong andrewdavidwong added the pr submitted A pull request has been submitted for this issue. label Nov 9, 2022
@andrewdavidwong andrewdavidwong added the affects-4.1 This issue affects Qubes OS 4.1. label Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.1 This issue affects Qubes OS 4.1. C: power management C: Xen diagnosed Technical diagnosis has been performed (see issue comments). hardware support P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. r4.1-bookworm-stable r4.1-bullseye-stable r4.1-buster-stable r4.1-centos8-stable r4.1-centos-stream8-stable r4.1-dom0-stable r4.1-stretch-stable r4.2-host-cur-test r4.2-vm-bookworm-cur-test r4.2-vm-bullseye-cur-test
Projects
None yet
Development

Successfully merging a pull request may close this issue.