swaywm / swayidle

Idle management daemon for Wayland
MIT License
550 stars 50 forks source link

Screen doesn't always come back on #111

Closed dmayle closed 2 years ago

dmayle commented 2 years ago

I'm using swayidle/swaylock on two different machines, one with intel cpu and gpu, and the other with amd cpu and nvidia gpu, and I'm using them with two different sets of monitors, in one case I have two Lenovo Thinkvision monitors, and in the other, a TCL tv/monitor, both with roughly the same config.

On both machines, if I walk away and come back, the screen doesn't always turn back on. When this happens, I can usually work around the problem by switching to the virtual terminal where gdm is running, and come back again.

I'm using this script to run swayidle:

#!/usr/bin/bash -e
swayidle -w \
  timeout 300 'ddcutil set 10 20' \
    resume 'ddcutil set 10 100' \
  timeout 600 'swaylock -elfF -s fill -i background.png' \
  timeout 900 'swaymsg "output * dpms off"' \
    resume 'swaymsg "output * dpms on" && ddcutil set 10 100' \
  before-sleep 'swaylock -elfF -s fill -i background.png' \
  lock 'swaylock -elfF -s fill -i background.png'
  idlehint 300

This is the log I see around the sleep event, and later waking it up.

-- Journal begins at Wed 2021-12-08 10:15:27 PST, ends at Sat 2021-12-11 13:45:08 PST. --
Dec 11 10:20:01 nixos /nix/store/dvzwbww9yv7017q1k8dcnzzryz73zxjs-gdm-41.0/libexec/gdm-wayland-session[205610]: ]
Dec 11 10:20:06 nixos GeckoMain[205617]: g_find_program_in_path: assertion 'program != NULL' failed
Dec 11 10:20:19 nixos pipewire-media-session[1918]: spa.bluez5: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply
Dec 11 10:26:46 nixos ddcutil[207562]: Starting.  ddcutil version 1.2.0
Dec 11 10:26:46 nixos ddcutil[207562]: Terminating. Returning 1
Dec 11 10:26:46 nixos swayidle-start[207562]: Display not found
Dec 11 10:31:47 nixos swayidle-start[208678]: zwlr_input_inhibit_manager_v1@9: error 0: this compositor already has input inhibited
Dec 11 10:31:47 nixos swayidle-start[208678]: 2021-12-11 10:31:47 - [main.c:1194] Exiting - failed to inhibit input: is another lockscreen already running?
Dec 11 10:43:05 nixos ddcutil[211191]: Starting.  ddcutil version 1.2.0
Dec 11 10:43:05 nixos ddcutil[211191]: Terminating. Returning 1
Dec 11 10:43:05 nixos swayidle-start[211191]: Display not found
Dec 11 10:48:10 nixos ddcutil[212319]: Starting.  ddcutil version 1.2.0
Dec 11 10:48:10 nixos ddcutil[212319]: Terminating. Returning 1
Dec 11 10:48:10 nixos swayidle-start[212319]: Display not found
Dec 11 10:53:10 nixos swayidle-start[213425]: zwlr_input_inhibit_manager_v1@9: error 0: this compositor already has input inhibited
Dec 11 10:53:10 nixos swayidle-start[213425]: 2021-12-11 10:53:10 - [main.c:1194] Exiting - failed to inhibit input: is another lockscreen already running?
Dec 11 10:55:20 nixos .waybar-wrapped[205514]: Invalid id 2 passed to g_bus_unwatch_name()
Dec 11 10:55:20 nixos waybar-start[205514]: [2021-12-11 10:55:20.503] [info] Bar removed from output: HDMI-A-1
Dec 11 13:41:25 nixos ddcutil[250649]: Starting.  ddcutil version 1.2.0
Dec 11 13:41:25 nixos ddcutil[250649]: Terminating. Returning 1
Dec 11 13:41:25 nixos swayidle-start[250649]: Display not found
Dec 11 13:41:28 nixos waybar-start[205514]: [2021-12-11 13:41:28.846] [warning] For a functional tray you must have libappindicator-* installed and export XDG_CURRENT_DESKTOP=Unity
Dec 11 13:41:28 nixos waybar-start[205514]: [2021-12-11 13:41:28.849] [warning] Requested height: 36 exceeds the minimum height: 48 required by the modules
Dec 11 13:41:28 nixos waybar-start[205514]: [2021-12-11 13:41:28.849] [info] Bar configured (width: 3840, height: 48) for output: HDMI-A-1
Dec 11 13:41:42 nixos /nix/store/dvzwbww9yv7017q1k8dcnzzryz73zxjs-gdm-41.0/libexec/gdm-wayland-session[205495]: 03:21:48.026 [ERROR] [wlr] [backend/drm/atomic.c:35] connector HDMI-A-1: Atomic commit failed (pageflip): Permission denied
Dec 11 13:41:42 nixos /nix/store/dvzwbww9yv7017q1k8dcnzzryz73zxjs-gdm-41.0/libexec/gdm-wayland-session[205495]: 03:21:48.027 [ERROR] [wlr] [backend/drm/atomic.c:35] connector HDMI-A-1: Atomic commit failed (pageflip): Permission denied
Dec 11 13:41:44 nixos /nix/store/dvzwbww9yv7017q1k8dcnzzryz73zxjs-gdm-41.0/libexec/gdm-wayland-session[205495]: 03:21:49.217 [ERROR] [wlr] [backend/drm/atomic.c:35] connector HDMI-A-1: Atomic commit failed (pageflip): Permission denied
Dec 11 13:41:44 nixos /nix/store/dvzwbww9yv7017q1k8dcnzzryz73zxjs-gdm-41.0/libexec/gdm-wayland-session[205495]: 03:21:49.217 [ERROR] [wlr] [backend/drm/atomic.c:35] connector HDMI-A-1: Atomic commit failed (pageflip): Permission denied
Dec 11 13:41:44 nixos pipewire[1917]: spa.alsa: 'hdmi:1,1': playback open failed: Device or resource busy
Dec 11 13:41:44 nixos pipewire[1917]: mod.adapter: 0x56413ce74980: can't get format: Device or resource busy
Dec 11 13:41:44 nixos pipewire[1917]: mod.adapter: can't create node: Device or resource busy
Dec 11 13:41:44 nixos pipewire-media-session[1918]: ms.core: error id:43 seq:3132 res:-16 (Device or resource busy): can't create node: Device or resource busy
Dec 11 13:41:44 nixos /nix/store/dvzwbww9yv7017q1k8dcnzzryz73zxjs-gdm-41.0/libexec/gdm-wayland-session[205495]: 03:21:50.029 [ERROR] [wlr] [backend/drm/atomic.c:35] connector HDMI-A-1: Atomic commit failed (pageflip): Permission denied
Dec 11 13:41:44 nixos /nix/store/dvzwbww9yv7017q1k8dcnzzryz73zxjs-gdm-41.0/libexec/gdm-wayland-session[205495]: 03:21:50.030 [ERROR] [wlr] [backend/drm/atomic.c:35] connector HDMI-A-1: Atomic commit failed (pageflip): Permission denied
Dec 11 13:41:48 nixos /nix/store/dvzwbww9yv7017q1k8dcnzzryz73zxjs-gdm-41.0/libexec/gdm-wayland-session[205495]: 03:21:53.969 [ERROR] [wlr] [libseat] [libseat/backend/logind.c:76] Ping failed: org.freedesktop.DBus.Error.NoReply: Method call timed out
Dec 11 13:42:08 nixos pipewire-media-session[1918]: spa.bluez5: GetManagedObjects() failed: org.freedesktop.DBus.Error.TimedOut
Dec 11 13:44:37 nixos /nix/store/dvzwbww9yv7017q1k8dcnzzryz73zxjs-gdm-41.0/libexec/gdm-wayland-session[205569]: [345 13:44:37.356720] [glfw error 65549]: Wayland: Window attention request not implemented yet
Dec 11 13:45:08 nixos /nix/store/dvzwbww9yv7017q1k8dcnzzryz73zxjs-gdm-41.0/libexec/gdm-wayland-session[205569]: [345 13:45:08.603288] [PARSE ERROR] Unrecognized DCS code: 0x7a
Dec 11 13:45:08 nixos /nix/store/dvzwbww9yv7017q1k8dcnzzryz73zxjs-gdm-41.0/libexec/gdm-wayland-session[205569]: [345 13:45:08.603311] [PARSE ERROR] Unknown CSI code: 'm' with start_modifier: '
Dec 11 13:45:08 nixos /nix/store/dvzwbww9yv7017q1k8dcnzzryz73zxjs-gdm-41.0/libexec/gdm-wayland-session[205569]: ' and end_modifier: '%' and parameters: '0'
emersion commented 2 years ago

Please report a Sway bug.