I fixed the workaround script mentioned above here:

https://gist.github.com/satmandu/2f2da70a7a6bbbacdba01ef8fb8c18f4

This "works" on my system.

(dbus-send doesn't get the right info to work unless you give it the
info of the logged in user, which "machinectl shell" can do.)

Hopefully the fix gets merged soon and I can stop using this ugly hack.
:)


#!/bin/bash
# Place file in /lib/systemd/system-sleep/
# Run chmod +x on the file.
# This works around the wallpaper corruption on resume from suspend with Nvidia 
GPUs
# reported at https://gitlab.gnome.org/GNOME/gnome-shell/issues/1084
# and due to this feature of the Nvidia driver: 
# 
https://www.khronos.org/registry/OpenGL/extensions/NV/NV_robustness_video_memory_purge.txt
# Adapted from Paul Knopf 
(https://gitlab.gnome.org/GNOME/gnome-shell/issues/1084)
# and via 
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1809407/comments/22
# Note that this does show the user's screen when coming out of sleep briefly.
# machinectl can be found in the systemd-container package on Ubuntu.

PROGNAME=$(/usr/bin/basename "$0")
state=$1
action=$2

function log {
    /usr/bin/logger -i -t "$PROGNAME" "$*"
}

log "Running $action $state"
if [[ $state == post ]]; then
    log "WAKE UP"
    pid_Gnome=($(/usr/bin/pgrep gnome-session))
    pid_Gnome=("${pid_Gnome[@]%%:*}")
    command="/usr/bin/dbus-send --type=method_call --dest=org.gnome.Shell 
/org/gnome/Shell org.gnome.Shell.Eval "string:global.reexec_self\(\)""
        for i in "${pid_Gnome[@]}"
    do  
        user=$(/bin/ps -o user= -p $i)
        log $i $user
        if [ "$user" != "gdm" ]; then
            log "machinectl shell $user@.host $command"
            /bin/machinectl shell $user@.host $command
        fi
    done
fi
exit 0

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to mutter in Ubuntu.
https://bugs.launchpad.net/bugs/1809407

Title:
  [nvidia] Corrupted wallpaper after resuming from suspend or
  hibernation

Status in GNOME Shell:
  New
Status in mutter package in Ubuntu:
  In Progress
Status in mutter source package in Bionic:
  Confirmed
Status in mutter source package in Disco:
  Confirmed
Status in mutter source package in Eoan:
  In Progress

Bug description:
  https://trello.com/c/i5hENxSO

  Every other wake from sleep presents a corrupted screen with no unlock
  app.  There's a dock and system menu on a black background with pixel
  garbage.  Some personal information in the dock's large window
  thumbnails.  Bitmap garbage flashes on the screen when interacting
  with anything.  Only workaround is doing another sleep-wake cycle.

  ProblemType: Bug
  DistroRelease: Ubuntu 18.10
  Package: xorg 1:7.7+19ubuntu8
  ProcVersionSignature: Ubuntu 4.18.0-12.13-generic 4.18.17
  Uname: Linux 4.18.0-12-generic x86_64
  NonfreeKernelModules: nvidia_modeset nvidia
  .proc.driver.nvidia.gpus.0000.4b.00.0: Error: [Errno 21] Is a directory: 
'/proc/driver/nvidia/gpus/0000:4b:00.0'
  .proc.driver.nvidia.registry: Binary: ""
  .proc.driver.nvidia.version:
   NVRM version: NVIDIA UNIX x86_64 Kernel Module  390.87  Tue Aug 21 12:33:05 
PDT 2018
   GCC version:  gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1)
  ApportVersion: 2.20.10-0ubuntu13.1
  Architecture: amd64
  BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
  CompizPlugins: No value set for 
`/apps/compiz-1/general/screen0/options/active_plugins'
  CompositorRunning: None
  CurrentDesktop: ubuntu:GNOME
  Date: Thu Dec 20 22:19:29 2018
  DistUpgraded: 2018-12-01 23:07:50,385 ERROR got error from PostInstallScript 
./xorg_fix_proprietary.py (g-exec-error-quark: Failed to execute child process 
“./xorg_fix_proprietary.py” (No such file or directory) (8))
  DistroCodename: cosmic
  DistroVariant: ubuntu
  DkmsStatus:
   nvidia, 390.87, 4.18.0-11-generic, x86_64: installed
   nvidia, 390.87, 4.18.0-12-generic, x86_64: installed
   virtualbox, 5.2.18, 4.18.0-11-generic, x86_64: installed
   virtualbox, 5.2.18, 4.18.0-12-generic, x86_64: installed
  ExtraDebuggingInterest: Yes, if not too technical
  GraphicsCard:
   NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] [10de:1c02] (rev a1) 
(prog-if 00 [VGA controller])
     Subsystem: eVga.com. Corp. GP106 [GeForce GTX 1060 3GB] [3842:6162]
  InstallationDate: Installed on 2018-10-28 (54 days ago)
  InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 
(20180725)
  MachineType: Gigabyte Technology Co., Ltd. Default string
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.18.0-12-generic 
root=UUID=a8c839e7-c579-4699-999a-748f804ff9e0 ro quiet splash vt.handoff=1
  SourcePackage: xorg
  Symptom: display
  UpgradeStatus: Upgraded to cosmic on 2018-12-02 (18 days ago)
  dmi.bios.date: 06/08/2017
  dmi.bios.vendor: American Megatrends Inc.
  dmi.bios.version: F24
  dmi.board.asset.tag: Default string
  dmi.board.name: X99P-SLI-CF
  dmi.board.vendor: Gigabyte Technology Co., Ltd.
  dmi.board.version: x.x
  dmi.chassis.asset.tag: Default string
  dmi.chassis.type: 3
  dmi.chassis.vendor: Default string
  dmi.chassis.version: Default string
  dmi.modalias: 
dmi:bvnAmericanMegatrendsInc.:bvrF24:bd06/08/2017:svnGigabyteTechnologyCo.,Ltd.:pnDefaultstring:pvrDefaultstring:rvnGigabyteTechnologyCo.,Ltd.:rnX99P-SLI-CF:rvrx.x:cvnDefaultstring:ct3:cvrDefaultstring:
  dmi.product.family: Default string
  dmi.product.name: Default string
  dmi.product.sku: Default string
  dmi.product.version: Default string
  dmi.sys.vendor: Gigabyte Technology Co., Ltd.
  version.compiz: compiz N/A
  version.libdrm2: libdrm2 2.4.95-1
  version.libgl1-mesa-dri: libgl1-mesa-dri 18.2.2-0ubuntu1
  version.libgl1-mesa-glx: libgl1-mesa-glx 18.2.2-0ubuntu1
  version.nvidia-graphics-drivers: nvidia-graphics-drivers-* N/A
  version.xserver-xorg-core: xserver-xorg-core 2:1.20.1-3ubuntu2.1
  version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
  version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:18.1.0-1
  version.xserver-xorg-video-intel: xserver-xorg-video-intel 
2:2.99.917+git20171229-1ubuntu1
  version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.15-3

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-shell/+bug/1809407/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to