I3 'ghost' window / container (?) on startup

Hi
My i3 is running fab, but one little niggle is on WS 1 there is an invisible window or container on startup that I dont understand

When I start something, eg terminal, on that WS 1 (only that one), the new window starts on the right hand half of the screen only, with a blank space on the left hand half of the screen
killing the recently opened window on the right, then killing the invisible window and then reopening whatever app and it opens as it should, so I deduce there is an invisible window.
Also, if I kill window beofore opening anything on that WS1, the app opens across the whole WS as it should.

There is nothing in my config that I can see, that would be responsible

I did have autotiling on that WS 1, but disabled it to see if that was the problem (as it was only on WS 1) but no.

Any ideas please?

# ArchLabs i3 config
# Modified by Leigh

# mod key used for most binds
# Mod1 = Alt
# Mod4 = Super
set $Mod Mod4

# border & title
for_window [class="^.*"] border pixel 1, title_format "<b> %class >> %title </b>"

# gaps
gaps inner 4
gaps outer 0

bindsym $Mod+shift+b border toggle

# Setting border style to pixel eliminates title bars
default_border pixel

# wallpaper
exec --no-startup-id sleep 2 && nitrogen --restore

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:DejaVu Sans Mono 12


###############        Bar         ##################
bar {
#Toggle Hide bar (needs bindsym $mod+h bar mode toggle below)
#    mode hide
    modifier None
    output HDMI1
    position top
	font pango:Noto Sans Regular 12, FontAwesome 12
    status_command i3status --config ~/.config/i3/i3status.conf
}

bar {
#Toggle Hide bar (needs bindsym $mod+h bar mode toggle below)
#    mode hide
    modifier None
    output eDP1
    position bottom
	font pango:Noto Sans Regular 12, FontAwesome 12
    tray_output none
    status_command i3status --config ~/.config/i3/i3status2.conf
}


bindsym $mod+p bar mode toggle

###############     Autostart      ##################

# run with reload
exec_always --no-startup-id xrdb -load ~/.Xresources

#exec --no-startup-id thunar

#exec --no-startup-id xfce4-terminal

# autotiling
#exec --no-startup-id autotiling -w 1

#############         Bindings           ##################

# launchers
bindsym Control+r exec --no-startup-id rofi_run -r

# kill focused window
bindsym $Mod+q kill

# core
bindsym $Mod+w             exec --no-startup-id al-browser
bindsym $Mod+f             exec --no-startup-id al-filemanager
bindsym $Mod+t             exec --no-startup-id al-terminal

# logout script
bindsym $Mod+x exec --no-startup-id rofi_run -l

# Screenshot
bindsym Print exec --no-startup-id "scrot '%S.png' -e 'mv $f $$(xdg-user-dir PICTURES)/ArchLabs-%S-$wx$h.png ; gthumb $$(xdg-user-dir PICTURES)/ArchLabs-%S-$wx$h.png'"

# audio
bindsym XF86AudioPlay        exec --no-startup-id playerctl play-pause
bindsym XF86AudioNext        exec --no-startup-id playerctl next
bindsym XF86AudioPrev        exec --no-startup-id playerctl previous
bindsym XF86AudioStop        exec --no-startup-id playerctl stop
bindsym XF86AudioMute        exec --no-startup-id pamixer -t
bindsym XF86AudioRaiseVolume exec --no-startup-id pamixer -i 2
bindsym XF86AudioLowerVolume exec --no-startup-id pamixer -d 2

# backlight
bindsym XF86MonBrightnessUp   exec --no-startup-id xbacklight -inc 10
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10

# Toggle WM
bindsym $mod+a exec ~/.local/bin/WM_Toggle

# start Calibre
bindsym $mod+c exec calibre

# start Editor (xed)
bindsym $mod+e exec xed

# start Grsync
bindsym $mod+g exec grsync

# Start Joplin
bindsym $mod+j exec joplin-desktop

# start Nextcloud
bindsym $mod+n exec nextcloud

