color temp resets, but only for the very first sleep-resume display-cycle of a session
This issue is similar to Gamma adjustments get reset when monitor goes to sleep. I do not know if this is a problem with gammastep
, sway
or one of its helper applications, wlroots
, or the kernel; if an issue must be opened with the respective components, do let me know.
The issue always occurs when the monitor comes out of the very first sleep/standby for a given wayland session. I then kill gammastep
and run it again, still in the same wayland session. Any subsequent standby-resume of the monitor for the session does not experience any problems; the color-temp is perfectly maintained across such subsequent standby-resume events.
The gammastep
application does not log any errors or warnings, regardless of the presence or absence of the issue:
Notice: Brightness: 1.00:1.00
Notice: Gamma (Day): 1.000, 1.000, 1.000
Notice: Gamma (Night): 1.000, 1.000, 1.000
Notice: Color temperature: 3500K
Notice: Press ctrl-c to stop...
System Info:
System:
Host: l64 Kernel: 6.6.9-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
Console: pty pts/2 (vt 1) Distro: Arch Linux
CPU:
Info: dual core model: AMD Ryzen 3 3250U with Radeon Graphics bits: 64 type: MT MCP
arch: Zen/Zen+ note: check rev: 1 cache: L1: 192 KiB L2: 1024 KiB L3: 4 MiB
Speed (MHz): avg: 1654 high: 2600 min/max: 1400/2600 boost: enabled cores: 1: 1400 2: 1252
3: 1367 4: 2600 bogomips: 20764
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Picasso/Raven 2 [Radeon Vega Series / Radeon Mobile Series] vendor: Lenovo
driver: amdgpu v: kernel arch: GCN-5 pcie: speed: 8 GT/s lanes: 16 ports: active: HDMI-A-1
empty: DP-1,DP-2 bus-ID: 03:00.0 chip-ID: 1002:15d8 temp: 43.0 C
Display: wayland server: N/A compositor: sway v: 1.8.1 driver: gpu: amdgpu tty: 213x56
Monitor-1: HDMI-A-1 model: Lenovo L22i-30 res: 1920x1080 dpi: 102 diag: 546mm (21.5")
I run swayidle
and gammastep
directly as commands from a shell; there is neither a separate swayidle
config file, nor any idle-configuration within the sway
config file.
Steps:
- Boot the OS into console-mode, and login as a normal user.
- Start the wayland session by running
sway
on the console-mode prompt. - On a shell, run
gammastep -O 3500 -v
. - On another shell run
swayidle -w timeout 5 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
- After 5 seconds of idleness, the monitor moves into the standby mode. [After the timeout has elapsed, the process of going into standby mode takes around 2 additional seconds (after the monitor blanks out, but before the monitor displays
StandBy
message and its status LED switches from white to amber color) which I think is too long, but this may be unrelated to the current issue or may not be a problem at all.] - Move the mouse, or press any key, to bring the monitor out of the standby state.
- It can be easily noticed that the color temperature has been reset, although the
gammastep
command is still active on the shell with no additional errors or warnings. Theswayidle
command, likewise, is still running as expected. At this stage, if the monitor is made to go into the standby state after the idle period, and if it is then made to resume, and if this standby-resume cycle is repeated any number of times within the current session, the color-temp is maintained as expected every time. - Press ctrl-c on both shells, to exit the
gammastep
and theswayidle
commands, respectively. - Press
mod + shift + e
and exit out of the sway session back to the console-mode. - Go to step 2. to recreate the issue.
Edit:
The swayidle
application can be removed from the setup, with no effect on the reproducibility of the issue. Running the swaymsg
commands, along with a manually inserted sleep
command is just as effective.