Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some windows become "transparent" after unlocking computer #5936

Open
2 tasks done
Oscar-Rosenwald opened this issue Mar 1, 2024 · 9 comments
Open
2 tasks done

Some windows become "transparent" after unlocking computer #5936

Oscar-Rosenwald opened this issue Mar 1, 2024 · 9 comments
Labels
4.23 bug waiting Waiting for feedback/changes from the author of the issue/PR. Make sure to notify us with a comment.

Comments

@Oscar-Rosenwald
Copy link

Welcome

  • Yes, I'm using the latest major release or the current development version. These are the only supported versions.
  • Yes, I've searched similar issues and discussions on GitHub and didn't find any.

Current Behavior

When I lock my screen and leave it for a few minutes, some applications' windows are not rendered after I unlock. I can see their title bar, I can resize them and move them around the screen or to other workspaces, but I cannot see their contents. Instead I see whatever was on the screen before.

For example, when I unlock my computer and have a Chrome window open, the window simply shows my lock screen. If I switch to another workspace, say with a terminal window, this is displayed correctly, but when I switch back to Chrome, I still see the terminal.

I've observed the behaviour with Chrome and Slack; nothing else so far. The amount of minutes that the computer has to be locked for to see this issue doesn't seem to be consistent. 15 minutes usually does it.

I am able to close the window and reopen the application. Sometimes this results in the same behaviour - a "see-through" window - and sometimes this restarts the application properly. The former is more common, but I couldn't figure out any reason for the difference.

I am using an external screen connected via HDMI. I usually only have the external screen turned on. This was the case when the logs were taken. I only had terminal and Chrome open, and I waited for about 15+ minutes before unlocking the computer. I put down "I don't know" for the compositor question, because while I am not running compton or picom, I don't know enough to find out if I'm running another one.

The issue persists when I remove my config file. I pasted it here anyway just in case.

I believe this is a different issue to #5139 because my problem is only triggered by locking, and because I am able to close the windows unlike ehsanghorbani190 without doing a killall.

Expected Behavior

Unlocking the computer renders all applications correctly.

Reproduction Instructions

  1. Open Google Chrome.
  2. Lock the computer
  3. Wait at least 15 minutes
  4. Unlock the computer
    Now the Chrome window does not work.

i3 version

Binary i3 version:  4.23 (2023-10-29) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.23 (2023-10-29) (pid 8222)
Loaded i3 config:
  /home/lightningman/.config/i3/config (main) (last modified: Fri 01 Mar 2024 10:04:43 GMT, 11460 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

Config file

# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# Use size 8 when in office, size 6 when at home (and using lower resolution)
font pango:monospace 8

# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8

# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.

# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork

# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet

set $mod Mod4
set $alt Mod1

# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status

# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
set $up k
set $down l
set $left j
set $right semicolon

# use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
bindsym $mod+Return exec i3-sensible-terminal

# kill focused window
# bindsym $mod+Shift+q kill
bindsym $mod+y kill

# start dmenu (a program launcher)
# bindsym $mod+d exec dmenu_run
bindsym $mod+n exec dmenu_run

# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop

# change focus
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right

# Doesn't work
bindsym --whole-window $mod+$alt+button1 focus left
bindsym --whole-window $mod+$alt+button3 focus right

# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right

# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# split in horizontal orientation
bindsym $mod+h split h

# split in vertical orientation
bindsym $mod+v split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split)
# bindsym $mod+s layout stacking
bindsym $mod+i layout stacking
# bindsym $mod+w layout tabbed
bindsym $mod+o layout tabbed
# bindsym $mod+e layout toggle split
bindsym $mod+p layout toggle split

# toggle tiling / floating
bindsym $mod+$alt+space floating toggle

# change focus between tiling / floating windows
bindsym $mod+Shift+space focus mode_toggle

# focus the parent container
# bindsym $mod+a focus parent
bindsym $mod+u focus parent

# focus the child container
# bindsym $mod+b focus child
bindsym $mod+m focus child

# move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad

# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show

# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "5"
set $ws2 "6"
set $ws3 "7"
set $ws4 "8"
set $ws5 "9"
set $ws6 "0"
set $ws7 "1"
set $ws8 "2"
set $ws9 "3"
set $ws10 "4"

# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10

# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"

# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym $left       resize shrink width 10 px or 10 ppt
        bindsym $down       resize grow height 10 px or 10 ppt
        bindsym $up         resize shrink height 10 px or 10 ppt
        bindsym $right      resize grow width 10 px or 10 ppt

        # same bindings, but for the arrow keys
        bindsym Left        resize shrink width 10 px or 10 ppt
        bindsym Down        resize grow height 10 px or 10 ppt
        bindsym Up          resize shrink height 10 px or 10 ppt
        bindsym Right       resize grow width 10 px or 10 ppt

        # back to normal: Enter or Escape or $mod+r
        bindsym Return mode "default"
        bindsym Escape mode "default"
        bindsym $mod+r mode "default"
}

bindsym $mod+r mode "resize"

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
        status_command i3status
}

#######################################################################
# automatically start i3-config-wizard to offer the user to create a
# keysym-based config which used their favorite modifier (alt or windows)
#
# i3-config-wizard will not launch if there already is a config file
# in ~/.config/i3/config (or $XDG_CONFIG_HOME/i3/config if set) or
# ~/.i3/config.
#
# Please remove the following exec line:
#######################################################################
exec i3-config-wizard

bindsym $mod+x exec "i3lock -i $HOME/Pictures/Wallpapers/Not_Andy_centred.png; setxkbmap us"

exec --no-startup-id feh --no-fehbg --bg-fill '$HOME/Pictures/Wallpapers/SW/Manequin.png'

## Screenshots
bindsym Print exec --no-startup-id maim "/home/$USER/Pictures/Screenshots/$(date | sed 's/ /_/g' | sed 's/:/-/g').png"
bindsym $mod+Print exec --no-startup-id maim --window $(xdotool getactivewindow) "/home/$USER/Pictures/Screenshots/$(date | sed 's/ /_/g' | sed 's/:/-/g').png"
bindsym Shift+Print exec --no-startup-id maim --select "/home/$USER/Pictures/Screenshots/$(date | sed 's/ /_/g' | sed 's/:/-/g').png"

## Clipboard Screenshots
bindsym Ctrl+Print exec --no-startup-id maim | xclip -selection clipboard -t image/png
bindsym Ctrl+$mod+Print exec --no-startup-id maim --window $(xdotool getactivewindow) | xclip -selection clipboard -t image/png
bindsym Ctrl+Shift+Print exec --no-startup-id maim --select | xclip -selection clipboard -t image/png

## Keyboard layout change
bindsym $mod+$alt+c exec "setxkbmap cz qwerty"
bindsym $mod+$alt+u exec "setxkbmap us"
bindsym $mod+$alt+g exec "setxkbmap gb"

## Switching windows
bindsym $alt+Tab workspace back_and_forth
bindsym $mod+space exec "rofi -show window"

## Switching workspaces with a mouse
bindsym --whole-window $mod+button1 workspace prev
bindsym --whole-window $mod+button3 workspace next

## Switching windows with a mouse
bindsym --whole-window $mod+button4 focus left
bindsym --whole-window $mod+button5 focus right

bindsym $mod+slash "exec i3-input"

## Startup apps
# Example: exec --no-startup-id i3-msg 'workspace 1:Web; exec /usr/bin/firefox'
exec --no-startup-id i3-msg 'workspace 1:Main; exec i3-sensible-terminal'
exec --no-startup-id i3-msg 'workspace 2:Chrome; exec /usr/bin/google-chrome --profile-directory="Profile 3"'
# exec --no-startup-id i3-msg 'workspace 2:Chrome; exec /usr/bin/google-chrome --profile-directory="Profile 4"'
exec --no-startup-id i3-msg 'workspace 3:Slack; exec /snap/bin/slack'

bindsym $mod+$alt+1 exec "xrandr --output $(xrandr | grep -w eDP | awk '{print $1}') --auto"
bindsym $mod+$alt+Shift+1 exec "xrandr --output $(xrandr | grep -w eDP | awk '{print $1}') --off"

bindsym $mod+$alt+2 exec "xrandr --output $(xrandr | grep -w connected | grep -v eDP | head -n 1 | awk '{print $1}') --auto"
bindsym $mod+$alt+Shift+2 exec "xrandr --output $(xrandr | grep -w connected| grep -v eDP | head -n 1| awk '{print $1}') --off"

