×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Headless Ubuntu on Raspberry Pi

  • Posts: 1222
  • Thank you received: 565
I'm trying to set up KStars with Ubuntu 20.04 Desktop 64-bit on my RPi with SSD. I got the OS running (haven't installed KStars yet).
I got VNC to work, but only if a monitor is plugged in when the system boots. Without the monitor, VNC doesn't work, and, of course, I want
to mount this headless on my telescope.

I worked around things with one of the fake monitor dongles , but I was hoping someone would know how to fix the problem with software. Is there a way to setup Ubuntu so that VNC can run headless, but accept VNC connections? I have no problems doing this with Raspberry Pi OS.

Thanks,
Hy
3 years 1 month ago #68256

Please Log in or Create an account to join the conversation.

  • Posts: 1957
  • Thank you received: 420
Hy,

You need to edit the user config file in the /boot directory and set the right hdmi parameters. After that you probably need to right click in the desktop when connected via VNC and set the resolution as well. Then it should always work when connecting via VNC. Search for Jo’s post on this forum from summer last year where this all is explained or send me an email.


Wouter
The following user(s) said Thank You: Hy Murveit
3 years 1 month ago #68257

Please Log in or Create an account to join the conversation.

  • Posts: 1067
  • Thank you received: 140

Yes this can be done very easily with just one line added to the config file, just add this at the bottom
hdmi_force_hotplug=1
The following user(s) said Thank You: Hy Murveit
3 years 1 month ago #68271

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 8
Hy,

