[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1038105: upgrade-reports: resume from suspend/hibernate broken by upgrade from bullseye to bookworm



On Thu, 15 Jun 2023 09:26:12 -0400 Jeffrey Mark Siskind <qobi@purdue.edu> wrote:
> Package: upgrade-reports
> Severity: important
> 
> (Please provide enough information to help the Debian
> maintainers evaluate the report efficiently - e.g., by filling
> in the sections below.)
> 
> My previous release is: bullseye
> I am upgrading to: bookworm
> Upgrade date: Tuesday 13 Jun 2023
> uname -a after upgrade:
> Linux sapiencia 6.1.0-9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) x86_64 GNU/Linux
> Method: apt dist-upgrade
> 
> Contents of /etc/apt/sources.list:
> 
> deb https://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
> deb-src https://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
> 
> deb https://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
> deb-src https://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
> 
> deb https://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
> deb-src https://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
> 
> # deb https://apt.repos.intel.com/oneapi all main
> # deb-src https://apt.repos.intel.com/oneapi all main
> 
> - Were there any non-Debian packages installed before the upgrade?  If
>   so, what were they?
> 
> https://apt.repos.intel.com/oneapi
> 
> qobi@sapiencia>ls /etc/apt/sources.list.d
> google-chrome.list        neurodebian.sources.list-bullseye  teams.list
> neurodebian.sources.list  skype-stable.list
> qobi@sapiencia>
> 
> - Was the system pre-update a 'pure' system only containing packages
>   from the previous release? If not, which packages were not from that
>   release?
> 
> No. it had
>    https://apt.repos.intel.com/oneapi
>    google-chrome.list
>    neurodebian.sources.list
>    skype-stable.list
>    teams.list
> 
> - Did any packages fail to upgrade?
> 
> At first, it didn't upgrade nvidia-driver. It did after I added
> non-free-firmware.
> 
> - Were there any problems with the system after upgrading?
> 
> Yes.
> 
> My machine is a Lenovo P71. I run gnome. Under bullseye, it properly
> suspended/hibernated with I closed the lid and properly resumed when I

Hello qobi.

After upgrading to Bookworm without the "non-free-firmware" area, my system booted onto nouveau.

Did "apt install nvidia-driver".

And had a fun time trying to getting things working properly.

At some point, I decided to try the improved Wayland support.

I discovered that GDM wasn't booting into Wayland, because of these /lib/udev/rules.d/61-gdm3.rules:

> # Check if suspend/resume services necessary for working wayland support is available
> TEST{0711}!="/usr/bin/nvidia-sleep.sh", GOTO="gdm_disable_wayland"
> TEST{0711}!="/usr/lib/systemd/system-sleep/nvidia", GOTO="gdm_disable_wayland"
> IMPORT{program}="/bin/sh -c \"sed -e 's/: /=/g' -e 's/\([^[:upper:]]\)\([[:upper:]]\)/\1_\2/g' -e 's/[[:lower:]]/\U&/g' -e 's/^/NVIDIA_/' /proc/driver/nvidia/params\""
> ENV{NVIDIA_PRESERVE_VIDEO_MEMORY_ALLOCATIONS}!="1", GOTO="gdm_disable_wayland"
> IMPORT{program}="/bin/sh -c 'echo NVIDIA_HIBERNATE=`systemctl is-enabled nvidia-hibernate`'"
> ENV{NVIDIA_HIBERNATE}!="enabled", GOTO="gdm_disable_wayland"
> IMPORT{program}="/bin/sh -c 'echo NVIDIA_RESUME=`systemctl is-enabled nvidia-resume`'"
> ENV{NVIDIA_RESUME}!="enabled", GOTO="gdm_disable_wayland"
> IMPORT{program}="/bin/sh -c 'echo NVIDIA_SUSPEND=`systemctl is-enabled nvidia-suspend`'"
> ENV{NVIDIA_SUSPEND}!="enabled", GOTO="gdm_disable_wayland"

I hacked around these, then tried to satisfy their conditions, when I noticed resume didn't work.

Having written the above, and tracked something down, I now think the Wayland issue is a red herring, but it is what led me to discover what was likely the fix:

Adding this to /etc/modprobe.d/nvidia-options.conf:

> # Keep VRAM on suspend
> options nvidia-current NVreg_PreserveVideoMemoryAllocations=1

This doesn't seem to be the default via nvidia-driver (nvidia-options.conf from nvidia-kernel-support).

Long way for a shortcut. But if that doesn't fix it, at least you may have another thread to pull :-)


Reply to: