i3 / i3lock

improved screen locker
https://i3wm.org/i3lock
BSD 3-Clause "New" or "Revised" License
920 stars 404 forks source link

There are two "waiting icons" when there are two monitors #277

Closed xor512 closed 4 years ago

xor512 commented 4 years ago

I'm submitting a…

[x] Bug

This bug is created from https://github.com/meskarune/i3lock-fancy/issues/164 as I've seen the same issue in i3lock itself.

Current Behavior

I have the following setup:

A laptop with a screwed up screen (mechanical issue, pink stains over the screen, cannot fix)
A monitor connected to the laptop via VGA-cable due to the screwed up screen in the laptop

The screen is "doubled", meaninig that for example in arandr I do not set double-screen settings, but the same image is on both screens (both on a laptop, and a monitor, see the following screenshot: https://raw.githubusercontent.com/xor512/trashbin/master/i3fancy_lock_bug/arandr.png).

The following happens in this setting when i3lock-fancy is launched, which is done in awesome-wm via the following line in rc,lua:

respawn_with_shell("xautolock", "xautolock -detectsleep -time 10 -notify 30 -notifier \"notify-send -u critical -t 10000 -- 'LOCKING screen in 30 seconds'\" -locker 'i3lock-fancy -g -n' &")

(see https://github.com/xor512/dotfiles/blob/master/home/ss/.config/awesome/rc.lua):

https://raw.githubusercontent.com/xor512/trashbin/master/i3fancy_lock_bug/i3_double_wait_icon.jpg

As seen in i3_double_wait_icon.jpg there are 2 "waiting icons" instead of 1.

Same happen when just running i3lock from command line (I'm not sure it always happens, but it happens if laptop lid is open, xautolock kicks in and then i3lock can be run many times from command line with this effect. AFAIU the bug is not reproducible i3lock (or i3lock-fancy) was not first called from xautolock by timeout

Expected Behavior

There should be only one animating waiting circle.

Environment

I'm using awesome-wm with the following config: https://github.com/xor512/dotfiles/blob/master/home/ss/.config/awesome/rc.lua.

Version is

awesome --version                 
awesome v4.3 (Too long)
 • Compiled against Lua 5.3.5 (running with Lua 5.3)
 • D-Bus support: ✔
 • execinfo support: ✔
 • xcb-randr version: 1.6
 • LGI version: 0.9.2
Config file
https://github.com/xor512/dotfiles/blob/master/home/ss/.config/awesome/rc.lua.
- Linux Distribution & Version:
~ >>> uname -a                
Linux cocaine 5.6.16-1-MANJARO #1 SMP PREEMPT Wed Jun 3 14:26:28 UTC 2020 x86_64 GNU/Linux

- Are you using a compositor (e.g., xcompmgr or compton):
No
stapelberg commented 4 years ago

This is not a bug, but intentional: i3lock displays an unlock indicator on all screens (as it can’t know which one(s) are visible in real life).

If your monitor configuration is such that you use mirroring with your contents visible overlappingly, then this will result in what you’re seeing.

The solution is to change your monitor config so that you disable entirely (xrandr --output x --off) the screens you don’t want to use.