1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
|
.\" Automatically generated by Pandoc 3.1.3
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "rofi-debugging" "5" "" "rofi" "File Formats Manual"
.hy
.SH NAME
.PP
Debugging rofi.
.PP
When reporting an issue with rofi crashing, or misbehaving.
It helps to do some small test to help pin-point the problem.
.PP
First try disabling your custom configuration: \f[B]-no-config\f[R]
.PP
This disables the parsing of the configuration files.
This runs rofi in \f[I]stock\f[R] mode.
.PP
If you run custom C plugins, you can disable the plugins using:
\f[B]-no-plugins\f[R]
.SH Get the relevant information for an issue
.PP
Please pastebin the output of the following commands:
.IP
.nf
\f[C]
rofi -help
rofi -dump-config
rofi -dump-theme
\f[R]
.fi
.TP
\f[B]rofi -help\f[R] provides us with the configuration files parsed, the exact version, monitor layout and more useful information.
The \f[B]rofi -dump-config\f[R] and \f[B]rofi -dump-theme\f[R] output
gives us \f[B]rofi\f[R] interpretation of your configuration and theme.
.RS
.PP
Please check the output for identifiable information and remove this.
.RE
.SH Timing traces
.PP
To get a timing trace, enable the \f[B]Timings\f[R] debug domain.
.IP
.nf
\f[C]
G_MESSAGES_DEBUG=Timings rofi -show drun
\f[R]
.fi
.PP
It will show a trace with (useful) timing information at relevant points
during the execution.
This will help debugging when rofi is slow to start.
.PP
Example trace:
.IP
.nf
\f[C]
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000000 (0.000000): Started
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000126 (0.000126): ../source/rofi.c:main:786
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000163 (0.000037): ../source/rofi.c:main:819
(process:14942): Timings-DEBUG: 13:47:39.336: 0.000219 (0.000056): ../source/rofi.c:main:826 Setup Locale
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001235 (0.001016): ../source/rofi.c:main:828 Collect MODI
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001264 (0.000029): ../source/rofi.c:main:830 Setup MODI
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001283 (0.000019): ../source/rofi.c:main:834 Setup mainloop
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001369 (0.000086): ../source/rofi.c:main:837 NK Bindings
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001512 (0.000143): ../source/xcb.c:display_setup:1177 Open Display
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001829 (0.000317): ../source/xcb.c:display_setup:1192 Setup XCB
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010650 (0.008821): ../source/rofi.c:main:844 Setup Display
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010715 (0.000065): ../source/rofi.c:main:848 Setup abe
(process:14942): Timings-DEBUG: 13:47:39.350: 0.015101 (0.004386): ../source/rofi.c:main:883 Load cmd config
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015275 (0.000174): ../source/rofi.c:main:907 Setup Modi
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015291 (0.000016): ../source/view.c:rofi_view_workers_initialize:1922 Setup Threadpool, start
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015349 (0.000058): ../source/view.c:rofi_view_workers_initialize:1945 Setup Threadpool, done
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032018 (0.016669): ../source/rofi.c:main:1000 Setup late Display
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032080 (0.000062): ../source/rofi.c:main:1003 Theme setup
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032109 (0.000029): ../source/rofi.c:startup:668 Startup
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032121 (0.000012): ../source/rofi.c:startup:677 Grab keyboard
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032214 (0.000093): ../source/view.c:__create_window:701 xcb create window
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032235 (0.000021): ../source/view.c:__create_window:705 xcb create gc
(process:14942): Timings-DEBUG: 13:47:39.368: 0.033136 (0.000901): ../source/view.c:__create_window:714 create cairo surface
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033286 (0.000150): ../source/view.c:__create_window:723 pango cairo font setup
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033351 (0.000065): ../source/view.c:__create_window:761 configure font
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045896 (0.012545): ../source/view.c:__create_window:769 textbox setup
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045944 (0.000048): ../source/view.c:__create_window:781 setup window attributes
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045955 (0.000011): ../source/view.c:__create_window:791 setup window fullscreen
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045966 (0.000011): ../source/view.c:__create_window:797 setup window name and class
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045974 (0.000008): ../source/view.c:__create_window:808 setup startup notification
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045981 (0.000007): ../source/view.c:__create_window:810 done
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045992 (0.000011): ../source/rofi.c:startup:679 Create Window
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045999 (0.000007): ../source/rofi.c:startup:681 Parse ABE
(process:14942): Timings-DEBUG: 13:47:39.381: 0.046113 (0.000114): ../source/rofi.c:startup:684 Config sanity check
(process:14942): Timings-DEBUG: 13:47:39.384: 0.048229 (0.002116): ../source/dialogs/run.c:get_apps:216 start
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054626 (0.006397): ../source/dialogs/run.c:get_apps:336 stop
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054781 (0.000155): ../source/dialogs/drun.c:get_apps:634 Get Desktop apps (start)
(process:14942): Timings-DEBUG: 13:47:39.391: 0.055264 (0.000483): ../source/dialogs/drun.c:get_apps:641 Get Desktop apps (user dir)
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082884 (0.027620): ../source/dialogs/drun.c:get_apps:659 Get Desktop apps (system dirs)
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082944 (0.000060): ../source/dialogs/drun.c:get_apps_history:597 Start drun history
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082977 (0.000033): ../source/dialogs/drun.c:get_apps_history:617 Stop drun history
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083638 (0.000661): ../source/dialogs/drun.c:get_apps:664 Sorting done.
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083685 (0.000047): ../source/view.c:rofi_view_create:1759
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083700 (0.000015): ../source/view.c:rofi_view_create:1783 Startup notification
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083711 (0.000011): ../source/view.c:rofi_view_create:1786 Get active monitor
(process:14942): Timings-DEBUG: 13:47:39.420: 0.084693 (0.000982): ../source/view.c:rofi_view_refilter:1028 Filter start
(process:14942): Timings-DEBUG: 13:47:39.421: 0.085992 (0.001299): ../source/view.c:rofi_view_refilter:1132 Filter done
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086090 (0.000098): ../source/view.c:rofi_view_update:982
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086123 (0.000033): ../source/view.c:rofi_view_update:1002 Background
(process:14942): Timings-DEBUG: 13:47:39.428: 0.092864 (0.006741): ../source/view.c:rofi_view_update:1008 widgets
\f[R]
.fi
.SH Debug domains
.PP
To further debug the plugin, you can get a trace with (lots of) debug
information.
This debug output can be enabled for multiple parts in rofi using the
glib debug framework.
Debug domains can be enabled by setting the G_MESSAGES_DEBUG environment
variable.
At the time of creation of this page, the following debug domains exist:
.IP \[bu] 2
all: Show debug information from all domains.
.IP \[bu] 2
X11Helper: The X11 Helper functions.
.IP \[bu] 2
View: The main window view functions.
.IP \[bu] 2
Widgets.Box: The Box widget.
.IP \[bu] 2
Modes.DMenu: The dmenu mode.
.IP \[bu] 2
Modes.Run: The run mode.
.IP \[bu] 2
Modes.DRun: The desktop file run mode.
.IP \[bu] 2
Modes.Window: The window mode.
.IP \[bu] 2
Modes.Script: The script mode.
.IP \[bu] 2
Modes.Combi: The script mode.
.IP \[bu] 2
Modes.Ssh: The ssh mode.
.IP \[bu] 2
Rofi: The main application.
.IP \[bu] 2
Timings: Get timing output.
.IP \[bu] 2
Theme: Theme engine debug output.
(warning lots of output).
.IP \[bu] 2
Widgets.Icon: The Icon widget.
.IP \[bu] 2
Widgets.Box: The box widget.
.IP \[bu] 2
Widgets.Container: The container widget.
.IP \[bu] 2
Widgets.Window: The window widget.
.IP \[bu] 2
Helpers.IconFetcher: Information about icon lookup.
.PP
For full list see \f[B]man rofi\f[R].
.PP
Example: \f[B]G_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun\f[R] To get
specific output from the Desktop file run dialog.
.PP
To redirect the debug output to a file (\f[B]\[ti]/rofi.log\f[R]) add:
.IP
.nf
\f[C]
rofi -show drun -log \[ti]/rofi.log
\f[R]
.fi
.PP
Specifying the logfile automatically enabled all log domains.
This can be useful when rofi is launched from a window manager.
.SH Creating a backtrace
.PP
First make sure you compile \f[B]rofi\f[R] with debug symbols:
.IP
.nf
\f[C]
make CFLAGS=\[dq]-O0 -g3\[dq] clean rofi
\f[R]
.fi
.PP
Getting a backtrace using GDB is not very handy.
Because if rofi get stuck, it grabs keyboard and mouse.
So if it crashes in GDB you are stuck.
The best way to go is to enable core file.
(ulimit -c unlimited in bash) then make rofi crash.
You can then load the core in GDB.
.IP
.nf
\f[C]
gdb rofi core
\f[R]
.fi
.PP
Then type inside gdb:
.IP
.nf
\f[C]
thread apply all bt
\f[R]
.fi
.PP
The output trace is useful when reporting crashes.
.PP
Some distribution have \f[B]systemd-coredump\f[R], this way you can
easily get a backtrace via \f[B]coredumpctl\f[R].
.SH SEE ALSO
.PP
rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5),
rofi-keys(5),rofi-theme-selector(1)
.SH AUTHOR
.IP \[bu] 2
Qball Cow <qball@blame.services>
|