Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
i3: status bar woes [SOLV... WORKED AROUND IT]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
krisse
Guru
Guru


Joined: 15 Mar 2005
Posts: 324
Location: Sweden

PostPosted: Sat Dec 03, 2016 10:06 pm    Post subject: i3: status bar woes [SOLV... WORKED AROUND IT] Reply with quote

Recently, i3 has been unable to bring up status bar by itself.

I've tried with clean config, too; no difference. With clean i3status configs; no difference. I tried with i3blocks; no difference.

Regardless of how I try to start bar from within i3, if with a status_command or a status_command exec or an command/exec to a script that runs i3bar --- I get nothing. Even tried having an exec to script; nothing. I tried to add a bindsym to i3bar, and/or to the script running it --- no go.

But if I run the script (containing 'i3bar --bar_id=bar-0') through either dmenu or bash --- it works!

So bar seems to be setup correctly in i3 config and i3settings config (or the script above wouldn't work). But i3 is unable to run it.

From the wm's session log, I get this (when running the bindsym for script calling i3bar):
Code:
(libev) epoll_wait: Invalid argument
[libi3] ../../i3-4.13/libi3/font.c Using Pango font DejaVu Sans Mono, size 8
[libi3] ../../i3-4.13/libi3/font.c X11 root window dictates 96.094581 DPI
/home/krisse/bin/scripts/i3-mystatus.sh: rad 3:  4799 Avbruten (SIGABRT)      i3bar --bar_id=bar-0
Exiting due to signal.

Problems started with stable i3 (4.10.4) / i3status (2.7). I tried upgrading to i3 4.13-r1 and i3status 2.10-r1, but no difference there.

Tried asking for help on the i3 IRC channel (and they were helpful indeed), but still unable to figure this one out...

Given the output from running through bindsym, it i3bar seems to SIGABRT when run through i3, but not when run through bash or dmenu. What could cause this!?


Last edited by krisse on Tue Dec 06, 2016 10:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun Dec 04, 2016 6:07 am    Post subject: Re: i3: status bar woes Reply with quote

krisse wrote:
Code:
/home/krisse/bin/scripts/i3-mystatus.sh: rad 3:  4799 Avbruten (SIGABRT)      i3bar --bar_id=bar-0
Exiting due to signal.

krisse ... I would suspect the content of that script. Why are you not calling via 'bar' in ~/.i3/config? eg:

~/.i3/config:
bar {
    output            LVDS1
    status_command    i3status -c ~/.i3/i3status.conf
    position          bottom
    modifier          Mod4
    workspace_buttons yes
    tray_output       none
}

If you are, and that is what you mean by "from within i3", then check ~/.i3/config for open/closing braces, and/or other typos. I am using the exact same versions of both i3 and i3status without issue so I would expect your script, or some configuration typo, to be at issue.

HTH & best ... khay
Back to top
View user's profile Send private message
krisse
Guru
Guru


Joined: 15 Mar 2005
Posts: 324
Location: Sweden

PostPosted: Sun Dec 04, 2016 7:49 am    Post subject: Reply with quote

Thank you for taking the time to reply khayyam. I understand that you'd expect my script, or some configuration typo, to be at issue. This does not seem to be the case.

As I wrote earlier, I have tried with clean configs. That is, I have replaced my customized config files with the ones found in /etc ; I have tried with no config files in place at all. Still the same result.

Here's a pastebin of i3 starting up with configs (both for i3 and i3status) from /etc: http://pastebin.com/eGbsXbqU

Now, note lines 903 to 928. Status bar is initiated --- but is disconnected. The result as seen on the display / from the users perspective. Nothing. No status bar.

Later (lines 1856 and forward) I start the status bar through dmenu; running my script containing the following:
Code:
i3bar --bar_id=bar-0
The status bar is shown.

At the moment, I'm unable to bring up the bar in any other way than through dmenu or terminal.
Back to top
View user's profile Send private message
krisse
Guru
Guru


Joined: 15 Mar 2005
Posts: 324
Location: Sweden

PostPosted: Sun Dec 04, 2016 7:59 am    Post subject: Reply with quote

I find it very odd that running the script through terminal / dmenu succeeds (ie. bar is shown), but running the script directly through i3 fails (ie. bar is not shown).
  • Having a bar configured fails (ie. bar is not shown).
  • If start the bar through including the script as a startup command (exec MYSCRIPT) it fails.
  • If I start the bar with the script through bindsym; it fails.
  • But running the script through dmenu/terminal works. 8O

The fact that the script works, kind of shows that config is OK --- because the command `i3bar --bar_id=bar-0`tells i3 to start configured bar.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Dec 06, 2016 5:18 am    Post subject: Reply with quote

krisse ...

honestly, from your description I can't really tell what it is your doing. If you have the default config with 'bar { status_command i3status }' no bar is provided? From the above log I can see 'dmenu_run', and that isn't enabled in the default config (so I suspect it isn't a "clean" config that is used).

When you are calling the script via bash, or dmenu, that probably provides a controling terminal, when using 'exec' you effectively negate that. 'man i3bar' warns against calling i3bar via anything other than a "bar configuration block", I expect because it then sets up i3 to control it, in your case you may have instances of i3bar not under i3's control, and so not killed, and possibly leaving instances that then cause issues for i3 on initialisation.

I'm still fairly sure the problem is with how you are doing things, and not with i3/i3status, please try with a default config, making sure no i3 processes are runing and no ipc-socket is active.

best ... khay
Back to top
View user's profile Send private message
krisse
Guru
Guru


Joined: 15 Mar 2005
Posts: 324
Location: Sweden

PostPosted: Tue Dec 06, 2016 7:46 pm    Post subject: Reply with quote

Again, thank you for reading and replying, khayyam!
Quote:
honestly, from your description I can't really tell what it is your doing. If you have the default config with 'bar { status_command i3status }' no bar is provided?

Correct.
Quote:
From the above log I can see 'dmenu_run', and that isn't enabled in the default config (so I suspect it isn't a "clean" config that is used).

I copied the config from /etc. Had to use other keyboard shortcuts than I would normally use etc.
Quote:
When you are calling the script via bash, or dmenu, that probably provides a controling terminal, when using 'exec' you effectively negate that. 'man i3bar' warns against calling i3bar via anything other than a "bar configuration block"

I've tried that. It doesn't work.
Quote:
in your case you may have instances of i3bar not under i3's control, and so not killed, and possibly leaving instances that then cause issues for i3 on initialisation.

No. I've checked. No other instances running. It seems to me it's executed, but terminates (see post above, SIGABRT).
Quote:
I'm still fairly sure the problem is with how you are doing things, and not with i3/i3status, please try with a default config, making sure no i3 processes are runing and no ipc-socket is active.

I have. I have tried with no config at all. I have tried with the config from /etc. I have tried with sample configs from the web, both i3 documentation and others. It's something else. I guess I'll just have to prove that first, so we can move on. Stay tuned.
Back to top
View user's profile Send private message
krisse
Guru
Guru


Joined: 15 Mar 2005
Posts: 324
Location: Sweden

PostPosted: Tue Dec 06, 2016 8:09 pm    Post subject: Reply with quote

Alright, so I moved away .config/i3 elsewhere, created .config/i3 and copied in /etc/i3/config and /etc/i3status.conf to .config/i3 .

I doublechecked no other processes were running, prior to starting i3 in debug mode:
Code:
  PID TTY          TIME CMD
 7151 tty2     00:00:00 bash
 7482 tty2     00:00:00 ps

I started i3 --- no bar was shown. Though there is a bar configured (see lines 166ff in config).

See also i3 log lines 891ff, where a bar is started and disconnected (line 928).

I then start dmenu (see config line 44 and log, line 1791), to run the aforementioned script (containing `i3bar --bar_id=bar-0`). Bar config is found, and executed (log, lines 2037 and forward). And, most importantly, a status bar is actually shown!

Note that this status bar is very different from the one I'd normally get --- because this one is created through the i3status found in /etc; not my normal one. (Not attaching screenshots, hope you take my word for it. :wink:)

If the above doesn't satisfy you, and you still want to pursue "the problem is in my configuration", how about you providing me with a i3 config and a i3status config? I'll start up i3 with those. (As the config is included in the log dump, you can verify it is indeed the right configs.) And then either you can say you've been right all along, or we might consider what else might be causing this.
Back to top
View user's profile Send private message
krisse
Guru
Guru


Joined: 15 Mar 2005
Posts: 324
Location: Sweden

PostPosted: Tue Dec 06, 2016 10:08 pm    Post subject: Reply with quote

It was the login manager!

Helpful person at i3:s mailing list found this bug report @ i3. It concerned lightdm, but evidently entrance is affected as well. Switched to sddm and everything works.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum