Re: [i3] window assigned workspace and high cpu usage

2015-04-28 Thread Antonio-M. Corbi Bellot
Hi all again,

In order to add some more information about what happens when I start
emacs and I don't change to its assigned workspace, an 'strace -p `pidof
emacs`' repeats and repeats this kind of output:

---
--- SIGIO {si_signo=SIGIO, si_code=SI_KERNEL} ---
rt_sigreturn({mask=[]}) = 1
recvmsg(8, {msg_name(0)=NULL, 
msg_iov(1)=[{"\1\1\275\213\0\0\0\0\"\0\300\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(8, 0x7fff63453840, 0)   = -1 EAGAIN (Resource temporarily 
unavailable)
recvmsg(8, 0x7fff63453840, 0)   = -1 EAGAIN (Resource temporarily 
unavailable)
poll([{fd=8, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=8, 
revents=POLLOUT}])
writev(8, [{"+\1\1\0", 4}, {NULL, 0}, {"", 0}], 3) = 4
poll([{fd=8, events=POLLIN}], 1, 4294967295) = 1 ([{fd=8, revents=POLLIN}])
--- SIGIO {si_signo=SIGIO, si_code=SI_KERNEL} ---
rt_sigreturn({mask=[]}) = 1
recvmsg(8, {msg_name(0)=NULL, 
msg_iov(1)=[{"\1\1\276\213\0\0\0\0\"\0\300\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(8, 0x7fff63453870, 0)   = -1 EAGAIN (Resource temporarily 
unavailable)
recvmsg(8, 0x7fff63453870, 0)   = -1 EAGAIN (Resource temporarily 
unavailable)
recvmsg(8, 0x7fff634536c0, 0)   = -1 EAGAIN (Resource temporarily 
unavailable)
poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, 
{fd=11, events=POLLIN}], 4, 0) = 0 (Timeout)
recvmsg(8, 0x7fff634538c0, 0)   = -1 EAGAIN (Resource temporarily 
unavailable)
recvmsg(8, 0x7fff63453890, 0)   = -1 EAGAIN (Resource temporarily 
unavailable)
poll([{fd=8, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=8, 
revents=POLLOUT}])
writev(8, [{"+\1\1\0", 4}, {NULL, 0}, {"", 0}], 3) = 4
poll([{fd=8, events=POLLIN}], 1, 4294967295) = 1 ([{fd=8, revents=POLLIN}])
--

And the output of 'ls -l /proc/`pidof emacs`/fd/8' is:

/proc/`pidof emacs`/fd/8 -> socket:[119884]

For fd=5,11 it also says socket:[something] and fd=7 says
anon_inode:[eventfd]

Antonio

> El Tue, 28 Apr 2015 11:57:21 +0200
> Fabian Keil  escribio:
> 
> > I've observed similar behaviour as a result of the i3 config line:
> > 
> > | exec --no-startup-id i3-msg 'workspace 4; exec emacs; workspace 1'
> > 
> > My workaround is to drop the "workspace 1", otherwise emacs
> > busy-loops on fd 6 (socket /tmp/.X11-unix/X0) until I switch to its
> > workspace and wait for the window to be rendered.
> > 
> > I don't use chromium (not enough RAM to build it).
> > 
> > Fabian
> 
> Hi Fabian!
> 
> I think that this is the behaviour I've seen with emacs and chromium.
> Thank's for your response...at least I'm not alone 8-)
> 
> Antonio


Re: [i3] window assigned workspace and high cpu usage

2015-04-28 Thread Antonio-M. Corbi Bellot
El Tue, 28 Apr 2015 11:57:21 +0200
Fabian Keil  escribio:

> I've observed similar behaviour as a result of the i3 config line:
> 
> | exec --no-startup-id i3-msg 'workspace 4; exec emacs; workspace 1'
> 
> My workaround is to drop the "workspace 1", otherwise emacs busy-loops
> on fd 6 (socket /tmp/.X11-unix/X0) until I switch to its workspace
> and wait for the window to be rendered.
> 
> I don't use chromium (not enough RAM to build it).
> 
> Fabian

Hi Fabian!

I think that this is the behaviour I've seen with emacs and chromium.
Thank's for your response...at least I'm not alone 8-)

Antonio


Re: [i3] window assigned workspace and high cpu usage

2015-04-28 Thread Fabian Keil
"Antonio-M. Corbi Bellot"  wrote:

> I am currently using i3 version 4.10.2.
> 
> Since a few months I've been observing a strange behaviour in i3 when I
> assign a window from emacs or chromium to a specific workspace. The
> behaviour I'm describing here was also the same with i3 4.[7,8,9].x.
> 
> For example, I assign emacs to this key combination:
> 
> bindsym $mod+Shift+m  exec "emacs"
> 
> And the workspace assignment is this:
> 
> assign [class="Emacs"] 2
> 
> Assuming I'm working in workspace 1, when I press $mod+Shift+m (I don't
> change to ws 2 for the moment), emacs starts in workspace 2 but I see
> an increment in cpu usage being the main culprits emacs (approx. 60%
> cpu usage) and xorg (approx. 90% cpu usage). And this cpu usage is
> sustained...it doesn't slow down until I change to workspace 2 ($mod+2)
> and then I observe that emacs hasn't finished starting and in the very
> moment I've changed to workspace 2 it is like it resumes execution and
> it finishes starting normally. It is then that cpu usage from xorg and
> emacs slow down to their normal values.
> 
> I've also observed this behaviour with chromium, no other applications
> suffer from this 'strange' behaviour, i.e I use claws-mail in workspace
> 4 and it opens there without a glitch. Also I use glade (3.18.1) in
> this way, assigned to workspace 2, and it starts nicely.
> 
> I'm not sure if it is an emacs/chromium bug or an i3 bug or even a xorg
> bug, but I've observed it only with i3 and these applications.
> 
> Has anyone observed this?

I've observed similar behaviour as a result of the i3 config line:

| exec --no-startup-id i3-msg 'workspace 4; exec emacs; workspace 1'

My workaround is to drop the "workspace 1", otherwise emacs busy-loops
on fd 6 (socket /tmp/.X11-unix/X0) until I switch to its workspace
and wait for the window to be rendered.

I don't use chromium (not enough RAM to build it).

Fabian


pgp8n8SlR_iAF.pgp
Description: OpenPGP digital signature


Re: [i3] window assigned workspace and high cpu usage

2015-04-27 Thread Antonio-M. Corbi Bellot
El Mon, 27 Apr 2015 20:13:00 +0200
Michael Stapelberg  escribio:

> It could be that the application in question is busylooping until it
> receives the MapNotify event. Perhaps for_window [class="Emacs"] move
> to workspace 2, workspace 2, workspace back_and_forth works? (but it
> will flicker)
> 
> If so, file a bug upstream with the application(s) in question.

OK, tried this and it doesn't work neither.

In my custom .xsession, at the end I call i3 like this:

dbus-launch --exit-with-session i3

I will continue trying to discover what is happening here.

Thanks for your comments and help and also thanks to Michael for this
marvelous window manager.

Antonio.


Re: [i3] window assigned workspace and high cpu usage

2015-04-27 Thread antonio . corbi
As soon as I arrive home I'll try Michael's suggestion and see what happens.

I start i3 from my custom .xsession. I'll post it later as now I'm not on the 
computer.

Thanks for your help
Antonio

El 27/4/2015 20:53, Simon Nagl  escribió:
>
> I cannot reproduce this as well. 
>
> # i3 version 4.10.2 (2015-04-16, branch "4.10.2") ... 
> # Chromium 42.0.2311.90 
> # xorg-server 1.17.1-5 
>
> I used the config Antonio Corbi posted: 
>
> bindsym $mod+Shift+m  exec "chromium" 
> assign [class="Chromium"] 2 
>
> Chromium opens with normal CPU usage and the workspace changes to the 
> right color. After finished starting up CPU usage of chromium is as low 
> as starting it "normal". 
>
> Do you use i3 inside of a desktop enviroment? 
> Maby that could help to repoduce it and locate the error? 
>
>
> Simon 
>
>
> On 27.04.2015 19:52, Ingo Bürk wrote: 
> > I can't reproduce the CPU load with Google Chrome. 
> > However, it seems that if I wait a little before switching to the 
> > workspace, AdBlock dies. Makes me wonder if this is at all related. 
> > 
> > Do you have a log file? 
> > 
> > 
> > Ingo 
> > 
> > On 04/27/2015 07:48 PM, Antonio-M. Corbi Bellot wrote: 
> >> Hi all, 
> >> 
> >> I am currently using i3 version 4.10.2. 
> >> 
> >> Since a few months I've been observing a strange behaviour in i3 when I 
> >> assign a window from emacs or chromium to a specific workspace. The 
> >> behaviour I'm describing here was also the same with i3 4.[7,8,9].x. 
> >> 
> >> For example, I assign emacs to this key combination: 
> >> 
> >> bindsym $mod+Shift+m  exec "emacs" 
> >> 
> >> And the workspace assignment is this: 
> >> 
> >> assign [class="Emacs"] 2 
> >> 
> >> Assuming I'm working in workspace 1, when I press $mod+Shift+m (I don't 
> >> change to ws 2 for the moment), emacs starts in workspace 2 but I see 
> >> an increment in cpu usage being the main culprits emacs (approx. 60% 
> >> cpu usage) and xorg (approx. 90% cpu usage). And this cpu usage is 
> >> sustained...it doesn't slow down until I change to workspace 2 ($mod+2) 
> >> and then I observe that emacs hasn't finished starting and in the very 
> >> moment I've changed to workspace 2 it is like it resumes execution and 
> >> it finishes starting normally. It is then that cpu usage from xorg and 
> >> emacs slow down to their normal values. 
> >> 
> >> I've also observed this behaviour with chromium, no other applications 
> >> suffer from this 'strange' behaviour, i.e I use claws-mail in workspace 
> >> 4 and it opens there without a glitch. Also I use glade (3.18.1) in 
> >> this way, assigned to workspace 2, and it starts nicely. 
> >> 
> >> I'm not sure if it is an emacs/chromium bug or an i3 bug or even a xorg 
> >> bug, but I've observed it only with i3 and these applications. 
> >> 
> >> Has anyone observed this? 
> >> 
> >> Antonio Corbi. 
> > 
>
> -- 
> Simon Nagl 
>  
> Zieglerstraße 12 
> 8 Burgheim 
>
> mailto:simonn...@aim.com 
> Tel: 0179 403 87 61 
>
> OpenPG: A7C87E3D 


Re: [i3] window assigned workspace and high cpu usage

2015-04-27 Thread Simon Nagl
I cannot reproduce this as well.

# i3 version 4.10.2 (2015-04-16, branch "4.10.2") ...
# Chromium 42.0.2311.90
# xorg-server 1.17.1-5

I used the config Antonio Corbi posted:

bindsym $mod+Shift+m  exec "chromium"
assign [class="Chromium"] 2

Chromium opens with normal CPU usage and the workspace changes to the
right color. After finished starting up CPU usage of chromium is as low
as starting it "normal".

Do you use i3 inside of a desktop enviroment?
Maby that could help to repoduce it and locate the error?


Simon


On 27.04.2015 19:52, Ingo Bürk wrote:
> I can't reproduce the CPU load with Google Chrome.
> However, it seems that if I wait a little before switching to the
> workspace, AdBlock dies. Makes me wonder if this is at all related.
> 
> Do you have a log file?
> 
> 
> Ingo
> 
> On 04/27/2015 07:48 PM, Antonio-M. Corbi Bellot wrote:
>> Hi all,
>>
>> I am currently using i3 version 4.10.2.
>>
>> Since a few months I've been observing a strange behaviour in i3 when I
>> assign a window from emacs or chromium to a specific workspace. The
>> behaviour I'm describing here was also the same with i3 4.[7,8,9].x.
>>
>> For example, I assign emacs to this key combination:
>>
>> bindsym $mod+Shift+m  exec "emacs"
>>
>> And the workspace assignment is this:
>>
>> assign [class="Emacs"] 2
>>
>> Assuming I'm working in workspace 1, when I press $mod+Shift+m (I don't
>> change to ws 2 for the moment), emacs starts in workspace 2 but I see
>> an increment in cpu usage being the main culprits emacs (approx. 60%
>> cpu usage) and xorg (approx. 90% cpu usage). And this cpu usage is
>> sustained...it doesn't slow down until I change to workspace 2 ($mod+2)
>> and then I observe that emacs hasn't finished starting and in the very
>> moment I've changed to workspace 2 it is like it resumes execution and
>> it finishes starting normally. It is then that cpu usage from xorg and
>> emacs slow down to their normal values.
>>
>> I've also observed this behaviour with chromium, no other applications
>> suffer from this 'strange' behaviour, i.e I use claws-mail in workspace
>> 4 and it opens there without a glitch. Also I use glade (3.18.1) in
>> this way, assigned to workspace 2, and it starts nicely.
>>
>> I'm not sure if it is an emacs/chromium bug or an i3 bug or even a xorg
>> bug, but I've observed it only with i3 and these applications.
>>
>> Has anyone observed this?
>>
>> Antonio Corbi.
> 

