greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

new privacy block seems to create some instability when switching on and off display outputs

kevenwyld opened this issue · comments

My bar is configured in sway like so:

bar {
        tray_output DP-3
        status_command i3status-rs
        font pango:FreeSans, FontAwesome 9.5
}

My i3status-rs configuration is as follows:

Click to expand
[theme]
theme = "space-villain"
[icons]
icons = "awesome5"

[[block]]
block = "privacy"
[[block.driver]]
name = "v4l"
[[block.driver]]
name = "pipewire"

[[block]]
block = "temperature"
idle = 60
chip = "amdgpu-pci-2f00"
inputs = ["edge"]
format = "GPU:$average"
#icons_format = " "

[[block]]
block = "temperature"
chip = "k10temp-pci-00c3"
inputs = ["Tctl"]
format = "CPU:$average"
#cons_format = " "

[[block]]
block = "custom"
command = "cat /sys/devices/platform/nct6687.2592/hwmon/hwmon*/fan2_input"
interval = 4
format = "P:$text"

[[block]]
block = "disk_space"
path = "/"
format = "$used.eng(w:4)/$total.eng(w:4)"
info_type = "available"
alert_unit = "GB"
interval = 20
warning = 100.0
alert = 30.0

[[block]]
block = "disk_space"
path = "/spoonstorage"
format = "$used.eng(w:4)/$total.eng(w:4)"
info_type = "available"
alert_unit = "GB"
interval = 20
warning = 20.0
alert = 10.0

[[block]]
block = "memory"
format = "$icon $mem_used_percents"

[[block]]
block = "cpu"
interval = 1

[[block]]
block = "load"
interval = 1

[[block]]
block = "sound"
step_width = 0
format = "$output_description { $volume| }"
signal = 4

[[block]]
block = "net"
device = "enp39s0"
format = "$ip"

[[block]]
block = "net"
device = "enp39s0"
format = "$ipv6"

# [[block]]
# block = "net"
# device = "vpn0"
# format = "$icon $ip"
# inactive_format = "$icon DOWN"
# These don't seem to work for iface up or down
# hide_missing = true
# hide_inactive = true
# if_command = "/home/$HOME/.config/i3status-rust/check_vpn.bash"

[[block]]
block = "net"
device = "enp39s0"
#format = "$graph_down:3;M*_b#350 $graph_up:3;M*_b#50"
format = "$speed_down.eng(prefix:M) $speed_up.eng(prefix:M)"
#format = "$graph_down $graph_up"

[[block]]
block = "backlight"
cycle = [ 45, 100 ]
invert_icons = true
root_scaling = 2.4
device = "ddcci1[1,2,3,4]"

[[block]]
block = "backlight"
cycle = [ 45, 100 ]
invert_icons = true
root_scaling = 2.4
device = "ddcci15"
missing_format = ""

[[block]]
block = "hueshift"
hue_shifter = "wl_gammarelay_rs"
format = "G:$temperature"
click_temp = 4800
#min_temp = 3000

[[block]]
block = "time"
interval = 1
#format = "%a %d/%m %R"
format = "$timestamp.datetime(f:'%a   %Y-%m-%d   %I:%M:%S   %p')"
#cons_format = " "

[block.theme_overrides]
idle_fg = "#FFFFFF"

[[block]]
block = "battery"
if_command = "test -e /sys/class/power_supply/BAT0"

My sway output configuration looks like this (I know this isn't a sway bug report, but I want to be as thorough as possible)

Click to expand
output {
  DP-1 position 1440 1440 mode 2560x1440@165Hz
  DP-1 adaptive_sync off

  DP-2 transform 90
  DP-2 position 4000 790 mode 2560x1440@165Hz
  DP-2 adaptive_sync off

  DP-3 transform 270
  DP-3 position 0 790 mode 2560x1440@165Hz
  DP-3 adaptive_sync off

  DP-4 position 1440 0 mode 2560x1440@165Hz
  DP-4 adaptive_sync off

  DP-5 position 5440 1750 mode 3840x1600@144Hz
  DP-5 adaptive_sync on
  DP-5 enable

  DP-6 position 5440 3350 mode 2048x1536@60Hz
  DP-6 scale 1.5
  DP-6 enable
}

When powering off DP-5 and DP-6 (my simrig, it's all on a power switch) with the privacy block enabled, the bar will become frozen and stop updating. EDIT: It's somewhat intermittent and I can't reproduce it every time but I have never experienced this behavior before until enabling this block.

The way sway handles this is essentially the same if I ran swaymsg output DP-5 disable && swaymsg output DP-6 disable, workspaces are moved to the other enabled outputs. If I power them back on they become enabled again. The bar does not recover if I turn them back on though. I have to run swaymsg reload to get it to relaunch i3status-rs for it to recover.

This frozen state does not happen when I don't have the privacy block enabled. I have not found a good way to produce any logs for this so any suggestions you have on getting some more verbosity out of sway/i3status-rs to debug this further are welcome.

Also I appreciate that this is a somewhat unique display layout and that this problem could be something entirely due to the way sway handles outputs, however since it only impacts the bar when the privacy block is enabled I'm starting here.

Thanks!

I'm going to close this, turns out I was completely wrong about the cause after I got RUST_LOG=privacy=debug working. I can consistently reproduce it now so I will open a new issue with correct details.