# start Skype
bindsym $mod+s exec skypeforlinux

# start VirtualBox
bindsym $mod+v exec virtualbox

# start Zoom
bindsym $mod+z exec zoom


###########          Workspace Bindings          ###############

# 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 "1:"
set $ws2 "2:"
set $ws3 "3:"
set $ws4 "4:"
set $ws5 "5:"
set $ws6 "6:"
set $ws7 "7:"
set $ws8 "8:"
set $ws9 "9:"

# bind program to workspace and focus to them on startup:
# window rules, you can find the window class using xprop
assign [class=Xfce4-terminal|GParted|Gnome-disks] $ws1
assign [class=Thunar|Grsync] $ws2
assign [class=(?i)firefox|Chromium|Yad] $ws3
assign [class="Joplin"] $ws4
assign [class=Shotwell|Gthumb] $ws5
assign [class=calibre|Atril|Xed] $ws6
assign [class=zoom|Skype] $ws7
assign [class="(?i)libreoffice-writer$"]$ ws8
assign [class="(?i)soffice"] $ws8
assign [class="(?i)libreoffice-calc"] $ws8
assign [class="(?i)libreoffice.*"] $ws8


# automatic set focus new window if it opens on a workspace other than the current one:
for_window [class=Xfce4-terminal] focus
for_window [class=(?i)firefox|Chromium] focus
for_window [class=Thunar] focus
for_window [class=Xed] focus
for_window [class=Joplin] focus
for_window [class=Shotwell|Gthumb] focus
for_window [class=calibre|Atril] focus
for_window [class=zoom|Vinagre] focus
for_window [class=GParted|Gnome-Disks|Grsync] focus

# use workspaces on different displays:
# where you have to replace VGA-0/HDMI-0 with the names for your displays
# you can get from xrandr command
workspace $ws1 output eDP1
workspace $ws2 output eDP1
workspace $ws3 output HDMI1
workspace $ws4 output HDMI1
workspace $ws5 output HDMI1
workspace $ws6 output HDMI1
workspace $ws7 output HDMI1
workspace $ws8 output HDMI1
workspace $ws9 output HDMI1

# 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

# 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


##############     Reload configs           ################

# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $Mod+Shift+r restart

# reload the configuration file
bindsym $Mod+Shift+c reload

############      Container/Window control  ############

# Floating
bindsym $Mod+space floating toggle
floating_modifier  ctrl

# Keyhints
# set floating
for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
for_window [class="Yad" instance="yad"] floating enable
# keep on top
for_window [title="Keyhints"] sticky enable
# Keyhints
bindsym $mod+F1 exec ~/.local/bin/keyhint.sh

#Scratchpad
bindsym $Mod+Shift+d move scratchpad
bindsym $Mod+d scratchpad show

# change focus with 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 with 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

# container layout
# split in horizontal orientation
bindsym $mod+Shift+h split h

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

default_orientation horizontal

# resize window using arrows
bindsym $mod+r mode "resize"

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

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

What applications are you running at startup?

Some applications don’t register their position correctly, especially if they are assigned to float (asunder in the upper left of screen):

Are you running picom? Some applications are incompatible and create blank windows.

Try running xprop in the terminal and clicking on the blank spot to see if you get some output for a window that may be there.

2 Likes

Once again, @packrat comes up trumps!
Thanks!

corectrl!

In my .xprofile:

# corectrl
corectrl &

However it does this obviously doesnt work in i3 (although the icon is in the bar)

leigh@archlabs ~ % corectrl -h
[22-11-22 12:37:00.160][W] glxinfo command failed
Usage: corectrl [options]

