pop-os / pop

A project for managing all Pop!_OS sources
https://system76.com/pop
2.48k stars 87 forks source link

Resume from suspend is buggy #1211

Open purezen opened 4 years ago

purezen commented 4 years ago

Distribution (run cat /etc/os-release):

NAME="Pop!_OS" VERSION="20.04 LTS" ID=pop ID_LIKE="ubuntu debian" PRETTY_NAME="Pop!_OS 20.04 LTS" VERSION_ID="20.04" HOME_URL="https://pop.system76.com" SUPPORT_URL="https://support.system76.com" BUG_REPORT_URL="https://github.com/pop-os/pop/issues" PRIVACY_POLICY_URL="https://system76.com/privacy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal LOGO=distributor-logo-pop-os

Issue/Bug Description:

I did a fresh install of 20.04 on my desktop w/ amd cpu and nvidia graphics.

Many issues arise when the system comes out of suspend.

I am using brave browser and it becomes partly responsive. A lot of the window blacks out including the title bar. I am still able to close it by clicking in top right corner though. Ref - https://imgur.com/a/q0EiOy2.

Audio is gone. On checking I find that the source is changed ( switches to Digital Output SPDIF from HDMI which is my monitor ). Sometimes it works on changing back. Other times there is no audio even after changing back.

I have been using Pop since 19.04 and it is working fine on my laptop ( Intel ).

Also even when in suspend, I am not able to bring it out using mouse or keyboard.

Steps to reproduce (if you know):

Initiate suspend. Resume from suspend.

Other Notes: Few others seem to be having the issue as well as per https://www.reddit.com/r/pop_os/comments/ikq27t/issues_on_coming_out_of_suspend

gabenasci commented 4 years ago

I can confirm I've been having issues after resuming from sleep, especially having my browser (Firefox) barely responsive.

mmstick commented 4 years ago

This is very hardware-specific. Likely cause by a bug either in firmware or the kernel with your specific hardware

The rendering issues are just caused by terrible Linux graphics support in Chromium's graphics engine. Disabling hardware acceleration will fix the rendering issues.

The suspension issues might require adding a systemd service to disable things before suspension, and re-enable them after. In /usr/lib/systemd/system-sleep/, you can add executable scripts that get triggered on pre / post suspension. This would be an example script for disabling wifi before, and enabling it after:

#!/bin/sh

case $1 in
  pre)
    nmcli r wifi off
    ;;
  post)
    nmcli r wifi on
    ;;
esac

Make sure to chmod +x your file.

goodmami commented 4 years ago

Is this reddit thread related? https://www.reddit.com/r/pop_os/comments/iocf8r/mozilla_tabs_turns_invisible_when_i_turn_the/

...because it describes the same issues I'm having.

mmstick commented 4 years ago

@goodmami Different issue entirely from this one. Just a common graphics driver issue. Particularly with NVIDIA drivers. Disable hardware acceleration in Firefox, Chrome, and Electron applications, and they won't have rendering issues anymore, albeit at the cost that all rendering is done on the CPU now.

goodmami commented 4 years ago

Great, thanks @mmstick. I've been on 20.04 for a while now but this is a recent regression for me, so I'm trying to find out what might have caused it. I've disabled hardware acceleration in Firefox for now.

mmstick commented 4 years ago

We force-enabled acceleration in Firefox recently, because one of our newest laptops has serious performance issues without acceleration being enabled. Most systems do acceleration perfectly fine, besides a couple that have suspend issues.