I set my system up my X11 with a dummy monitor. I needed xf86-video-dummy installed (that's the ARM/Manjaro package, I think the Ubuntu package is xserver-xorg-video-dummy).
The following user(s) said Thank You: Hy Murveit
3 years 1 month ago #68272

Please Log in or Create an account to join the conversation.

  • Posts: 216
  • Thank you received: 41
Hello Hy,

Thanks for all the great work on the multistar internal guiding!!!
I have the same set up and as long as you can access initially with a monitor I would set up NoMachine in this situation. The web site gives all the instructions. Set up V8 version for Raspberry Pi on the Pi and make a note of the IP address of the Pi. It will start NoMachine at boot up thereafter. Then set up on the computer that you want to access the Pi from. Follow instructions . Provided both are accessing the same wifi network you should be able to create a connection icon on the computer that you want to view and control the Pi with allows easy connection. There are various options about how to view the remote desktop, choose whatever suits. I find using a static IP address on the Pi helps with this connection.

Good luck

Mike
The following user(s) said Thank You: Hy Murveit
Last edit: 3 years 1 month ago by Spartacus.
3 years 1 month ago #68274

Please Log in or Create an account to join the conversation.

  • Posts: 1067
  • Thank you received: 140

No need for any of that, see my post above....
3 years 1 month ago #68278

Please Log in or Create an account to join the conversation.

  • Posts: 1222
  • Thank you received: 565
Thanks to all. Sure enough, adding some magic to config.txt did the trick.
I used the incantation on Jo's post Wouter pointed to , where he suggested adding the following to the bottom of the config file (he said it was usercfg.txt, but as @astronerd points out, it is called config.txt) so that the screen resolution was reasonable as well.
framebuffer_width=1920
framebuffer_height=1080
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=82
I have to say, though, it seems a little more sluggish than Raspberry Pi OS (e.g. as if the gpu isn't connected right). I'll try and follow through to see if I can get everything running. Not awful, just a bit slower in graphics...

Hy
3 years 1 month ago #68285

Please Log in or Create an account to join the conversation.

  • Posts: 1067
  • Thank you received: 140

It is more sluggish, hence why AB and SM moved to Raspbian....there is no need for 64 but OS as all the software is still 32 bit...
3 years 1 month ago #68288

Please Log in or Create an account to join the conversation.

  • Posts: 269
  • Thank you received: 53
You might want to check out my thread on running Ubuntu without a desktop indilib.org/forum/general/8885-running-k...remote-computer.html
On my 1GB RPi3 its not blindlingly fast but it is usable.
3 years 1 month ago #68311

Please Log in or Create an account to join the conversation.

  • Posts: 1222
  • Thank you received: 565
I've been running the Ubuntu 20.10 for a couple weeks now on my 8Gb RPi 4 with SSD.
Bottom line is I'm very likely going to stick with it.

The good news:
  • The VNC connection seems a bit more reliable for Ubuntu--RaspberryPi OS  vnc seemed to freeze every now and then. This was usually fixable by disconnecting and re-connecting, but a bit annoying. Sometimes it took a bit more prodding to wake up. For my network, I'm using a pair of powerline adapters and wired ethernet.
  • Also, the graphics are much clearer. E.g. the  HFR numbers on the full-field focus image were never very readable--I always wondered why people didn't complain about it ;) With Ubuntu, they're perfectly readable. Same resolution, 1920x1080 on both. 
The bad news
  • The windowing responsiveness is worse (until yesterday, see below).
In fact, the responsiveness was much worse, until yesterday, and I wasn't sure what I was going to do (since I do like the reliability and picture quality). Doing some googling yesterday, I found some posts suggesting removing a desktop background, and going with a solid color background. I had this California Nebula pic as my background. I swapped it out for a solid black background, and, sure enough, responsiveness is now about what the RPi4 OS's responsiveness was (with the CA Neb background). That's not not blindingly fast by any means, but it's workable. I guess that somehow Ubuntu's x11vnc vnc-server is serving up more picture quality at the expense of latency, but I can't seem to find a control to trade it off a little--I tried the obvious quality user setting, set to Auto but tried medium and low, but that did nothing for me. 

I guess you could say that RPi OS can handle a background and Ubuntu can't so RPi OS is a bit quicker, and I'd agree with that.

Let me know if you have any further suggestions--I'm running the following to start VNC on Ubuntu:
/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth PASSWORD_FILE -rfbport 5900 -shared -display :0
and using the default VNC server for Raspberry Pi OS, not changing any parameters.
I'm using the same RealVNC VNC Viewer as my client on my Mac for both systems.
The VNC client estimates: "Line-speed estimate: 26121 kbits/s (RTT ~0ms)" which sounds fast to me.

Ken: Thanks for the suggestion, but at this point I'd prefer not to run xpra, but rather keep the Ubuntu windowing environment. 

Hy
 
3 years 1 month ago #68859

Please Log in or Create an account to join the conversation.

  • Posts: 300
  • Thank you received: 57
I run ubuntu 20.04 64-bit on my Pi4's for imaging, and I like it. Even seems to work just fine in 2 GB of RAM.

I find that remote desktop programs are noticeably more GUI-responsive than VNC. There are *many* to choose from , but I've settled on NoMachine . It's free, updated, robust,  has clients for all my OSs, and it's much faster than VNC. Formerly used TeamViewer, but the license nagging was too onerous.

Another GUI speed-up for ubuntu on Pi is to run the Mate desktop rather than the default ubuntu desktop. Between mate and NoMachine, I find ubuntu on the pi quite snappy, and the software support is much better than raspberry OS.
Last edit: 3 years 1 month ago by Scott Denning.
3 years 1 month ago #68860

Please Log in or Create an account to join the conversation.

  • Posts: 216
  • Thank you received: 41
I agree. I run Ubuntu Mate 20.1 with NoMachine as remote desktop on RPi4 8GB. I had a similar experience with Team Viewer. VNC works well in Raspian/Raspberrry Pi OS but I never found it worthwhile in Ubuntu due to connection issue and constant drop outs. No Machine is easy to set up and nearly always connects.

Mike
3 years 1 month ago #68864

Please Log in or Create an account to join the conversation.

Time to create page: 0.853 seconds