Options:
  -h, --help                                    Displays help on commandline
                                                options.
  --help-all                                    Displays help including Qt
                                                specific options.
  -v, --version                                 Displays version information.
  -l, --lang <language>                         Forces a specific <language>,
                                                given in locale format. Example:
                                                en_EN.
  -m, --toggle-manual-profile <"profile name">  When an instance of the
                                                application is already running,
                                                it will toggle the manual
                                                profile whose name is <"profile
                                                name">.
  --minimize-systray                            Minimizes the main window
                                                either to the system tray (when
                                                available) or to the taskbar.
                                                When an instance of the
                                                application is already running,
                                                the action will be applied to
                                                its main window.
  -t, --helper-timeout <milliseconds>           Sets helper auto exit timeout.
                                                The helper process kills himself
                                                when no signals are received
                                                from the application before the
                                                timeout expires.
                                                Values lesser than 1000
                                                milliseconds will be ignored.
                                                Default value: 180000
                                                milliseconds.
  --toggle-window-visibility                    When an instance of the
                                                application is already running,
                                                it will toggle the main window
                                                visibility showing or minimizing
                                                it, either to the taskbar or to
                                                system tray.

But neither of the below in my i3 config get rid of the invisible window

exec --no-startup-id corectrl --minimize-systray
exec --no-startup-id corectrl --toggle-window-visibility

Neither did putting this in my i3 config:

exec --no-startup-id i3-msg '[class="corectrl"] kill'

But it did close the offending invisible corectrl window when run in a terminal:


leigh@archlabs ~ % i3-msg '[class="corectrl"] kill'
[{"success":true}]

So, how do I get the above terminal command to run in my i3 config file?

please!

EDIT
seems the other corectrl options also close that invisible window in a terminal, but not when included in config:

corectrl --minimize-systray
corectrl --toggle-window-visibility

EDIT 2
I know I can just press $mod+Q before opening new window, but …

Don’t start it mimimized, and set it up so it’s on Worksspace 10 (some out of your way workspace). Clicking on the tray icon will warp you to the workspace since the application is open.

Sort of like using WS 10 as a scratchpad.

i3 does have a built in scratchpad. If there is a way to open that application in the scratchpad, that would be another option.

3 Likes

Sod it,
I am going oldschool
:rofl:

1 Like

What are you using corectl for leigh? Do you have it set up correctly? Look at 2.25-2.36 in this video.

2 Likes

Yup, all set up good
I have tried ensuring that the app opens minimised to tray via that setting and via calling it on startup with

corectrl --minimize-systray

it works perfectly when I boot into OB, just that strange invisible window when I boot into i3 (same machine and AL instance)

But …

Very good point. The only thing I use it for is to set the CPU profile to ‘Performance’ as I always use the laptop plugged into power

There is probably a far easier way of doing that.
I will investigate …

From here
After disabling corectrl, on reboot it goes back to schedutil

leigh@archlabs ~ % cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
schedutil
leigh@archlabs ~ % echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
[sudo] password for leigh: 
performance
leigh@archlabs ~ % cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor                        
performance

https://bbs.archlinux.org/viewtopic.php?pid=1910844#p1910844

yay  cpupower
sudo nano /etc/default/cpupower
# Define CPUs governor
# valid governors: ondemand, performance, powersave, conservative, userspace.
governor='performance'

# Limit frequency range
# Valid suffixes: Hz, kHz (default), MHz, GHz, THz
#min_freq="2.25GHz"
#max_freq="3GHz"

# Specific frequency to be set.
# Requires userspace governor to be available.
# Do not set governor field if you use this one.
#freq=

# Utilizes cores in one processor package/socket first before processes are
# scheduled to other processor packages/sockets.
# See man (1) CPUPOWER-SET for additional details.
#mc_scheduler=

# Utilizes thread siblings of one processor core first before processes are
# scheduled to other cores. See man (1) CPUPOWER-SET for additional details.
#smp_scheduler=

#  Sets a register on supported Intel processore which allows software to convey
# its policy for the relative importance of performance versus energy savings to
# the  processor. See man (1) CPUPOWER-SET for additional details.
#perf_bias=

# vim:set ts=2 sw=2 ft=sh et:
sudo systemctl enable cpupower.service

Then after reboot

leigh@archlabs ~ % cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor                        
performance

removed corectrl and no more invisible windows :smiley:

Thanks @PackRat
Thanks @knob

3 Likes