You are not logged in.

#1 2014-04-08 12:00:15

yemu
Member
Registered: 2013-12-21
Posts: 8

cannot connect to X server after resume from suspend

Hello,

i'm a happy user of arch and i3, one and only thing that is not working correctly is that sometimes after resume from sleep (closing the lid, and then opening) I am not able to start any programs. this happens about 50% of the time. when it happens i have to exit i3 and login again, and everything works ok then.

I'd be grateful for any suggestion how can I debug and solve this problem.

y

Last edited by yemu (2014-04-09 08:53:12)

Offline

#2 2014-04-09 07:49:50

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: cannot connect to X server after resume from suspend

yemu wrote:

Hello,

i'm a happy user of arch and i3, one and only thing that is not working correctly is that sometimes after resume from sleep (closing the lid, and then opening) I am not able to start any programs

Can you elaborate on that, i.e., how are you trying to start the programs. Using dmenu?

Do you leave any programs running before suspend, if yes, then do they run fine after resume?

Last edited by x33a (2014-04-09 07:50:26)

Offline

#3 2014-04-09 08:23:31

yemu
Member
Registered: 2013-12-21
Posts: 8

Re: cannot connect to X server after resume from suspend

Hi,

programs that were running before suspend work ok.
new programs don't start, doesn't matter if I start them from dmenu or terminal.
yesterday the problem happened when I had the terminal running so I was able to see what is the error. the problem is that the programs can't connect to xserver. I tried googling this and I found some info that it is probably due to the fact that xsocket is deleted, is not attached anymore, I'm not sure. Still I wasn't able to find any solution.
currently it seems like an X and arch problem not i3, so I changed the title of the thread.

y

Last edited by yemu (2014-04-09 08:24:31)

Offline

#4 2014-04-09 10:13:20

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: cannot connect to X server after resume from suspend

Can you post the full error message that is displayed when trying to launch the programs?

Also, when you face this problem, try launching i3 in a new Xserver and starting programs in that Xserver.

xinit /usr/bin/i3 -- :1

Offline

#5 2014-04-10 07:39:50

yemu
Member
Registered: 2013-12-21
Posts: 8

Re: cannot connect to X server after resume from suspend

the error was, after running xterm:

No protocol specified
xterm: Xt error: Can't open display: :0.0

after running scrot

No protocol specified
giblib error: Can't open X display. It *is* running, yeah?

after running firefox

(process:2559): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
No protocol specified
No protocol specified
Error: cannot open display: :0.0

but I think I was able to fix the problem.

when I was browsing the internet for solution, I stumbled upon an info about similar problem caused by the hostname set to localhost. I checked my system, and apparently I haven't set my host name during install, and it was still localhost, so I changed it. and after that I tried suspending several times, and the problem never occured. I'll test in upcoming days, and if it works I will change the thread title to [SOLVED].

Last edited by yemu (2014-04-10 07:40:47)

Offline

Board footer

Powered by FluxBB