-- 
Simon Nagl

Zieglerstraße 12
8 Burgheim

mailto:simonn...@aim.com
Tel: 0179 403 87 61

OpenPG: A7C87E3D


Re: [i3] window assigned workspace and high cpu usage

2015-04-27 Thread Michael Stapelberg
It could be that the application in question is busylooping until it
receives the MapNotify event. Perhaps for_window [class="Emacs"] move to
workspace 2, workspace 2, workspace back_and_forth works? (but it will
flicker)

If so, file a bug upstream with the application(s) in question.

On Mon, Apr 27, 2015 at 7:48 PM, Antonio-M. Corbi Bellot <
antonio.co...@ua.es> wrote:

> Hi all,
>
> I am currently using i3 version 4.10.2.
>
> Since a few months I've been observing a strange behaviour in i3 when I
> assign a window from emacs or chromium to a specific workspace. The
> behaviour I'm describing here was also the same with i3 4.[7,8,9].x.
>
> For example, I assign emacs to this key combination:
>
> bindsym $mod+Shift+m  exec "emacs"
>
> And the workspace assignment is this:
>
> assign [class="Emacs"] 2
>
> Assuming I'm working in workspace 1, when I press $mod+Shift+m (I don't
> change to ws 2 for the moment), emacs starts in workspace 2 but I see
> an increment in cpu usage being the main culprits emacs (approx. 60%
> cpu usage) and xorg (approx. 90% cpu usage). And this cpu usage is
> sustained...it doesn't slow down until I change to workspace 2 ($mod+2)
> and then I observe that emacs hasn't finished starting and in the very
> moment I've changed to workspace 2 it is like it resumes execution and
> it finishes starting normally. It is then that cpu usage from xorg and
> emacs slow down to their normal values.
>
> I've also observed this behaviour with chromium, no other applications
> suffer from this 'strange' behaviour, i.e I use claws-mail in workspace
> 4 and it opens there without a glitch. Also I use glade (3.18.1) in
> this way, assigned to workspace 2, and it starts nicely.
>
> I'm not sure if it is an emacs/chromium bug or an i3 bug or even a xorg
> bug, but I've observed it only with i3 and these applications.
>
> Has anyone observed this?
>
> Antonio Corbi.
>



