Can't autoboot to desktop


#1

What is the problem?
After installing desktop and a browser, I reboot and get this error: bcm2835-aux-uart 3f215040.serial could not get... (cant read the rest) and it just freezes there.
What did you already try to solve it?
These instructions http://www.joemiketerranella.com/post/158553998358/octoprint4
Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...) raspberry pi 3, newest octoprint 0.14, cheap chinese 3.5 touch screen. works after drivers are installed.


7” Raspberry Pi touch screen help
#2

I had a bunch of trouble with my 3.5 inch touch screen, and found that Joe Mike Terranella's instructions were outdated and convoluted. I have since found a relatively quick and extremely easy method of getting those screens to work. don't be alarmed by the amount of instructions, the process should probably take 30 minutes max

start off with the latest octopi image from https://octoprint.org/download/ write that to your pi's micro sd card and make sure your pi's filesystem is expanded using sudo raspi-config

next i used the following commands to install a GUI:


apt install lxde lxde-core lxterminal lxappearance

apt install lightdm

apt install xinit

apt install raspberrypi-ui-mods

These might take a while to download.

After that's done, install the touch screen driver from: http://www.waveshare.com/w/upload/0/00/LCD-show-170703.tar.gz

copy that file to your pi, and install it with:

tar xvf LCD-show-*.tar.gz
cd LCD-show/
chmod +x LCD35-show
./LCD35-show

After that install TouchUI from the Octoprint plugin manager, and make it autoboot using the script by BillyBlaze:

sudo apt-get install --no-install-recommends xinit xinput xserver-xorg xserver-xorg-video-fbdev x11-xserver-utils matchbox unclutter chromium-browser

Register your touchscreen to X11 by creating a new config:

sudo nano /usr/share/X11/xorg.conf.d/99-fbdev.conf

and pasting in the following:

Section "Device"
  Identifier "touchscreen"
  Driver "fbdev"
  Option "fbdev" "/dev/fb1"
EndSection

save that and then run

sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config

(Ignore this step if it fails)

Then run:

git clone https://github.com/BillyBlaze/OctoPrint-TouchUI-autostart.git ~/TouchUI-autostart/		
sudo cp ~/TouchUI-autostart/touchui.init /etc/init.d/touchui
sudo chmod +x /etc/init.d/touchui
sudo cp ~/TouchUI-autostart/touchui.default /etc/default/touchui
sudo update-rc.d touchui defaults

Test if your kernel can run Chromium by running the following command:

chromium-browser

The errors below are ok, so if you see these you can ignore them:

/usr/bin/chromium-browser: line 138: lsb_release: command not found 
/usr/bin/chromium-browser: line 139: lsb_release: command not found
bootstrap_helper: /usr/lib/chromium-browser/nacl_helper: Cannot open ELF file!  errno=2
[1:1:0605/122948.230046:ERROR:nacl_fork_delegate_linux.cc(315)] Bad NaCl helper startup ack (0 bytes)
[3904:3904:0605/122948.236249:ERROR:browser_main_loop.cc(495)] Failed to put Xlib into threaded mode.
[3904:3904:0605/122948.244840:ERROR:browser_main_loop.cc(272)] Gtk: cannot open display:

If you get the following error:

/usr/lib/chromium-browser/chromium-browser: symbol lookup error: /usr/lib/chromium-browser/chromium-browser: undefined symbol: mmal_vc_init_fd

you need to upgrade your kernel to the latest version by running:

sudo apt-get upgrade
sudo apt-get install rpi-update
sudo rpi-update
sudo reboot

After all that your pi will autoboot to touchui on your 3,5 in touch screen. if your pi boots to the desktop, make sure your pi is set to boot to "Console Autologin"

you may need to calibrate your touchscreen or change its orientation. to do this, follow the instructions at the waveshare 3.5inch RPi LCD (A) wiki.
Just be aware that the file: "99-calibration.conf" will probably be located at
/usr/share/X11/xorg.conf.d/99-calibration.conf
NOT at
/etc/X11/xorg.conf.d/99-calibration.conf

I hope This helps you, or at least helps others with touch screen issues.


#3

Nice instructions, @dprossner. A couple of comments for you:

It is no longer necessary to expand the file system using Raspi-config. The OctoPi 0.14 image does that automatically upon first boot.

There is a script included with OctoPi 0.14 to automatically install the desktop. The instructions for this show up when you log in via SSH or from a keyboard and screen attached to the Pi. It amounts to just entering the following command:
sudo /home/pi/scripts/install-desktop
The install script also asks you if you would like to start the desktop automatically on boot.
Is this install script doing something different from what you suggest above?


#4

Thanks for the replies guys, I'll give it a shot. John, when I try installing desktop using the script (even after my LCD is working) It appears to start to load up, then I get a blinking dash in the upper left corner and nothing ever boots up.


#5

You don't need to do that, OctoPi does it automatically on first boot.


#6

I tried several times to use the "sudo /home/pi/scripts/install-desktop" command with different preparations (e.g. LCD-Display installed or not / Updated or not). After completion nothing happens. The Desktop environment doesn´t start. If i try to set "boot to desktop" in "raspi-config" an error appears that lightdm is not installed. Something is wrong with the "install-destop" skript.
Now i will try it manually....
Edit:
Sorry. Possibly it is an network problem. With an external wlan stick; It works.


#7

I've just done this over the last five days and it's kind of a pain, to be honest.

  • sudo raspi-config has a Boot option which you can set to boot to the Desktop and to auto-login
  • Looks like as of Raspbian Stretch, the original touchscreen calibration no longer seems to work as expected: DISPLAY=:0 xinput_calibrator with the advice being to now use https://github.com/KurtJacobson/xtcal but I couldn't get the input resolution correct when prompted
  • I've got the screen working (to include under remote control via VNC as well as adjusting the Termit program's default size) however the touchscreen isn't happy; the orientation is either X/Y swapped or it's rotated. I have reasonably tried every possible combination of settings for this and I'm considering just using a Bluetooth mouse which seems much easier, to be honest.
  • The /etc/modules file lists the names of kernel modules which need to be brought up at boot for what it's worth.
  • This post suggests that the clk message can be ignored.