XU4 / Cloudshell LCD Dual-head Questions

Post Reply
justsomeguy1983
Posts: 11
Joined: Mon May 12, 2014 8:39 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

XU4 / Cloudshell LCD Dual-head Questions

Post by justsomeguy1983 »

Hi I have an XU4 and a cloud shell on order.

I was curious as to whether I can use the HDMI output to a monitor running ubuntu w/mate, and also use the LCD to display system data at the same time?

I read a few posts in the XU4 thread that made it seem like you can only operate with one or the other.

However there is some cloudshell information on the wiki (http://odroid.com/dokuwiki/doku.php?id= ... l_lcd_xorg that leads me to believe that you can run the LCD and HDMI at the same time?

Has anybody tried this configuration?
Thanks!

mpm
Posts: 3
Joined: Thu Aug 20, 2015 7:54 am
languages_spoken: english
ODROIDs: Xu4
Has thanked: 0
Been thanked: 1 time
Contact:

Re: XU4 / Cloudshell LCD Questions

Post by mpm »

I've tried it. And it works. First you need to set up the lcd framebuffer driver:

Code: Select all

sudo -s
echo "options fbtft_device name=hktft9340 busnum=1 rotate=270" > /etc/modprobe.d/cloudshell.conf
echo "fbtft_device" >> /etc/modules
Then use the dual head xorg.conf. And reboot. That sets up two separate "screens" display :0.0 is the main HDMI screen :0.1 is the LCD screen.
So by issuing a command like:

Code: Select all

DISPLAY=:0.1 xterm &
You create an xterm on the lcd. You can issue a command like top and it will display on the lcd. Then switch back to the main screen you have both screens . You can get back to the lcd screen terminal with %1 as usual with background tasks.

Notes:

1. The dual head xorg file tries to use xinerama to make the two screens adjacent. It doesnt work because their bit depths are different. Having them separate is actually easier to work with.

2. kodi (xbmc) has problems dealing with the two screens. It determines that the main screen has a bit depth of 16 bits and refuses to start, which is a bug. So I had to revert to using the single screen xorg to use kodi. If I can fix that I'll go back to two screens. I've been trying to build a working kodi Isengard from sources but cant get it to start up. It has problems with egl and crashes.

3. The dual head xorg sets the vtswitch function off. I turned it back on because I like to be able to get to a terminal window if things go bad.
My dual head xorg looks like this:

Code: Select all

Section "Device"
        Identifier      "HDMIOUT"
        Driver          "armsoc"
        Option          "fbdev"         "/dev/fb0"
        Option          "Debug"         "false"
        Option          "DPMS"          "false"
EndSection

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

Section "Monitor"
        Identifier      "monitor0"
        Option          "Primary" "true"
EndSection

Section "Monitor"
        Identifier      "monitor1"
        Option          "RightOf"       "monitor0"
EndSection

Section "Screen"
        Identifier      "screen0"
        Monitor         "monitor0"
        Device          "HDMIOUT"
        DefaultDepth    24
EndSection

Section "Screen"
        Identifier      "screen1"
        Device          "FBTFT"
        Monitor         "monitor1"
        DefaultDepth    16
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        Option          "BlankTime"     "0"
        Option          "StandbyTime"   "0"
        Option          "SuspendTime"   "0"
        Option          "OffTime"       "0"
        Option          "AutoAddDevices" "on"
#        Option          "DontVTSwitch" "true"
#        Option          "Xinerame"      "on"
        Screen  0       "screen0"
        Screen  0       "screen1" RightOf "screen0"
EndSection

Section "DRI"
        Mode            0666
EndSection

I hope this helps you. Perhaps one of the odroid moderators will provide more info and correct my errors.
These users thanked the author mpm for the post:
zx64 (Fri Nov 01, 2019 7:40 am)

justsomeguy1983
Posts: 11
Joined: Mon May 12, 2014 8:39 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 / Cloudshell LCD Questions

Post by justsomeguy1983 »

Many thanks! I'll certainly be giving this a shot. Now I can't wait for my xu4 to show up.

How do you like the cloudshell? Do you have a hdd attached via the usb 3.0 adapter? What it's configuration difficult?

Thanks again!

phaseshifter
Posts: 3548
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 47 times
Been thanked: 46 times
Contact:

Re: XU4 / Cloudshell LCD Questions

Post by phaseshifter »

i have been trying to get it to work as well but my code exp is not very good..thanks i will try that..well done
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

mpm
Posts: 3
Joined: Thu Aug 20, 2015 7:54 am
languages_spoken: english
ODROIDs: Xu4
Has thanked: 0
Been thanked: 1 time
Contact:

Re: XU4 / Cloudshell LCD Dual-head Questions

Post by mpm »

I like the cloudshell case. I do have a 1TB laptop drive in it and it works very well. It shows up as /dev/sda without any problems. The disk performance is excellent. Great for media streaming. And the cpu and gpu performance is excellent for that application.

My only concern with that case is that it blocks the open USB 3.0 port (one is used for the cloudshell board, one is open). I've put a Bluetooth USB dongle on it, hoping to use it for a bt keyboard/mouse but its not working very well for me at the moment. And I'd like to use bluetooth speakers and/or headphones since there is no direct audio output on the XU4. In the USB3 port the range for the keyboard is less than a foot and the bluetooth a2dp isnt connecting at all. I updated to Bluez 5 but its still not working. Probably my problem as I screwed around with drivers and code versions. I'd be interested in hearing anyone's experience with BT audio on XU4. I've tried 3 dongles so far with the same disappointing results.

phaseshifter
Posts: 3548
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 47 times
Been thanked: 46 times
Contact:

Re: XU4 / Cloudshell LCD Dual-head Questions

Post by phaseshifter »

yes it does work on 15.04
after executing the display command as per your code..

however i have an issue now i have dual time date and the menu `s are doubled as well at the top of the gui
don't know if anybody else has experienced this issue.
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

User avatar
mrneilypops
Posts: 99
Joined: Thu Mar 12, 2015 6:29 am
languages_spoken: english
ODROIDs: XU3-lite,XU4,C2(x2),C4
Location: luxembourg
Has thanked: 1 time
Been thanked: 0
Contact:

Re: XU4 / Cloudshell LCD Dual-head Questions

Post by mrneilypops »

@phaseshifter
I had the same problem with dual menu entries and dual time on the Mate desktop when trying to set up dual display.
I did not find a solution till now...

Note:I did try editing the Mate panel to get the default layout restored but managed to completely lose the volume icon in the process :o
At that point I upgraded my eMMC to 64GB 8-) so did not (need to) investigate this problem further.
Dual display is on hold for me at the moment...

phaseshifter
Posts: 3548
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 47 times
Been thanked: 46 times
Contact:

XU4 Cloudshell LCD Dual-head fan speed issue

Post by phaseshifter »

i have set up the cloudshell using Ubuntu 15.04 as per rpm`s cloud shell sticky

now the fan constantly spins i dont think it is at maximum speed but you may say medium to high
this is with the back display when it is showing a gui or a heavy load on the lcd display..
i have it displaying TOP and it still continues to spin
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

Respectech
Posts: 279
Joined: Wed Nov 13, 2013 9:20 am
languages_spoken: English, German, some Ukrainian, some Spanish
ODROIDs: All the ODROIDs!!

Well, the ones released since the U2.
Location: California
Has thanked: 0
Been thanked: 1 time
Contact:

Re: XU4 / Cloudshell LCD Dual-head Questions

Post by Respectech »

I followed these instructions exactly using the latest Ubuntu Mate for the ODROID-XU4. I double-checked the contents and permissions of /etc/modprobe.d/cloudshell.conf and also the contents of /etc/modules and /etc/X11/xorg.conf. Everything looks correct.

When I try to run:

Code: Select all

odroid@odroid:~$ DISPLAY=:0.1 xterm &
[1] 1939
odroid@odroid:~$ xterm: Xt error: Can't open display: :0.1
Any ideas what I might be missing?

nphil
Posts: 6
Joined: Fri Feb 26, 2016 6:34 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 / Cloudshell LCD Dual-head Questions

Post by nphil »

Respectech wrote:I followed these instructions exactly using the latest Ubuntu Mate for the ODROID-XU4. I double-checked the contents and permissions of /etc/modprobe.d/cloudshell.conf and also the contents of /etc/modules and /etc/X11/xorg.conf. Everything looks correct.

When I try to run:

Code: Select all

odroid@odroid:~$ DISPLAY=:0.1 xterm &
[1] 1939
odroid@odroid:~$ xterm: Xt error: Can't open display: :0.1
Any ideas what I might be missing?

I'm having the same issue on the debian jessie (dietpi). Was meaning to setup dual-head with kodi, but I can see that it doesn't work. Such a pity, I'm thinking of just disconnecting the screen

Technicavolous
Posts: 66
Joined: Mon May 30, 2016 12:17 pm
languages_spoken: Southern US English
ODROIDs: :

XU4 -> CloudShell, BoomBonnet,
eMMC64/Ubuntu
eMMC16/Armbian

C2 -> VU7, HiFiShield2
SD/Ubuntu
eMMC16/Armbian

HC1 -> http://ww2.tech-party.us
SD/Ubuntu
SD/Armbian
.
Location: Howey In The Hills, FL
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: XU4 / Cloudshell LCD Questions

Post by Technicavolous »

Then use the dual head xorg.conf. And reboot.
How to do this part?
What box?

Snk
Posts: 275
Joined: Sun Jul 31, 2016 6:43 am
languages_spoken: Portuguese
ODROIDs: XU4 + eMMC 32GB + UART
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 / Cloudshell LCD Dual-head Questions

Post by Snk »

Has the problem with Kodi in dual head still been resolved with recent kernels and drivers?
I would like to use CloudShell 2 with Kodi and Chrome but I also wanted the LCD to display the information.

octix
Posts: 1
Joined: Thu Mar 01, 2018 4:07 pm
languages_spoken: english, german
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 / Cloudshell LCD Dual-head Questions

Post by octix »

Informations on LCD and Mate on HDMI.
I wanted to test the same but without success. Is there a solution or guide for that?

markephillips
Posts: 37
Joined: Fri Oct 26, 2018 11:39 am
languages_spoken: english
ODROIDs: xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 / Cloudshell LCD Dual-head Questions

Post by markephillips »

Hi, I was able to get some version of this working a month ago on the following configuration:

root@odroid:/etc/X11# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
root@odroid:/etc/X11# uname -a
Linux odroid 4.14.81-151 #1 SMP PREEMPT Thu Nov 15 06:10:52 -02 2018 armv7l armv7l armv7l GNU/Linux

But my SD card went bad and I didn't have a back-up :( anyway, I have been trying to figure out what I did and can't seem to get the dual head working with the below configuration - I remember there was another guide out there and it was only one display was active at a time - which was totally fine. One thing is different is that the LCD drive was updated. I was wondering if anyone had tried or successfully gotten a dual head configuration working with some different changes and that its updated for 2018? Some other websites that I found had useful and some permutations of information which I had magically used to get it working the last time.

Thanks in advance.

maki26
Posts: 36
Joined: Sat Jan 19, 2019 4:25 am
languages_spoken: english, polish
ODROIDs: XU4 + Cloudshell 2
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: XU4 / Cloudshell LCD Dual-head Questions

Post by maki26 »

I saw in 1st post question if cloudshell-lcd and HDMI can work at the same time. It can.
My one is working. Even I can watch videos by KODI.

I decreased refresh time to 10s of lcd but it's good on both screens. If somebody is interested just let me know.

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: XU4 / Cloudshell LCD Dual-head Questions

Post by odroid »

Great! Please share your configuration as detail as possible.
It is time to write an article about dual-head settings for our Magazine.
BTW, which OS image do you use?

maki26
Posts: 36
Joined: Sat Jan 19, 2019 4:25 am
languages_spoken: english, polish
ODROIDs: XU4 + Cloudshell 2
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: XU4 / Cloudshell LCD Dual-head Questions

Post by maki26 »

My solution to have cloudshell-lcd and HDMI output at the same time had been done by myself on XU4 (ubuntu 16.04 and 18.04 as well) original from hardkernel.
To be able to switch outputs we need to modify /media/boot/boot.ini file ( add fb_conn at the end of env line)

my line:

Code: Select all

setenv bootargs "${bootrootfs} ${videoconfig} ${hdmi_phy_control} ${hid_quirks} smsc95xx.macaddr=${macaddr} ${external_watchdog} fbcon=map:10 coherent_pool=1M"
after that install cloudshell-lcd scripts ( I'm using "Raid" option - to see status of my raid on screen)

If it's done we need to modify /bin/cloudshell-lcd file

My mod was:
- add variable of HDMI output
- disable console checkup on the begining
- change refreshment 1s -> 10s
- make all procedures ( what needs to be displayed)
- then just before data need to be send to dislpay use "chvt output_console"
- display all on screen
- then "chvt output_video" ( to change back screen to HDMI)
- that's all in the loop

When I'm watching wideo on TV I can see only short freeze of TV screen ( I gues 100-200ms) for data send to lcd. That's acceptable for me.

Maybe hardkernel will find better way or implement it basic script

My cloudshell-lcd:

Code: Select all

#!/bin/bash
# hardkernel CloudShell Screen update
#
# requires the following packages:
# curl sysstat figlet
# Steve's Mod - display disk usage of /dev/md? devices
#    -Read a raid status, and display on screen
#
#

############## Configuration

# Disable LCD Slepp mode
echo -e '\033[9;0]' > /dev/tty1

# console font
# More fonts on: /usr/share/consolefonts
export TERM="linux"
#export CONSOLE_FONT="Lat7-Fixed13"
#export CONSOLE_FONT="Lat7-Fixed18"
export CONSOLE_FONT="Lat15-Terminus12x6"
#export CONSOLE_FONT="Lat15-Terminus14"

# Output Console (ttyX)
export OUTPUT_CONSOLE="1"
export OUTPUT_VIDEO="7"

# Network Interface: enx001e06323348, wlan0, ....
export NETIF=eth0

# Screen refresh in seconds
export REFRESH="10"

# CPU Temperature in C or F
export TEMPERATURE_FORMAT="C"

# External IP Refresh counts
# The time to update the ip in counts is acquired by using the following formula
# seconds_to_refresh = EXT_IP_REFRESH * REFRESH
export EXT_IP_REFRESH="10"

# assign the script to cpu0
PID=$$
taskset -cp 1 $PID

get_external_ip() {
   export EXTERNAL_IP=$(/usr/bin/curl -s http://mdrjr.net/ip.php)
}

get_full_date() {
   export DATE=$(date +"%Y-%m-%d %H:%M:%S")
}

get_hostname() {
   export HOSTNAME=$(hostname)
}

get_os_distributor() {
   export OS_DISTRIBUTOR=$(lsb_release -i | awk '{ print $3 }')
}

get_internal_ip() {
   export INTERNAL_IP=$(hostname -I | cut -d ' ' -f 1)
}

get_ethernet_speed() {
   export SPEED_ETH0=$(cat /sys/class/net/eth*/speed)
}

get_net_tx_rx_realtime() {
   local net_txrx=($(sar -n DEV 1 1 | awk '$2 == "'$NETIF'" {printf "%.1f %.1f", $5/1024, $6/1024; exit;}'))
   export NET_TX=${net_txrx[0]}
   export NET_RX=${net_txrx[1]}
}

get_disk_mount_info() {
        SATA=($(sort -k 1 -t " " /proc/mounts | awk '(/^\/dev\/sd/) && (!a[$1]++) { printf "%s ", $1 }'))
}

get_disk_info() {
   local t=$(df -h)
   local iostat=$(iostat -y -m 1 1)

   for i in "${!SATA[@]}"
   do
      # escape / --> \/
      escaped_regex="${SATA[$i]//\//\\/}"
      #DISK_SIZE[$i]=$(echo "$t" | awk '/^'"$escaped_regex"'/ {print $2}')
      DISK_USED[$i]=$(echo "$t" | awk '/^'"$escaped_regex"'/ {print $3}')
      DISK_FREE[$i]=$(echo "$t" | awk '/^'"$escaped_regex"'/ {print $4}')
      DISK_USED_PCT[$i]=$(echo "$t" | awk '/^'"$escaped_regex"'/ {print $5}')

      local SAT=$(expr "${SATA[$i]#"/dev/"}" : '\([a-z]*\)')
      DISK_R[$i]=$(echo "$iostat" | awk '/^'"$SAT"'/ {print $3}')
      DISK_W[$i]=$(echo "$iostat" | awk '/^'"$SAT"'/ {print $4}')
   done
}

get_disk_temperature() {
   for i in "${!SATA[@]}"
   do
      # declare and assign variable seperately to avoid masking return value
      DISK_TEMP[$i]=" (IDLE)"
      if (( ${DISK_R[$i]%.*} > 0 )) || (( ${DISK_W[$i]%.*} > 0 ))
      then

         local t
         t=$(smartctl -a "${SATA[$i]}" -d sat | grep "Temp")
         if (( $? == 0 ))
         then
            local temp=$(echo $t | awk '{print $10}')
            DISK_TEMP[$i]="${CRED} Temp: $temp$TEMPERATURE_FORMAT"
         else
            DISK_TEMP[$i]=""
         fi
      fi
   done
}

get_memory_info() {
   # in Mbytes
   export MEM_AVAILABLE=$(awk '/^MemAvailable:/ {printf "%d", $2/1024}' /proc/meminfo)
   export MEM_TOTAL=$(awk '/^MemTotal:/ {printf "%d", $2/1024}' /proc/meminfo)
   export MEM_USED=$((MEM_TOTAL - MEM_AVAILABLE))
}

get_system_info() {
   export UBUNTU_VERSION=$(lsb_release -r | awk '{print $2}')
   export KERNEL_VERSION=$(uname -r | awk -F "-" '{print $1}')
}

get_cpu_usage() { 
   export CPU_USAGE=$(mpstat 1 1 | awk '/Average/ {printf "%.1f", 100-$12}')
}
 
get_cpu_clock() {
   speed_a7=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq)
   speed_a15=$(cat /sys/devices/system/cpu/cpu4/cpufreq/scaling_cur_freq)
   export SPEED_CPU_A7="$((speed_a7/1000))"
   export SPEED_CPU_A15="$((speed_a15/1000))"
}

get_cpu_temperature() {
   _t=$(($(</sys/class/thermal/thermal_zone0/temp) / 1000))
   if [ "$TEMPERATURE_FORMAT" = "C" ]; then
      export CPU_TEMP="$_t"C
   else
      _t1=$((_t * 9 / 5 + 32))
      export CPU_TEMP="$_t1"F
   fi
}

get_samba_connections() {
   if [ ! -f /usr/bin/smbstatus ]; then
      export SAMBA_CONNECTIONS=0
   else
      export SAMBA_CONNECTIONS=$(smbstatus -b | grep -c ipv)
   fi
}

get_nfs_connections() { 
   export NFS_CONNECTIONS=$(netstat -an | grep 2049 | grep -c ESTA)
}

get_process_count() { 
   export PROCESS_COUNT=$(ps xa | wc -l)
}

# local variables
ext_ip_refresh_c=0
COFF=$(tput sgr0)
CBRED=$(tput setab 1)
CBBLACK=$(tput setab 0)
CBLACK=$(tput setaf 0)
CGREEN=$(tput setaf 2)
CRED=$(tput setaf 1)
CBLUE=$(tput setaf 6)
CWHITE=$(tput setaf 7)

oc="/dev/tty$OUTPUT_CONSOLE"

# font setup
setfont $CONSOLE_FONT > $oc

## Ensure that we are in the right TTY
#chvt $OUTPUT_CONSOLE

# infinite loop
while true; do

#   # Ensure that we are in the right TTY
#   chvt $OUTPUT_CONSOLE

   # check if EXT_IP_REFRESH
   #if (( (ext_ip_refresh_c % EXT_IP_REFRESH) == 0 )); then
   #   get_external_ip
   #fi
   
   # increment $ext_ip_refresh_c
   #ext_ip_refresh_c=$((ext_ip_refresh_c+1))

   # get data
   get_internal_ip
   get_ethernet_speed
   get_hostname
   get_os_distributor
   get_disk_mount_info
   get_disk_info
   get_disk_temperature
   get_full_date
   get_net_tx_rx_realtime
   #get_memory_info
   get_system_info
   get_cpu_clock
   get_cpu_usage
   get_cpu_temperature
   #get_samba_connections
   #get_nfs_connections
   #get_process_count


# Ensure that we are in the right TTY
   chvt $OUTPUT_CONSOLE

  # clear the screen every loop
   # we only wipe the screen when we are ready to write data to it
   clear > $oc

   # format the data on screen
   echo -e "$CBLUE$HOSTNAME $COFF: $DATE" > $oc
   echo -e "$OS_DISTRIBUTOR $CGREEN$UBUNTU_VERSION$COFF       Kernel $CGREEN$KERNEL_VERSION$COFF" > $oc
   # line CPU Usage
   echo -e "CPU Usage: $CBLUE$CPU_USAGE%$COFF  CPU Temp: $CRED$CPU_TEMP$COFF" > $oc
   echo -e "A15 : $CBLUE$SPEED_CPU_A15 MHz$COFF   A7 : $CBLUE$SPEED_CPU_A7 MHz$COFF" > $oc
   # Line Memory
   #echo -e "Memory Free: $CBLUE$MEM_AVAILABLE MB$COFF   Used: $CBLUE$MEM_USED MB$COFF" > $oc
   # Line IP Addresses
   #echo -e "IP: $CBLUE$INTERNAL_IP$COFF Ext IP: $CBLUE$EXTERNAL_IP$COFF" > $oc
   echo -e "IP: $CBLUE$INTERNAL_IP$COFF @ $CBLUE$SPEED_ETH0 Mbps$COFF" > $oc
   # Line network usage
   #echo -e "TX: $CBLUE$NET_TX MB/s$COFF RX: $CBLUE$NET_RX MB/s$COFF" > $oc
   # Line Disk Space

   for i in "${!SATA[@]}"
   do
      echo "" > $oc
      echo -e "${SATA[$i]} ${DISK_TEMP[$i]}$COFF" > $oc
      echo -e "R/W $CBLUE${DISK_R[$i]}$COFF / $CBLUE${DISK_W[$i]}$COFF MB/s" > $oc
      echo -ne "Disk Used: $CBLUE${DISK_USED[$i]}$COFF ($CBLUE${DISK_USED_PCT[$i]}$COFF)  Free: $CBLUE${DISK_FREE[$i]}$COFF" > $oc
   done

   # Line Samba
   #echo -e "Samba Clients: $CBLUE$SAMBA_CONNECTIONS$COFF" > $oc
   # line NFS
   #echo -e "NFS Connections: $CBLUE$NFS_CONNECTIONS$COFF" > $oc
   # line Processes

#RAID STATUS
   if [ -f /var/log/RAID_STATUS4LCD ]; then
     RAID_STATUS4LCD=$(cat /var/log/RAID_STATUS4LCD)
     echo "" > $oc
     echo "" > $oc
     if [ "$RAID_STATUS4LCD" = "Normal" ]; then 
       echo "Raid Status:${CGREEN}" > $oc
       figlet "$RAID_STATUS4LCD" > $oc
       echo "${COFF}" > $oc
     elif [ "$RAID_STATUS4LCD" = "Rebuilding" ]; then
       echo "Raid Status:${CBLUE}" > $oc
       figlet "$RAID_STATUS4LCD" > $oc
       echo "${COFF}" > $oc
     else
##ALTERNATE PRINT OUT STYLE
###       printf "Raid Status:\n${CBRED}!!!!!!!!!!!!!!!!!!!!\n!!${COFF}%*s%*s${CBRED}!!\n!!!!!!!!!!!!!!!!!!!!${COFF}% 20s ${COFF} \r\n${COFF} " $(((${#RAID_STATUS4$
       echo "Raid Status:${CBRED}" > $oc
       figlet "$RAID_STATUS4LCD" > $oc
       echo "${COFF}" > $oc

# Ensure that we are in the right TTY
     fi
   fi

   chvt $OUTPUT_VIDEO
   # sleep
   sleep $REFRESH
done
Last edited by maki26 on Mon Jan 21, 2019 10:32 pm, edited 1 time in total.

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: XU4 / Cloudshell LCD Dual-head Questions

Post by odroid »

Thank you for sharing a nice script with very comprehensive explanation. :D

zx64
Posts: 4
Joined: Sun Aug 18, 2019 6:19 pm
languages_spoken: english
ODROIDs: C2, XU4Q, CS2, GO
Has thanked: 1 time
Been thanked: 0
Contact:

Re: XU4 / Cloudshell LCD Questions

Post by zx64 »

Thanks for sharing explanations and xorg.conf . Works fine on the Cloudshell2, I launch the cloudshell-lcd script in a terminal on DISPLAY=:0.1 and I can continue using X on the main screen

Code: Select all

DISPLAY=:0.1 urxvt -e bash -c "/usr/bin/cloudshell-lcd" &
just need to edit the script to remove any references to the output console
mpm wrote:
Thu Aug 20, 2015 8:13 am
I've tried it. And it works. First you need to set up the lcd framebuffer driver:

Code: Select all

sudo -s
echo "options fbtft_device name=hktft9340 busnum=1 rotate=270" > /etc/modprobe.d/cloudshell.conf
echo "fbtft_device" >> /etc/modules
Then use the dual head xorg.conf. And reboot. That sets up two separate "screens" display :0.0 is the main HDMI screen :0.1 is the LCD screen.
So by issuing a command like:

Code: Select all

DISPLAY=:0.1 xterm &
You create an xterm on the lcd. You can issue a command like top and it will display on the lcd. Then switch back to the main screen you have both screens . You can get back to the lcd screen terminal with %1 as usual with background tasks.

Notes:

1. The dual head xorg file tries to use xinerama to make the two screens adjacent. It doesnt work because their bit depths are different. Having them separate is actually easier to work with.

2. kodi (xbmc) has problems dealing with the two screens. It determines that the main screen has a bit depth of 16 bits and refuses to start, which is a bug. So I had to revert to using the single screen xorg to use kodi. If I can fix that I'll go back to two screens. I've been trying to build a working kodi Isengard from sources but cant get it to start up. It has problems with egl and crashes.

3. The dual head xorg sets the vtswitch function off. I turned it back on because I like to be able to get to a terminal window if things go bad.
My dual head xorg looks like this:

Code: Select all

Section "Device"
        Identifier      "HDMIOUT"
        Driver          "armsoc"
        Option          "fbdev"         "/dev/fb0"
        Option          "Debug"         "false"
        Option          "DPMS"          "false"
EndSection

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

Section "Monitor"
        Identifier      "monitor0"
        Option          "Primary" "true"
EndSection

Section "Monitor"
        Identifier      "monitor1"
        Option          "RightOf"       "monitor0"
EndSection

Section "Screen"
        Identifier      "screen0"
        Monitor         "monitor0"
        Device          "HDMIOUT"
        DefaultDepth    24
EndSection

Section "Screen"
        Identifier      "screen1"
        Device          "FBTFT"
        Monitor         "monitor1"
        DefaultDepth    16
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        Option          "BlankTime"     "0"
        Option          "StandbyTime"   "0"
        Option          "SuspendTime"   "0"
        Option          "OffTime"       "0"
        Option          "AutoAddDevices" "on"
#        Option          "DontVTSwitch" "true"
#        Option          "Xinerame"      "on"
        Screen  0       "screen0"
        Screen  0       "screen1" RightOf "screen0"
EndSection

Section "DRI"
        Mode            0666
EndSection

I hope this helps you. Perhaps one of the odroid moderators will provide more info and correct my errors.

Post Reply

Return to “CloudShell”

Who is online

Users browsing this forum: No registered users and 6 guests