×

INDI Library v1.9.3 Released (11 Nov 2021)

Bimonthly Stable INDI Library release introduces new drivers and fixes for existing ones. Some highlights:

Tutorial: How to make sure your headless device shows a desktop

  • Posts: 1941
  • Thank you received: 416
There have been several forum posts here talking about issues getting a device to run headless. In some cases the device is a Raspberry Pi, in other cases a NanoPi, Odroid or other system. I recently bought a Kodlix N34 mini pc and went through the configuration of the desktop again and got it working in one go. So I decided to write things down once and for all. Moderators, could this topic be made sticky so future users with problems can be referred to it?

Raspberry Pi and similar systems
Many peripheral items can be configured via the /boot/config.txt and the desktop size is one of them. In order to have a desktop with a certain size, even if no HDMI cable is connected, edit the file and make sure these three items are uncommented:
hdmi_force_hotplug=1  # Use HDMI mode even if no HDMI monitor is detected
hdmi_group=2  # the standard typically used by monitors
hdmi_mode=42  # this defines the resolution

This will set the desktop size to 1400x1050 at 60Hz which may not be what you want. For more info about these values, including which hdmi_modes are available, see www.raspberrypi.org/documentation/configuration/config-txt/

Other systems
For devices that don't have the /boot/config.txt file (which to my best of knowledge are all other devices including NanoPi M4 but please correct me if I am wrong) there are several options to configure a headless desktop. In my experience using an xorg.conf file works best and I would recommend anyone to use this. Simply put this in /etc/X11/xorg.conf
Section "Device"
        Identifier      "MyDevice"
        Driver          "armsoc"
        Option          "Debug"         "false"
        Option          "DPMS"          "false"
    Option      "NoFlip"    "false"
        Option          "NoHardwareMouse" "true"
    Option      "NoG2D"     "false"
EndSection
 
Section "ServerLayout"
        Identifier      "Default Layout"
        Option          "BlankTime"     "0"
        Option          "StandbyTime"   "0"
        Option          "SuspendTime"   "0"
        Option          "OffTime"       "0"
EndSection
 
Section "DRI"
        Mode            0666
EndSection
 
Section "Screen"
        Identifier      "Default Screen"
        Device          "Mali-Fbdev"
        DefaultDepth    24
        SubSection "Display"
                Virtual 1400 1050
        EndSubSection
EndSection

and reboot. Again, the desktop size is set to 1400x1050 at 60Hz. I found this xorg.conf file on the Odroid forums and it also works on my N34 so it is not restricted to arm based devices. You may need to experiment with the desktop size to find one that matches your needs.
Wouter van Reeven

ASI6200MM and 7 slot 2" filter wheel with a SkyWatcher Esprit 80 ED on a SkyWatcher HEQ5-Pro
ASI1600MM-Pro Cooled and 5 slot 1.25" filter wheel with an 8" TS Ritchey-Chrétien on a SkyWatcher EQ6-R
The following user(s) said Thank You: Eric, Brian, Ian Sullivan
3 years 1 month ago #30452

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

  • Posts: 262
  • Thank you received: 46
This is a fantastic guide! I agree it would be an excellent "sticky" post.

I'm trying to configure an Intel Compute Stick (4-core atom, 2 GB RAM) running ubuntu 18.04 for remote desktop access. There's no /boot/config.txt, so I used precisely your text from this post to create /etc/X11/xorg.config and rebooted.

Now I can connect via TeamViewer (though not yet through vnc), but I get a *tiny* screen (maybe 120x80 ?) which is certainly unusable. This is odd, because my laptop does a scaled 1440x900 display as a native mode.

Your post suggests experimenting with the desktop size. By that do you mean editing the line "Virtual 1400 1050" using other numbers for widthxheight? Are there other settings that have to be made in conjunction with that?

Could you point me to where you got this xorg.conf? I need to read up on the syntax and see what I'm doing wrong.

Thanks again!
Scott Denning
3 years 1 month ago #30938

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

  • Posts: 262
  • Thank you received: 46
@wvreeven After some experimentation, it seems to me that the xorg.conf file you posted is specific to your video driver "Mali-Fbdev" and so won't work on my built-in intel video.

I started with the FINAL answer by Stefan Lemmens in this thread .

