0

I am using a rpi zero w with hdmi to a monitor, no SSH just using keyboard & mouse directly to the pi. Ive been having the pi boot up in terminal before starting gui recently and everything has worked fine until today when i went to do startx and got an error.

pi@raspberrypi:~ $ startx

X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: linux Raspbian
Current Operating System: Linux raspberrypi 5.15.32+ #1538 Thu Mar 31 19:37:58 BST 2022 armv61

...

(EE)
Fatal server error:
(EE) AddScreen/ScreenInit failed for driver 0
(EE)
(EE)
Please consult the The X.Org Foundation support at http://wiki.x.org for help.
(EE) Please also check the log file at "/home/pi/.local/share/xorg/Xorg.0.log" for additional information
(EE)(EE) Server terminated with error (1). Closing log file
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

Tried starting up a different way ie having thonny open up a file and got this error:

_tkinter.TclError: no display name and no $DISPLAY environment variable

to no surprise echo $DISPLAY returned an empty string. export DISPLAY=0.0 didn't fix the startup error though.

4
  • Did you update any software recently, or install anything new?
    – NomadMaker
    Jul 11 at 0:31
  • @NomadMaker nope didn't install or change anything it was working last night went to bed and wasn't working today. Changing raspi-config to have the pi boot up to desktop just shows blackscreen
    – Thayne
    Jul 11 at 0:38
  • anything in /home/pi/.local/share/xorg/Xorg.0.log? Jul 11 at 16:50
  • Welcome. export DISPLAY=0.0 should probably be =:0.0 or just =:0, but it doesn't matter if no X server is running (it does not directly refer to a physical screen), and simply trying to start a GUI app such as Thonny will not start X.. You say "Ive been having the pi boot up in terminal before starting gui recently". Do you mean you set the default target to multi-user, or do you mean the Pi started booting to a terminal for some unknown reason? If the latter, edit in the output from systemctl list-units --type target --state active.
    – goldilocks
    Jul 11 at 18:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.