Instructions: Replace the template text and remove irrelevant text (including this line)
Describe the bug
I use ubuntu 20.04 with kde, and after x server restarts, vim starts slowly and gives these error info
XSMP opening connection
XSMP SmcOpenConnection failed: Could not open network socket
And it cannot access to system clipboard.
After execute :xrestore, it can access to system clipboard. But it still starts slowly like before.
To Reproduce
Detailed steps to reproduce the behavior:
vim --clean (or gvim --clean, etc.):xrestoreExpected behavior
vim boots quickly after :xrestore
Screenshots
If applicable, copy/paste the text or add screenshots to help explain your problem.
Environment (please complete the following information):
vim --version.)VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 15 2020 06:40:31)
Included patches: 1-2269
Modified by team...@tracker.debian.org
Compiled by team...@tracker.debian.org
Huge version with GTK3 GUI. Features included (+) or not (-):
+acl -farsi -mouse_sysmouse -tag_any_white
+arabic +file_in_path +mouse_urxvt +tcl
+autocmd +find_in_path +mouse_xterm +termguicolors
+autochdir +float +multi_byte +terminal
-autoservername +folding +multi_lang +terminfo
+balloon_eval -footer -mzscheme +termresponse
+balloon_eval_term +fork() +netbeans_intg +textobjects
+browse +gettext +num64 +textprop
++builtin_terms -hangul_input +packages +timers
+byte_offset +iconv +path_extra +title
+channel +insert_expand +perl +toolbar
+cindent +job +persistent_undo +user_commands
+clientserver +jumplist +postscript +vartabs
+clipboard +keymap +printer +vertsplit
+cmdline_compl +lambda +profile +virtualedit
+cmdline_hist +langmap -python +visual
+cmdline_info +libcall +python3 +visualextra
+comments +linebreak +quickfix +viminfo
+conceal +lispindent +reltime +vreplace
+cryptv +listcmds +rightleft +wildignore
+cscope +localmap -ruby +wildmenu
+cursorbind +lua +scrollbind +windows
+cursorshape +menu +signs +writebackup
+dialog_con_gui +mksession +smartindent +X11
+diff +modify_fname +sound -xfontset
+digraphs +mouse +spell +xim
+dnd +mouseshape +startuptime +xpm
-ebcdic +mouse_dec +statusline +xsmp_interact
+emacs_tags +mouse_gpm -sun_workshop +xterm_clipboard
+eval -mouse_jsbterm +syntax -xterm_save
+ex_extra +mouse_netterm +tag_binary
+extra_search +mouse_sgr -tag_old_static
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -g -O2 -fdebug-prefix-map=/build/vim-iU6mZD/vim-8.1.2269=. -fstack-protector-strong -Wformat -Werror=format-security -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-E -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lnsl -lselinux -lcanberra -lacl -lattr -lgpm -ldl -L/usr/lib -llua5.2 -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.30/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python3.8/config-3.8-x86_64-linux-gnu -lpython3.8 -lcrypt -lpthread -ldl -lutil -lm -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm
Additional context
Add any other context about the problem here.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
do you need to update the $DISPLAY variable?
Sorry, I try logout and login again, find that old startplasma-x11 process is killed normally, and there is only one new process existing. But vim still boots slowly with the same error info.
This is output of vim -u NONE --startuptime, and xsmp init takes 1 second.
1316.658 000.001: --- VIM STARTED ---
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.007 000.007: --- VIM STARTING ---
000.164 000.157: Allocated generic buffers
000.233 000.069: locale set
000.251 000.018: GUI prepared
000.263 000.012: clipboard setup
000.268 000.005: window checked
001.118 000.850: inits 1
001.149 000.031: parsing arguments
001.150 000.001: expanding arguments
001.187 000.037: shell init
1001.710 1000.523: xsmp init
1002.609 000.899: Termcap init
1002.725 000.116: inits 2
1003.159 000.434: init highlight
1003.162 000.003: sourcing vimrc file(s)
1003.242 000.080: inits 3
1011.915 008.673: setup clipboard
1011.938 000.023: setting raw mode
1011.961 000.023: start termcap
1011.991 000.030: clearing screen
1013.491 001.500: opening buffers
1013.497 000.006: BufEnter autocommands
1013.500 000.003: editing files in windows
1013.522 000.022: VimEnter autocommands
1013.525 000.003: before starting main loop
1014.470 000.945: first screen update
1014.473 000.003: --- VIM STARTED ---
I assume that running Vim as vim -u NONE -X makes it fast.
It's useful to confirm.
But of course, that's not really a solution if you e.g. need the x11 clipboard.
@dpelle You are right, -X flag makes it fast.
I just want to solve this problem. Why logout and login causes it...
I have find some new info and a solution.
After logout and login, loginctl list-sessions shows two sessions existing, state of one in them is closed. After killing this closed session, vim boots normally.
I don't know the root reason.
can you make sure, that $DISPLAY does not change? Can you run with with -V so we get better messages? I suppose, Vim is trying to reconnect to the wrong session.
Maybe it is related to https://bugs.kde.org/show_bug.cgi?id=355920.
Closed #6199.
Reopened #6199.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
This problem still be exist.
Now after logout and login, loginctl list-sessions doesn't show two sessions.
This is -V info
XSMP opening connection
XSMP SmcOpenConnection failed: Could not open network socket
chdir(/usr/share/vim/vim90)
fchdir() to previous dir
...
Opening the X display took 1 msecTesting the X display failed
This is startup-time log
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.006 000.006: --- VIM STARTING ---
000.077 000.071: Allocated generic buffers
000.143 000.066: locale set
000.150 000.007: GUI prepared
000.151 000.001: clipboard setup
000.154 000.003: window checked
000.484 000.330: inits 1
000.508 000.024: parsing arguments
000.509 000.001: expanding arguments
000.521 000.012: shell init
1000.834 1000.313: xsmp init
1001.408 000.574: Termcap init
1001.460 000.052: inits 2
1001.689 000.229: init highlight
...
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
so can you verify that $DISPLAY is set correctly?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
so can you verify that $DISPLAY is set correctly?
After logout and login without reboot, I open terminal, and echo $DISPLAY which is always :0. And vim starts slowly in the same terminal.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
hm, shouldn't that rather be :0.0 as default?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I don't know where it is set, but it is :0 even if after reboot.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I just ran into this too. My environment got away from me and X restarted itself. After that, Vim startup is super slow. My $DISPLAY is also :0.
$ vim --clean -V
XSMP opening connection
XSMP SmcOpenConnection failed: Could not open network socket
...
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I cannot reproduce now. Don't know why.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I cannot reproduce now. Don't know why.
I reproduce it. I use ctrl+shift+backspace to kill and restart X server, and this problem occurs.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I find the cause finally from here https://superuser.com/a/1599473/759512.
After X server is replaced, I reuse the tmux server belonging to the last destroyed X server.So it it the tmux-server makes vim trying to connect last destroyed X server session via the XSMP.
Just kill old tmux-server by this way:
lsof -U | grep '^tmux'tmux -L specify-socket-name kill-serverI think nothing vim can do, it should not vim's problem.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #6199 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()