That more general solution is to create "virtual" displays by editing the appropriate file in /usr/share/X11/xorg.conf.d/. For my intel graphics I needed the following in 20-intel.conf
Section "Device"
    Identifier "intelgpu0"
    Driver "intel"
    Option "VirtualHeads" "2"
EndSection

Then use cvt and xrandr to set up the parameters for the VIRTUAL display in a bash script that is set to run at system startup .

I learned a lot about the oddities of xrandr and its dependence on different video drivers by reading this thread , but I have to admit I'm still completely flailing my way around this stuff!

Hope this helps!
Scott
Last edit: 3 years 1 month ago by Scott Denning.
3 years 1 month ago #30939

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

  • Posts: 1067
  • Thank you received: 136
Not sure if I have got this correct as all this is new to me, but here goes...
I run an RPI with stellarmate installed, and connect to it from my laptop via a network cable, or via WiFi, and when I log onto the rpi using VNC in my web browser, I get the desktop up but it’s smaller than I would like and no way to enlarge to my native laptop screen size, so would this method work for that...??
If not any other ideas....
Thanks :)
Stellarmate OS on Raspberry pi4b
Skywatcher EQ8 pro, on steel pier
Takahashi FSQ85, FS60cb & Meade 8” SCT (de-forked)
Starlight Xpress SXVR H18, SXVR M25c, Lodestar x2 Guide Camera
Pegasus Ultimate Hub V2 for all USB & Power
Pegasus focus motors on all scopes
3 years 1 month ago #30962

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

  • Posts: 1941
  • Thank you received: 416
Scott, good to see that my tutorial helped you get started. The xorg.conf that I posted here was found on the Odroid wiki:

wiki.odroid.com/odroid-xu4/application_n...tware/headless_setup

You are right that you need to use an appropriate driver for your system. As a matter of fact, I use the same xorg.conf on an N34 mini pc and there the config file works so I assumed it would work everywhere. However, when I look at the Xorg logs (/var/log/Xorg.0.log) then I see that I shouldn't use the armsoc driver but the glamoregl instead on the N34. So it looks like indeed my tutorial needs some improvement!

Please have a look at the Xorg log file. Lines containing (EE) indicate an error and they should tell you why the resolution is so low.


Clear skies, Wouter
Wouter van Reeven

ASI6200MM and 7 slot 2" filter wheel with a SkyWatcher Esprit 80 ED on a SkyWatcher HEQ5-Pro
ASI1600MM-Pro Cooled and 5 slot 1.25" filter wheel with an 8" TS Ritchey-Chrétien on a SkyWatcher EQ6-R
3 years 1 month ago #30970

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

  • Posts: 1941
  • Thank you received: 416
@AstroNerd Can you do a

grep ^hdmi /boot/config.txt

and post the output here? It will help us determine if you have setup that file correctly or not.


Wouter
Wouter van Reeven

ASI6200MM and 7 slot 2" filter wheel with a SkyWatcher Esprit 80 ED on a SkyWatcher HEQ5-Pro
ASI1600MM-Pro Cooled and 5 slot 1.25" filter wheel with an 8" TS Ritchey-Chrétien on a SkyWatcher EQ6-R
3 years 1 month ago #30971

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

  • Posts: 407
  • Thank you received: 74
a simple get around ,until you find a final solution (if you want too ) is to use a "Dummy HDMI" plug then you dont have to modify any files if your system works when you plug in an HDMI display - assuming you have a HDMI port.

Note for RPI's users - you dont need this if you use REALVNC server even under Ubuntu Mate OS - REALVNC is fully licensed for Raspberry PI's and works flawlessly :-)
RPI3 Ubuntu 16.04 / AMD desktop Kstars under Ubuntu 16.04 Mounts :azeq6 ,SWAZGoTo

RPI3 Fedora testing out on AMD desktop Fedpra 28 - running kstars 2.9.4 , Indilib 1.7.4 ?????
3 years 1 month ago #30973

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

  • Posts: 1067
  • Thank you received: 136
I haven’t done anything to the file yet...just wondered if your technique would work for me and whether it’s worth even trying... :)
Stellarmate OS on Raspberry pi4b
Skywatcher EQ8 pro, on steel pier
Takahashi FSQ85, FS60cb & Meade 8” SCT (de-forked)
Starlight Xpress SXVR H18, SXVR M25c, Lodestar x2 Guide Camera
Pegasus Ultimate Hub V2 for all USB & Power
Pegasus focus motors on all scopes
3 years 1 month ago #30998

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

  • Posts: 1941
  • Thank you received: 416
