Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot open display #574

Closed
jaumexb opened this issue Apr 17, 2020 · 17 comments
Closed

cannot open display #574

jaumexb opened this issue Apr 17, 2020 · 17 comments
Assignees
Labels
support Something isn't working with the users setup

Comments

@jaumexb
Copy link

jaumexb commented Apr 17, 2020

Describe the bug
I have done the installation using the script but when rebooting it does not open octodash, I have tried the wiki solutions and it gives me the following error.

Code

pi@octopi:~ $ octodash

(octodash:825): Gtk-WARNING **: 16:00:59.360: cannot open display:
pi@octopi:~ $ ratpoison
Can't open display

@jaumexb jaumexb added the bug Something isn't working label Apr 17, 2020
@floridaservices
Copy link

What kind of display are you trying to use?

@jaumexb
Copy link
Author

jaumexb commented Apr 17, 2020

What kind of display are you trying to use?

Generic 3.5" Screen

@floridaservices
Copy link

floridaservices commented Apr 17, 2020

What brand though, they are all different drivers and will act differently with OctoDash/X. Ex, A elecrow 3.5 I have would not work without additional work but a kedei 3.5 worked without issue. What i'm saying is this is most likely a video driver issue with X and not a problem with OctoDash itself.

@UnchartedBull
Copy link
Owner

Do you see anything in the screen? If you want to start OctoDash from the command line make sure to assign the display to your session first (export DISPLAY=:0), before running ratpoison. Or just run xinit if you‘ve set that up.

@UnchartedBull UnchartedBull added support Something isn't working with the users setup and removed bug Something isn't working labels Apr 17, 2020
@jaumexb
Copy link
Author

jaumexb commented Apr 17, 2020

What brand though, they are all different drivers and will act differently with OctoDash/X. Ex, A elecrow 3.5 I have would not work without additional work but a kedei 3.5 worked without issue. What i'm saying is this is most likely a video driver issue with X and not a problem with OctoDash itself.

Thank you very much I will try installing the driver that you have told me, I installed the one of waveshare

@jaumexb
Copy link
Author

jaumexb commented Apr 17, 2020

Do you see anything in the screen? If you want to start OctoDash from the command line make sure to assign the display to your session first (export DISPLAY=:0), before running ratpoison. Or just run xinit if you‘ve set that up.

Yes, I can see messages from the terminal that I do not understand, I think that with verifications since "OK" appears in several green lines. I have tried the commands that you have indicated and I have obtained the result that I show below. I apologize if I do not understand much and appreciate the help.

pi@octopi:~ $ xinit

/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
pi@octopi:~ $ export DISPLAY=:0
pi@octopi:~ $ ratpoison
Can't open display

@UnchartedBull
Copy link
Owner

Could you maybe try running the export DISPLAY=:0 before running xinit? If you have the chance you can also try entering xinit with a keyboard directly attached to the pi.

@kendoodle
Copy link

I had the same problem, even after running export DISPLAY=:0 and ratpoison on the pi directly. I would really like to have this working.

@UnchartedBull
Copy link
Owner

What happens if you run xinit directly on your Pi?

@philbeauchamp
Copy link

I am also getting this error. I was able to install Octoscreen successfully so I know the screen works. Created a second SD card from scratch to try this. Installed Octoprint. Updated Octoprint from inside the Web interface. Then I did an apt-get update and upgrade. Then I installed Octodash. I have it set to auto-login to console. Raspberry Pi 4 with an Osoyoo 5" touch screen.

I also get the same result as jaumexb in the above post.

@UnchartedBull
Copy link
Owner

UnchartedBull commented Apr 27, 2020

Could you maybe provide some more information regarding your setup (Raspbian Version / OctoPi / ...). I did some searching around and didn‘t find anything super useful. Maybe some things to try:

  • Double Check that B2 is selected for the Boot Options (had this happen a couple times to me that I forgot to safe or so, just to be sure :). Also make sure to reboot if you click Finish)
  • Run xinit as Root sudo xinit and see if the error changes or OctoDash works
  • Try reconfiguring X11: sudo dpkg-reconfigure x11-common and reboot to see if this fixes the problem
  • Allow every User to start XOrg. Can be done via the raspi-config command. More information here: https://bartsimons.me/raspberry-pi-kiosk-tutorial/

Most of the information is copied from the same tutorial. If all of the above doesn‘t work maybe you could try setting up Chromium like described in the tutorial, to see whether that is working. And please report back if and what of the above worked, so I can include this in the troubleshooting guide.

@jaumexb @kendoodle did one of you managed to fix this?

@philbeauchamp
Copy link

philbeauchamp commented Apr 28, 2020 via email

@philbeauchamp
Copy link

I was able to get around this issue by connecting a keyboard to the Pi and doing the following.

  1. sudo raspi-config. Change boot settings to go into Desktop (autologin) setting B4. Reboot.
  2. It rebooted into X server. From there I was able to use my touchscreen and keyboard to navigate to the Preferences menu and then Default applications for LXSession.
  3. In the Autostart tab, in the text box next to the "+Add", type "octodash" and then touch / click on the "+Add" button.
  4. Reboot and it goes right into Octodash.

@UnchartedBull
Copy link
Owner

https://unix.stackexchange.com/a/529945 here is how to manually add the anybody user to xorg. If you still want to try it, let me know if it works :)

@jaumexb
Copy link
Author

jaumexb commented Apr 29, 2020

I am very happy because at last I have made it work I will put how it served me in case it serves the partner.

On the one hand I have installed everything from scratch following these steps:

  1. sudo apt update && sudo apt upgrade, then run sudo apt install -f
  2. install drivers
  3. install octodash scrip
  4. configurate autologin and reboot
    5 Install deskop octoprint: sudo /home/pi/scripts/install-desktop
  5. reboot and works

Thanks for your help

@kekko7072
Copy link

Hey I have the same issue but I'm not able to solve it. I installed correctly the lcd touch screen using wifi by producer (https://www.waveshare.com/wiki/5inch_HDMI_LCD) infact if I use raspberry pi desktop it works but I have issue with the x server. At the boot it shows a black screen and then the error is FATAL: Module g2d_23 not found". or unable to find screen, then if I try to do it by ssh running octodash it says Illegal instruction. After I have installed the desktop version it not starts but the screen running raspberry desktop is working.

@kekko7072
Copy link

I'am using raspberry pi3 model b and lcd directly connected using HDMI and pin. the touch screen and lcd is correctly installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Something isn't working with the users setup
Projects
None yet
Development

No branches or pull requests

6 participants