You are not logged in.
Hi, I've recently installed Arch Linux on a new Asus Zenbook and am struggling to set up external monitor support. I use i3wm and picom. My desired output is to have my external monitor display a separate workspace in i3wm.
I run the following command:
xrandr --output HDMI-1 --left-of eDP-1 --auto
I get a black screen and cursor on the external monitor, which is on a separate workspace, and my status bar shifts to the left of my laptop screen so that half is offscreen. Reloading i3wm corrects the status bar, but the external monitor remains a black screen with a cursor. Launching a terminal on the external workspace gives me a text input cursor, but the screen remains black and no apps render.
Here is some info on my config:
lspci -k | grep -A 2 -E "(VGA|3D)
0000:00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-P [Iris Xe Graphics] (rev 04)
Default monitor config:
Section "Monitor"
Identifier "eDP-1"
Option "Primary" "true"
Option "PreferredMode" "2880x1800_90.00"
EndSection
Section "Screen"
Identifier "Screen0"
Monitor "eDP-1"
DefaultDepth 24
SubSection "Display"
Modes "2880x1800
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Layout0"
Screen "Screen0"
EndSection
How I launch picom in i3:
exec --no-startup-id seq 0 3 | xargs -l1 -I@ picom -b -d :0.@
And picom config:
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";
#################################
#
# GLX backend
#
#################################
glx-no-stencil = true;
glx-swap-method = 2;
#################################
#
# Shadows
#
#################################
# Enabled client-side shadows on windows.
shadow = true;
# The blur radius for shadows. (default 12)
shadow-radius = 5;
# The left offset for shadows. (default -15)
shadow-offset-x = -5;
# The top offset for shadows. (default -15)
shadow-offset-y = -5;
# The translucency for shadows. (default .75)
shadow-opacity = 0.5;
# The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
"! name~=''",
"name = 'Notification'",
"name = 'Plank'",
"name = 'Docky'",
"name = 'Kupfer'",
"name = 'xfce4-notifyd'",
"name *= 'VLC'",
"name *= 'compton'",
"name *= 'picom'",
"name *= 'Chromium'",
"name *= 'Chrome'",
"class_g = 'Firefox' && argb",
"class_g = 'Conky'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Cairo-dock'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
shadow-ignore-shaped = false;
#################################
#
# Opacity
#
#################################
inactive-opacity = 0.8;
# active-opacity = 0.8;
# frame-opacity = 1;
inactive-opacity-override = true;
opacity-rule = [
"90:class_g = 'Polybar'",
"90:class_g = 'Alacritty' && focused",
"70:class_g = 'Alacritty' && !focused"
];
# Dim inactive windows. (0.0 - 1.0)
# inactive-dim = 0.2;
# Do not let dimness adjust based on window opacity.
# inactive-dim-fixed = true;
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
# blur-background = true;
# Blur background of opaque windows with transparent frames as well.
# blur-background-frame = true;
# Do not let blur radius adjust based on window opacity.
blur-background-fixed = false;
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
];
#################################
#
# Fading
#
#################################
# Fade windows during opacity changes.
fading = true;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 4;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.03;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.03;
# Fade windows in/out when opening/closing
# no-fading-openclose = true;
# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];
#################################
#
# Other
#
#################################
# Try to detect WM windows and mark them as active.
mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
mark-ovredir-focused = true;
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
# Usually more reliable but depends on a EWMH-compliant WM.
use-ewmh-active-win = true;
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true;
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
detect-client-opacity = true;
# Vertical synchronization: match the refresh rate of the monitor
# vsync = true;
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;
# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance.
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#sw-opti = true;
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
# Known to cause flickering when redirecting/unredirecting windows.
unredir-if-possible = false;
# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ ];
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
detect-transient = true;
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
detect-client-leader = true;
#################################
#
# Window type settings
#
#################################
wintypes:
{
tooltip =
{
# fade: Fade the particular type of windows.
fade = true;
# shadow: Give those windows shadow
shadow = false;
# opacity: Default opacity for the type of windows.
opacity = 0.85;
# focus: Whether to always consider windows of this type focused.
focus = true;
};
};
# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
xrender-sync-fence = true;
Admittedly I am currently quite lost and would appreciate any help. Thanks in advance!
Offline
Launching a terminal on the external workspace gives me a text input cursor, but the screen remains black and no apps render.
So you're seeing a terminal emulator there?
I get a black screen and cursor on the external monitor
"cursor" means mouse pointer here?
"pkill picom" and post your i3config and the output of "xrandr -q" after enabling the external monitor.
Offline
Thanks for the quick response!
Yes, by cursor I meant mouse pointer. A terminal emulator does not appear, but I know it is there as the mouse pointer will change to a text input pointer when I launch alacritty, and I can execute commands without seeing the terminal on screen.
"pkill picom" freezes my main display for some reason. After refreshing i3 and reloading xrandr (but without picom active), my external monitor works as expected!! Here's "xrandr -q":
Screen 0: minimum 320 x 200, current 4800 x 1800, maximum 16384 x 16384
eDP-1 connected primary 2880x1800+1920+0 (normal left inverted right x axis y axis) 302mm x 189mm
2880x1800 90.00*+ 60.00
2880x1620 59.96 59.97
2560x1600 59.99 59.97
2560x1440 59.99 59.99 59.96 59.95
2048x1536 85.00 75.00 60.00
1920x1440 85.00 75.00 60.00
1856x1392 75.00 60.01
1792x1344 75.00 60.01
2048x1152 59.99 59.98 59.90 59.91
1920x1200 59.88 59.95
1920x1080 60.01 59.97 59.96 59.93
1600x1200 85.00 75.00 70.00 65.00 60.00
1680x1050 59.95 59.88
1400x1050 74.76 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 85.02 75.02 60.02
1400x900 59.96 59.88
1280x960 85.00 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1280x800 59.99 59.97 59.81 59.91
1152x864 75.00
1280x720 60.00 59.99 59.86 59.74
1024x768 85.00 75.05 60.04 85.00 75.03 70.07 60.00
1024x768i 86.96
960x720 85.00 75.00 60.00
928x696 75.00 60.05
896x672 75.05 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
832x624 74.55
960x540 59.96 59.99 59.63 59.82
800x600 85.00 75.00 70.00 65.00 60.00 85.14 72.19 75.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
700x525 74.76 59.98
800x450 59.95 59.82
640x512 85.02 75.02 60.02
700x450 59.96 59.88
640x480 85.09 60.00 85.01 72.81 75.00 59.94
720x405 59.51 58.99
720x400 85.04
684x384 59.88 59.85
640x400 59.88 59.98 85.08
576x432 75.00
640x360 59.86 59.83 59.84 59.32
640x350 85.08
512x384 85.00 75.03 70.07 60.00
512x384i 87.06
512x288 60.00 59.92
416x312 74.66
480x270 59.63 59.82
400x300 85.27 72.19 75.12 60.32 56.34
432x243 59.92 59.57
320x240 85.18 72.81 75.00 60.05
360x202 59.51 59.13
360x200 85.04
320x200 85.27
320x180 59.84 59.32
320x175 85.27
HDMI-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
1920x1080 60.00*+ 50.00 59.94
1600x900 60.00
1280x1024 75.02 60.02
1152x864 75.00
1280x720 60.00 50.00 59.94
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x480 60.00 59.94
640x480 75.00 60.00 59.94
720x400 70.08
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
My i3 config:
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:SFNS Display 14
# 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
# udiskie monitors and automounts external devices
exec_always --no-startup-id udiskie -ans &
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec alacritty
# kill focused window
bindsym $mod+Shift+q kill
# start rofi
bindsym $mod+d exec --no-startup-id ~/.config/rofi/launchers/type-1/launcher.sh &
bindsym $mod+p exec --no-startup-id ~/.config/rofi/powermenu/type-2/powermenu.sh &
bindsym $mod+m exec --no-startup-id ~/.config/rofi/applets/bin/screenshot.sh &
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon 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+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon 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 and hide polybar
bindsym $mod+f fullscreen toggle ; exec /usr/bin/hideIt.sh -N 'polybar' -d top --toggle-peek
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# 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"
set $ws10 "10"
# 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
# load dream_catcher python script on binded shortcut
bindsym $mod+Shift+t workspace number $ws9 ; exec urxvt -hold -e python ~/Dropbox/CBT/dream_catcher/dream_catcher.py
# launch chatgpt in CLI
bindsym $mod+Shift+g workspace number $ws5 ; exec urxvt -hold -e python ~/Dropbox/chatgpt-cli/chatgpt.py
# 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 j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon 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 xbindkeys for keyboard shortcuts
exec --no-startup-id xbindkeys
# Start standalone compositor
exec --no-startup-id DISPLAY=":0" picom -b
# Set background on i3 launch
exec_always --no-startup-id feh --bg-scale ~/Pictures/Wallpapers/wallpaper.jpg
# Start polybar on launch
exec_always --no-startup-id bash ~/.config/polybar/launch.sh
# Start dropbox on launch
exec_always --no-startup-id "sh -c 'sleep 5; exec /usr/bin/dropbox'"
# Set wacom tablet to relative mode
exec --no-startup-id xsetwacom --set "13" Mode Relative
# hideIt.sh enables hiding/revealing of windows, used here to initiated toggling of polybar
# exec_always --no-startup-id /usr/bin/hideIt.sh -N 'polybar' -w -d top -p 100 --no-trans -S
# i3 appearance
for_window [class=".*"] border pixel 0
hide_edge_borders both
gaps inner 0
gaps outer 0
gaps top 40
Now hopefully we can figure out how I've botched my picom and/or i3 config
Offline
How I launch picom in i3: exec --no-startup-id seq 0 3 | xargs -l1 -I@ picom -b -d :0.@
But
# Start standalone compositor
exec --no-startup-id DISPLAY=":0" picom -b
and you probably also don't have 4 screens (DISPLAY :0.0 … :0.4)?
At least both outputs are on the current one.
Make sure there's just one instance of picom, test the xrender backend behavior and if you've installed xf86-video-intel: remove that.
My desired output is to have my external monitor display a separate workspace in i3wm.
Workspace like virtual desktop? Like in awesome?
https://forum.endeavouros.com/t/make-i3 … aces/29654
https://unix.stackexchange.com/question … e-displays
https://www.reddit.com/r/i3wm/comments/ … behaviour/
Offline
Apologies, I should have clarified in my reply that I changed how I launch picom in my config after consulting the picom page on arch wiki. I'll admit I don't actually know what the "DISPLAY=":0" argument does, I just lifted it from the wiki and hoped for the best in a moment of desperation. Running the previous command "picom -b -d :0.@" revealed "-d" is no longer an extant flag for picom.
I want to avoid statically assigning specific workspaces to specific displays as in the examples provided. What I meant in my original post was that I want different workspaces (configured dynamically) rather than cloning my laptop display onto my external monitor. That is currently the behavior I get without a running picom instance, so no issues there.
I can confirm I only have one instance of picom running, and I don't have xf86-video-intel installed. What do you mean by "test the xrender backend behavior"? Sorry, not sure how to proceed.
Offline
I want different workspaces (configured dynamically) rather than cloning my laptop display onto my external monitor.
So basically what you get by
xrandr --output HDMI-1 --left-of eDP-1 --auto
and what's reflected by the xrandr output in #3
Your picom config has
backend = "glx";
If you make that
backend = "xrender";
picom will render on the xrender backend - right now it sounds like picom fails to grow the GL context.
An ugly workaround might be to
killall picom
xrandr --output HDMI-1 --left-of eDP-1 --auto
picom -b
Offline
I've changed the backend to xrender as suggested, and modified my i3 config so that extant picom instances are killed before launching a new instance upon reloading i3. Now I can reload i3+picom in a flash after changing my xrandr config and everything works as intended.
Thanks so much for the help! I'm happy to mark this as solved, but out of curiosity what would be a fix that isn't an "ugly workaround"?
Offline
You want to check whther the backend is the critical change or picom needs to be restarted.
We need to figure whether it completely misses the resize or is there a problem resizing the GL context only.
In case of the latter, this might be due to a misconfugured GL setup or a bug in the GL stack or the compositor itself, so if it's only the GLX backend causing this, check "glxinfo -B" and your Xorg log, https://wiki.archlinux.org/title/Xorg#General
Offline
Here's "glxinfo -B"
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel (0x8086)
Device: Mesa Intel(R) Graphics (RPL-P) (0xa7a0)
Version: 24.0.6
Accelerated: yes
Video memory: 15615MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Graphics (RPL-P)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.0.6-arch1.2
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.0.6-arch1.2
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.0.6-arch1.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
I don't see anything outrageous in my Xorg log. Here's "cat /var/Xorg.o.log | grep glx"
[ 5.382] (II) LoadModule: "glx"
[ 5.382] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 5.389] (II) Module glx: vendor="X.Org Foundation"
I should add that restarting picom wasn't helping until I changed the backend to xrender.
Offline
I should add that restarting picom wasn't helping until I changed the backend to xrender.
So picom w/ the GLX backend doesn't work at all w/ two outputs?
Even if you first kill picom, then change the output config, then re-start picom?
- # blur-background = true;
+ # blur-background = false;
Do you have the same issues w/ picom/glx if you
1. run the eDP at 1920x1200
2. put the new output to the right of the eDP (that one again at 2880x1800)
3. put it --pos 0x0 (so they overlap - together w/ "1" I wonder wheter exceeding 4096px width runs into some GL_MAX limitation)
Offline