Yes it works for you if you follow the steps in the Raspberry Pi and similar systems section.
Wouter van Reeven

ASI6200MM and 7 slot 2" filter wheel with a SkyWatcher Esprit 80 ED on a SkyWatcher HEQ5-Pro
ASI1600MM-Pro Cooled and 5 slot 1.25" filter wheel with an 8" TS Ritchey-Chrétien on a SkyWatcher EQ6-R
3 years 1 month ago #31015

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

  • Posts: 1
  • Thank you received: 0
For NanoPi M3 or other with Samsung S5P6818 Octa-Core Cortex-A53
Section "Device"
    Identifier          "Primary"
    Driver              "fbdev"
    Option              "fbdev" "/dev/fb0"
    Option "Debug" "false"
    Option "DPMS" "false" Option "NoFlip" "false"
    Option "NoHardwareMouse" "true"
    Option "NoG2D" "false"
    Option              "Rotate" ""
EndSection
 
Section "ServerLayout"
  Identifier "Default Layout"
  Option "BlankTime" "0"
  Option "StandbyTime" "0"
  Option "SuspendTime" "0"
  Option "OffTime" "0"
EndSection
 
Section "DRI"
  Mode 0666
EndSection
 
Section "Screen"
  Identifier "Default Screen"
  Device "Mali-Fbdev"
  DefaultDepth 24
  SubSection "Display"
    Virtual 1400 1050
  EndSubSection
  EndSectionSection "Monitor"
      Identifier          "Primary"
     VendorName          "FriendlyARM"
EndSection

 
4 months 1 week ago #73751

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

  • Posts: 19
  • Thank you received: 1
Hi Wouter,

I have an odroid N2 that I'm sure I had working when I tried this last time, but this time I reboot and I can neither connect via VNC nor do I get a login, just a flashin underscore.

The only difference between this time and last time is that I am not 100% sure sure I was following this instruction, though it is very likely I was using the odroid one, and the N2 was using Ubuntu 18.04.

Any tips to resolving beyond removing the xorg.conf file I created and buying an HDMI emulator dongle?

I can get in using Ctrl-Alt-F4, so can probably answer questions that can be got to from the cli, but I am very green with Linux so I'd probably need it spelled out if there is anything complex to do - the last time I was usign commands like ls and rm the century started with 19 and I was a lot slimmer...

UPDATE - I'm renaming xorg.conf for now so I can get back into gnome to carry on configuring things

All the best,

Ian
Last edit: 3 months 1 week ago by Ian Sullivan.
3 months 1 week ago #74734

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

  • Posts: 19
  • Thank you received: 1
ok, so depending on how you look at this it's either good news or bad news...

I renamed xorg.conf so I could carry on configuring the device, but out of sheer curiosity I unplugged the HDMI rebooted and tried to connect via VNC and it worked.

I think I potentially know why though, and digging back into the memory banks I seemed to remember from using tightvnc to support racked servers that it launched its own desktop rather than the one seen at the vga port on the kvm in the server room.

From what I read here it seems that the xorg.conf is only needed if using x11vnc as it expects to ride on an open desktop, whereas tigervnc (or indeed any vnc server) will launch its own desktop:

www.reddit.com/r/ODroid/comments/ak858t/...rk_off_boot_with_no/

The last post is the relevant one:"You want vncserver, not x11vnc. Vncserver will start a virtual desktop (headless xserver with desktop manager, not virtual machine).Here are some instructions:  www.digitalocean.com/community/tutorials...-vnc-on-ubuntu-18-04 "

Anyhow, all sorted, so now all I need to do is connect it to the scope, learn all of the necessary software, connect it to the relays controlling my roll-off roof,make a weather station to close the roof if it rains as its a remote-ish obsy, learn how to focus the scope and learn about astronomy.

So that's the next 10 years sorted...

Thanks for helping to wake my brain up Wouter, people like you are helping me keep sane in these very odd times.

Ian
The following user(s) said Thank You: Wouter van Reeven
Last edit: 3 months 1 week ago by Ian Sullivan.
3 months 1 week ago #74741

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

Time to create page: 0.570 seconds