"Unable to connect to X server"

Installed wfpiconsole onto a new RaspPi 4B running 32 bit. Install went good, but after I enter personal info for station, I get the error “Unable to connect to X server”.

[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffp                                                                                                 yplayer ignored)
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL version <b'3.1 Mesa 23.2.1-0+rpt2'>
[INFO   ] [GL          ] OpenGL vendor <b'Broadcom'>
[INFO   ] [GL          ] OpenGL renderer <b'V3D 4.2'>
[INFO   ] [GL          ] OpenGL parsed version: 3, 1
[INFO   ] [GL          ] Shading version <b'1.40'>
[INFO   ] [GL          ] Texture max size <4096>
[INFO   ] [GL          ] Texture max units <24>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Text        ] Provider: sdl2(['text_pango'] ignored)
[INFO   ] [GL          ] NPOT texture support is available
Unable to connect to X server
[INFO   ] [Base        ] Start application main loop
[INFO   ] [Websocket   ] 2023-10-31 20:31:48 - Opening connection
[INFO   ] [Websocket   ] 2023-10-31 20:31:48 - Connection open
[INFO   ] [Factory     ] 190 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffp                                                                                                 yplayer ignored)
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL version <b'3.1 Mesa 23.2.1-0+rpt2'>
[INFO   ] [GL          ] OpenGL vendor <b'Broadcom'>
[INFO   ] [GL          ] OpenGL renderer <b'V3D 4.2'>
[INFO   ] [GL          ] OpenGL parsed version: 3, 1
[INFO   ] [GL          ] Shading version <b'1.40'>
[INFO   ] [GL          ] Texture max size <4096>
[INFO   ] [GL          ] Texture max units <24>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Text        ] Provider: sdl2(['text_pango'] ignored)
[INFO   ] [GL          ] NPOT texture support is available
Unable to connect to X server
[INFO   ] [Base        ] Start application main loop
[INFO   ] [Websocket   ] 2023-10-31 20:31:48 - Opening connection
[INFO   ] [Websocket   ] 2023-10-31 20:31:48 - Connection open

Yes folks are periodically getting that failure with the newest raspios on pi4 due to os changes by the rasperrypi folks.

I did a lot of cycles testing 64bit on a pi4 reflashing and reinstalling and changing nothing and it went away for some reason and the last few flash/reinstall tests all worked. No clue why it failed multiple times nor worked multiple times after that.

Try going back to the legacy debian-11 version at Operating system images – Raspberry Pi with the May 3rd 2023 dates. It’ll take a little longer to install probably but should be more stable.

latest OS Bookworm ?

Yes, just looked it up, it is the Bookworm OS. I will have to play with it some more and probably try what Vince suggested, downgrade to the older OS from May.

1 Like

Yeah. Looks like it. May just need to reimage theSD card and start clean.

What is really strange about this error is how it doesn’t affect everyone. I have just installed 32 bit Bookworm onto my Pi 4, and I have no issues at all :thinking:

I had repeated failures doing reflash-reinstall tests and then it went away just as magically as it appeared. No explanation. Last four or five tries with 64bit it worked fine.

So the wfpiconsole will work under the 64 bit environment?

Always use the versions @peter recommends and supports. I’m helping him test his new stuff and how it works (or might not be quite there) for the new raspios. They did change a lot for pi4 users at the os level when they moved to debian12.

1 Like

I am at a loss what to try next. I tried using the May version that was recommended, flashed several times and also reflashed several times the current version and keep coming up with the same error of “Server X”. I have also tried using different SD cards and even a flash drive with same results.
Anyone have any other ideas on cause? Could this be a RaspPi hardware issue? like I said, brand new, just bought

The new os uses Wayland for the windowing subsystem on pi4 so that is a major difference. That said, at this point my available pi3+ (32bit) and pi4 (32bit and 64bit) both install and run ok with the 10-10-2023 new os.

I can not explain why I had the unable-to-connect problem for a few attempts on the pi4 previously because now it works every time I do the reflash/install tests.

I will try the 64 bit. Will be awhile before I can get to it again, will update when I do.

Thanks for your help

Well, I was able to get it to work with the 32 bit OS. I just had an odd feeling that the monitor I had the RaspPi connect to was causing this issue, so before I installed wfpiconsole, I disconnected to monitor, rebooted and used vnc to remote into it (probably would have worked with SSH also). I then did system updates and rebooted again, remoted in and installed wfpiconsole, rebooted, but this time I connected monitor back up to it and it is now working!
This is a fairly new monitor, 2020, LG. I am thinking that something with the Mini HDMI>HDMI>HDMI to monitor was somehow causing this issue.