-- 
Best regards,
Michael


Re: [i3] window assigned workspace and high cpu usage

2015-04-27 Thread Ingo Bürk
I can't reproduce the CPU load with Google Chrome.
However, it seems that if I wait a little before switching to the
workspace, AdBlock dies. Makes me wonder if this is at all related.

Do you have a log file?


Ingo

On 04/27/2015 07:48 PM, Antonio-M. Corbi Bellot wrote:
> Hi all,
>
> I am currently using i3 version 4.10.2.
>
> Since a few months I've been observing a strange behaviour in i3 when I
> assign a window from emacs or chromium to a specific workspace. The
> behaviour I'm describing here was also the same with i3 4.[7,8,9].x.
>
> For example, I assign emacs to this key combination:
>
> bindsym $mod+Shift+m  exec "emacs"
>
> And the workspace assignment is this:
>
> assign [class="Emacs"] 2
>
> Assuming I'm working in workspace 1, when I press $mod+Shift+m (I don't
> change to ws 2 for the moment), emacs starts in workspace 2 but I see
> an increment in cpu usage being the main culprits emacs (approx. 60%
> cpu usage) and xorg (approx. 90% cpu usage). And this cpu usage is
> sustained...it doesn't slow down until I change to workspace 2 ($mod+2)
> and then I observe that emacs hasn't finished starting and in the very
> moment I've changed to workspace 2 it is like it resumes execution and
> it finishes starting normally. It is then that cpu usage from xorg and
> emacs slow down to their normal values.
>
> I've also observed this behaviour with chromium, no other applications
> suffer from this 'strange' behaviour, i.e I use claws-mail in workspace
> 4 and it opens there without a glitch. Also I use glade (3.18.1) in
> this way, assigned to workspace 2, and it starts nicely.
>
> I'm not sure if it is an emacs/chromium bug or an i3 bug or even a xorg
> bug, but I've observed it only with i3 and these applications.
>
> Has anyone observed this?
>
> Antonio Corbi.