# Work dual-screen. Laptop is on the right of the very wide screen.
bindsym $mod+$alt+w exec "xrandr --output HDMI-0 --primary --auto --pos 0x0 --output eDP-1-1 --auto --pos 3440x140"
bindsym $mod+$alt+h exec "xrandr --output HDMI-0 --primary --auto --pos 1919x0 --output eDP-1-1 --auto --pos 0x1800"

# Switch workspace when clicking on links
for_window [urgent="latest"] focus

bindsym $mod+BackSpace exec "killall dunst"

bindsym $mod+s sticky enable

Linux distribution & Version

Ubuntu 22.04.4 LTS

Are you using a compositor?

I don't know

Logfile

https://logs.i3wm.org/logs/6326531257270272.bz2

@inThe-FLesh
Copy link

Run inxi -Gxx | grep compositor in a terminal to figure out your compositor and reply with the output, if possible.

@Oscar-Rosenwald
Copy link
Author

There is no output. So I suppose I am not running a compositor.

@inThe-FLesh
Copy link

There is no output. So I suppose I am not running a compositor.
Yeah it is possible that you might not be running one. I will try to reproduce this problem.

@orestisfl
Copy link
Member

There is no output. So I suppose I am not running a compositor.

Do you actually have inxi installed? It's not a standard utility.

I would simply check with pidof picom, if it returns anything, you are running picom which is the most popular compositor.

@orestisfl orestisfl added the waiting Waiting for feedback/changes from the author of the issue/PR. Make sure to notify us with a comment. label Apr 16, 2024
@Oscar-Rosenwald
Copy link
Author

I didn't have it installed, but I installed it in order to run inxi -Gxx.

I just tried pidof picom, and again no response. To be sure I checked the exit status. It's 1, which means pidof couldn't find a process of that name.

@orestisfl
Copy link
Member

Can you perhaps capture this in with a screen recorder? It might make things clearer.

Additionally, when it happens again can you perhaps do an i3 in-place restart? bindsym $mod+Shift+r restart from your config file.

@Oscar-Rosenwald
Copy link
Author

Hi. It's taken me a while to see it happen again for long enough to capture. Sorry about that. (As an aside, there are times when it just goes away after a minute or so, which I didn't know before. Hence the delay. The screen capture is from a time this did not happen - it never resolved itself until I killed the windows and ran killall chrome.)

I tried restarting my i3 session - it had no effect. I should have mentioned that in the original report, my bad.

In the recording, I have four Chrome windows open, all frozen. Initially they display the last thing they were showing before the freeze. I have two more windows open - the screen recording app and a terminal to show that some application function properly. I move the cursor around the screen and click on a bunch of things. Nothing happens, only the focus switches to the frozen windows. I move the right-most Chrome window to the left so you can see how the display reacts, though this is not consistent. Sometimes the moved window just goes black.

The video is here. Let me know if you have issues with accessing it.

I think I found a reliable way to reproduce now, so further request will be responded to more swiftly.

@orestisfl
Copy link
Member

The video is here. Let me know if you have issues with accessing it.

Thanks, that's really interesting. I can access it but for it being accessible in the future, can you please upload it here?

I think I found a reliable way to reproduce now, so further request will be responded to more swiftly.

In that case, I would ask you to try to reproduce it with openbox or awesomewm as well if possible.

Additionally, what's the reliable way to reproduce it?

@Oscar-Rosenwald
Copy link
Author

I tried uploading the file here first, but I have a big monitor, so the resolution had to be large, and the file didn't fit. I can try to compress it next time if you'd like.

I am not familiar with openbox or awesomewm, but I see they are other window managers. Can you please confirm (before I do something complicated) that you want me to reproduce the problem with other window managers?

As for reproducing the problem: For some reason it only happens on one of my Chrome profiles, and only (so far as I've been able to see) when I am looking at a pdf in Google Drive. I downloaded Simple Tab Renamer, a Chrome extension which, when I rename the tab where the pdf is open, freezes all my chrome windows most times that I try it. Note this freezes Chrome windows of other profiles as well, but I haven't seen it triggered on the other profiles yet.

Of course the freeze happens at other times, too, but this is the most reliable way I've found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.23 bug waiting Waiting for feedback/changes from the author of the issue/PR. Make sure to notify us with a comment.
Projects
None yet
Development

No branches or pull requests

4 participants