Alternate SBC Development - bobbybudnick/SFS-Mobile-Internet-Device GitHub Wiki

This chart gauges the trajectory of the project

Prioritized MID ideals
Speed
Reliability
Size
Battery life
Ease of building

Deprioritized MID ideals
Cost
Software compatibility

Early MID - Model 1
Speed - not met
Reliability - not met
Size - not met
Battery life - not met
Ease of building - not met

Contemporary MID - Model Zero
Speed - not met
Reliability - met
Size - met
Battery life - met
Ease of building - not met

Later MID - Model 28/29/32
Speed - met
Reliability - not met
Size - not met
Battery life - met
Ease of building - not met

Then Current MID - Model 38
Speed - met
Reliability - met
Size - met
Battery life - met
Ease of building - met

Now Current MID - Model 44 - not a regression - software compatibility has been reprioritized
Speed - met
Reliability - met
Size - met
Battery life - not met - battery life is still limited particularly when in use
Ease of building - not met - the usb wiring methods are considered not easy

Phase 1

Hardware revisions of the Raspberry Pi have stagnated compared to competitors. In addition, there were a number of additional problems related to the interaction between the Pi and accessories:

failures include:
mystery linux restarts
mystery xorg restarts
cellular device Huawei 308 overheating/power draw/unreliability
cellular device Huawei 303 unreliability
SPI touch failure
poor battery life
overheating with Pi 3


A number of competitors were evaluated:

Libre Board AML-S905X-CC (tested)
no debian jessie images available
no vesa resolution support for 800x480

wand pi (upcoming)
previous boards supported freebsd

nano pi 2 - out of production

nano pi s2 - in production/china post shipping

The Odroid series of SBC boards were chosen based on many factors as will hopefully be evidenced in the notes here.


What tricks do smartphone manufacturers use to save battery life?
One trick is to switch to using wifi instead of cellular because a wifi radio can use 10x less power. I prefer not to use wifi at all so will not be using this approach. Another trick is to put the phone CPU into a special sleep mode that wakes up when signaled by an incoming call from the baseband processor. This is not possible to do with a USB cellular device because it requires the host CPU to be running at all times. This means that, for the same size and type of device, our battery must be larger. If an Iphone running data all day lasts 12 hours then our device at 1.2A will need over a 12000mah battery which is quite impractical. The only solution is to keep a charger close or optimize for power.


Odroid general tips

7z fails with ark creating corrupt 192mb images
use xz on file directly instead

screen rotation - old method - no acceleration
Modified /etc/X11/xorg.conf file.
In Section "Device"...
Replac: Driver "armsoc" with Driver "fbdev"
Comment out: Option "fbdev" "/dev/fb0"
and add: Option "Rotate" "CW"

screen rotation - new method - acceleration
Section "Device"
Identifier "Mali FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb0"
Option "Rotate" "CCW"
Option "SwapbuffersWait" "true"
EndSection

2 ADC input ports on the 40-pin header:
ADC.AIN0 : Pin #40
ADC.AIN1 : Pin #37
Access the ADC inputs via sysfs nodes:
/sys/class/saradc/ch0
/sys/class/saradc/ch1
1.8 volt max with 0-1023 steps

adafruit max98357 > odroid i2s
LRC > I2S_LRCLK
BCLK > I2S_SCLK
DIN > I2S_DATA_OUTPUT


Odroid C0 tips

power usage is near zero after shutdown
compare to pi which uses 200ma or more after shutdown

removing odroid_hdmi driver in boot.ini does not work
so .asoundrc must make the i2s device the primary device

large software support with odroid c1 images
could be used for thinnest possible 5" design
unsoldered USB for more flexibility
battery connector with 2a charging
onboard adc tied into battery connector
built in power switch
full size hdmi so no adapters needed
smaller than pi 2/3
no ethernet to save power
i2s for audio
one USB for hub with mic/cellular/open port
one USB for screen

GTK_FIX - red herring - see below
some gtk applications on kde have black screen elements
modemmanager:
.config/gtk-3.0/settings.ini with gtk3-engines-oxygen
fixes some screen elements
this also allows it to obey (some) kde color rules
other gtk applications:
.gtkrc-2.0 with gtk2-engines-oxygen
fixes some screen elements
these obey (some) kde color rules by default
(better workaround may be to set color to 16 bit instead of 32 bit)

dynamic hdmi control without cec
hdmi can be controlled with xset provided boot.ini is setup
toggle the monitor_onoff setting for hdmi phy

7" waveshare capacitive screen interaction
screen flickers on external power
screen flickers on battery power
may not affect stability because of dedicated bus
maybe bad soldering or maybe weak bus voltage

charger quality
charger input is very sensitive
appears to switch to using 5v source instead of battery
cannot use usb extension cables
may need to use ac extension to get close enough

software rendering
with fbdev certain 3d features will not work because they are not exposed by driver
installing libgl1-mesa-swx11 works around the problem

build remarks
bad dupont cable caused i2s failure
Sandisk U3 A1 Pixtor 32GB gold noticeably faster than basic Sandisk 8GB ultra
model 15 shows noticeable cellular signal increase


Odroid C2 tips

armbian-next hdmi fails with waveshare devices
this configuration was not enough to work
setenv display_autodetect "false"
setenv m "800x480p60hz"
setenv vout "dvi"

touchscreen resolution support
older images must uncomment 800x480 mode in boot.ini
newer images have setenv display_autodetect "true"

touchscreen electrical support
screen causes a USB power surge which shuts down ports
on odroid power this happens - display does not work
on external or y power this happens also - display works
the way to fix is to prevent power draw from odroid USB
connect external power connector to power supply
connect touch connector to green and white wires only
the screen and odroid may need to share a common ground

usb otg
can be used as 5th usb port
for keyboard with usb audio/microphone/screen/cellular


Power usage figures

C2 power audit with 5 inch screen (amps)
.90 light on with keyboard
.85 light on without keyboard
.68 light off without keyboard
.72 light on with keyboard no jumper
.67 light on without keyboard no jumper
.51 light off without keyboard no jumper
.74 light on with keyboard no jumper mic
.80 light on with keyboard no jumper mic cellular no sim
.85 light on with keyboard no jumper mic cellular no sim audio
the following with keyboard, cellular, microphone, USB audio, screen:
the following also with ethernet disabled, added amplifier, full CPU:
.87 connected and idle screen on
1.02 connected and transmitting screen on
.71 connected and idle screen off
.87 connected and transmitting screen off
1.46 peak loading kde transmitting screen on
disabling ethernet only saves 30-40ma so barely worth it
underclocking CPU only saves 10ma so not worth it

C0 power audit with 5 inch screen (amps)
.20 idle
.24 idle with hub
.29 idle with hub/keyboard
.30 idle with hub/keyboard/amplifier
.68 idle with hub/keyboard/screen on
.78 idle with hub/keyboard/screen on/cellular on/conservative
.56 idle with hub/keyboard/screen on/cellular on/conservative/hdmi off
.41 idle with hub/keyboard/screen off/cellular on/conservative/hdmi off
.36 idle with hub/no keyboard/screen off/cellular on/conservative/hdmi off
3800/360 = ~10.5 hours

C0 power audit with 5 inch capacitive screen (amps)
no power usage change with hardware color controls
xrandr brightness control cannot work because framebuffer driver lacks randr support
xbacklight requires randr support also
.76 idle with hub/keyboard/screen on
.77 idle with hub/keyboard/screen on/cellular on
.46 idle with hub/keyboard/screen on/cellular on/locked/screen off
.41 idle with hub/no keyboard/screen on/cellular on/locked/screen off
3800/410=~9.25 hours

C0 power audit with 7 inch screen (amps)
1.06 idle screen on cellular off performance
1.00 idle screen on cellular off conservative
0.81 idle screen off cellular off conservative
0.85 idle hdmi off cellular on conservative no battery
0.37 idle hdmi off cellular on conservative no battery backlight off
0.33 idle hdmi off cellular on conservative no battery backlight off no keyboard

Phase 2

Pursuit of Thinness and New Wave failure

General model 15 issues
fundamentally the problem relates to voltage drop
the external unpowered hub is connected to a large device
the other bus is connected to another large device
this is a situation many computers probably cannot tolerate
those that do use large gauge wires/circuit boards/voltage boosts

Specific model 15 issues
voltage drop with battery connector
voltage drop with barrel connector only
hub may be heavily contributing to voltage drop
soldering straight to power gpio is tedious
soldering straight to power gpio is unreliable
power switch will need to be added with gpio
soldering hub and screen to board is tedious
entire design is only 1cm thinner than pi size
entire design is fairly wide for a 5" screen
usb brownout with 340 when connecting
e303 unreliability


A number of competitors were evaluated:

up board

untested arm boards - no odroid c2 because awkward sd location

The Lattepanda (original) series of SBC boards were chosen based on many factors as will hopefully be evidenced in the notes here.


How do smartphone manufacturers make devices so thin and reliable?
the overall power footprint for the device is smaller
everything is on a single board and traces are better than wires
furthermore the distances between critical components are shorter


The ARM dilemma
failure - USB implementation
failure - power usage
failure - standardization
failure - bar to entry
The only advantage is that they are cheap?
typical arm sbc cost - $25
typical x86 sbc cost - $100
average us rent - $1400/month
Controversial conclusion:
ARM systems have no value unless you are near homeless


Lattepanda (original) tips remove windows to make troubleshooting easier
lower usb 2 port causes bios 9c error with screen
usb 3 port causes bios 9c error with screen
upper usb 2 port causes kernel enumeration error with screen
fixes:
change bios settings??? - probably not possible
or
change ports around??? - errors on all three
or
reset hub in software??? - problem is on screen end
or
add power switch to power lines on screen???
only possible solution except for manual cycle
has nothing to do with power surge
is caused by screen getting power but no usb signal
screen decides to give up on usb communication
it works on arm because they start data and power at once
switching ground fails because it goes through hdmi
power line (red wire) must be switched after bootup
the enumeration error remains at first but screen works after switch


Power usage figures

device testing
all figures with 50-200ma usage hub and wireless keyboard plugged in
.2 amps cellular physical disconnect/screen off/shutdown
1.28 amps cellular physical disconnect/screen on/performance
1.80-1.85 amps idle cellular data/screen on/performance (313)
1.85-1.90 amps in call (313)
1.05-1.10 amps cellular data/screen off/powersave (sleep mode)
.60 amps idling/cellular physical disconnect/screen off/powersave (manually enabled)

308 testing
device may get hot enough to affect operation in a pocket
may use an early inefficient chipset
2.1 amps usage idling and 2.25+ while in a call
linphone performance is abysmal
cellular extender on: bandwidth consistently good, latency sometimes bad
cellular extender off: latency still the same
cellular extender reset: latency still the same
all antenna testing failed
in this area this device does not have good latency
summary: reliable/high power/high latency

e303 testing
was barely able to connect under same conditions
somewhat worse latency with a consistent .3 connection in linphone
minimal extra power usage
main device was unusable during most testing
yet the main device has maintained a perfect connection before with e303
yet the backup device connection is perfect as well
this demonstrates performance is highly variable
at other sites the performance has been great or terrible
summary: unreliable/low power/high latency

313 testing
perfect linphone performance with consistent 4.7 connection
.45 amps used
miracle device
summary: reliable/low power/low latency

Phase 3

Recognizing the advantages and continued utility of model 16.
All the while trying to find contemporary usefulness in past designs.

Summary hypothesis
model 15 unreliable because 1 amp regulator overloaded around 1.3 amp
a single mini power supply would have no problem with this load
model 16 branched off but these are "what if" plans in vein of model 15

Summary conclusion
unreliability had more to do with internal power distribution and soldering
power can be direct wired from a secondary power supply to components
instead of running power through sbc we run power around it

Odroid c0 disadvantages
going back to kde 4
going back to manual soldering of power and usb pins
going back to usb logic unknowns
going back to a slower speed processor
going back to 1gb ram


No competitor devices were available that met the redesign requirements.

no usb connectors - fulfilled by Odroid c0
powerful and easy to use battery charging - fulfilled by Odroid c0
working power management - fulfilled by Odroid c0
2gb ram - unfulfilled


Lock screen/sleep mode ideas evaluated

conventional
no switch used
sleep/lock and slow down cpu after gesture
only negative is that capacitive screen will not sleep without switch

historical
use built in screen switch
speed cpu up only when web browser running - cannot detect switch
only negative is that screen still picks up touch input

current
use custom made switch
slow down cpu when switch is off - can detect custom switch
only negative is that audio does not work when sleeping

model 16 - current technique is required because of usb quirk

model 17 - historical is best because of single action/no wiring

How does a regular smartphone sleep function work?
It works most like the "current" method described here but with a momentary type switch instead of an on/off type switch. The momentary switch sends a signal to the microcontroller that handles power management and various devices are switched to a low power state. This has the additional benefit of not having to put the audio amplifier to sleep so notifications will come through as expected.


Design imperatives for model 17
cellular device must sit at edge because of offset connector
cellular device has no room at top
cellular device turned vertically sticks out 3cm at bottom
battery will increase device width regardless
cellular device has no room on sides because of battery
horizontal at bottom allows for some device to be covered
uncovered part of device includes usb connector
usb connector can drop and tuck around screen microusb
battery sideways is past tabs 1mm each side
battery sideways causes cellular device to stick out 3cm
battery vertical causes cellular device to stick out 2cm
battery vertical is past tabs 1cm on left
thus height has been traded for width
less height gives the device more standard proportions

Model 17 vs model 17 alternate compared
(-) loss of rounded corners
(-) 15mm more width
(-) headphone connector no longer exposed
() possibly direct soldering required instead of pin headers:
stacked pin headers may or may not be too high
(+) 1cm less length
(+) built in charge connector exposed
(+) less conspicuous openings
(+) internal space freed up
() depth similar despite 2 batteries:
Whether this is due to intrinsic design or attention to detail is unknown


Odroid c0 tips
old (secondary power supply wired to sbc and screen):
onboard 5v regulator still works in parallel with secondary power supply
device starts up as soon as power is applied to power pins
to startup from shutdown cycle usb connector and power switch
new (secondary power supply wired to screen only):
onboard battery input adc still works in parallel with secondary supply
onboard charge connector/circuitry still works as secondary usb charger
parasitic current is .18 amps from screen/secondary power supply
idc ribbon, floppy power, or jmt sm can be used for pin headers


Sierra 313 tips
urb enqueue had been killed - may be red herring
solid blue power - no computer connection
flashing orange power - invalid sim or defective device
flashing/solid blue data (3g) - choose 4g in windows application

Phase 4

Letting go of the past and moving towards a 2GB future.


Designing with modern hardware devices:
Design imperatives for Model 20-forward

getting away from odroid c0
deadend for power savings because future odroids seems to be focused on desktop use
moderate slowness
moderate instability
moderate soldering required
lattepanda/pi 4 are the way forward

4g lte design directives
the 4g usb devices on hand are oversized compared to 3g devices
there is no need to have constant access to screen or status lights on 4g devices
this means that to place the 4g screen above main screen is wasted space
it also results in an awkward vertically assymetrical design
there is a need to occasionally view the screen or status lights on 4g devices
this means they cannot be hidden between the device and screen or device and battery

screen/battery/sbc design directives
there is no room at all for round batteries with the 4.3" screen
moderate thickness devices can be built with round batteries with 5" screen
best to put batteries between screen and sbc for sbc access and cooling
thin devices can be built with flat batteries side by side sbc - model 17
important to place sbc flat on battery for access and cooling


Odroid c0 Specific

cpufreq instability
whatever routine speeds up cpu for qupzilla is unstable
system can freeze when qupzilla is launched
there has been mention of cpufreq related instability on odroid forums

power usage on 5v
as little as 380ma when fully asleep
as much as 1280ma when charging with powerboost 1000c
820ma to 1100ma when in use

memory usage
2 yahoo tabs are enough to make oom killer take out xorg
try to disable all akonadi instances to save memory
this seems to bring memory usage down from 512 to 256 at boot

cellular failure 2
no internet connection
no response from script
this is because /sys/class/net/wwan0 carrier check does not work
carrier check changed to route check and some possible alternatives added

instability at idle
crashed once after bootup
once in afternoon
play with cpufreq
if not it is a hardware/wiring problem


Pi 4 Specific

pi 4 and lattepanda (original) compared
pi 4
+pricing
+future availability
+support
+no 9c error requiring special wiring for screen
+smaller board size allowing side by side cellular configuration
+4 usb ports
lattepanda
+compatibility
+power consumption
+cooler running making for sleeker design
+cooler running making for better performance under load
+easier startup and reset
+better 3d performance

pi 4 reset
touch square pin and pin immediately beside it
square pin is called global_en
pin beside square pin is ground

model 22 image mastering steps
1 - add pi 4 support to devuan jessie pi 2 with pi 2
2 - add repository software
3 - add custom software
4 - apply patch 1 / run custom software setup
5 - apply patch 2 / disable akonadi
6 - apply patch 3

model 20 software differences
model 20 can be serviced with model 22 image
config.txt should be changed to match screen
99-calibration.conf should be changed to match screen
should be the same as model 22 in all other ways

hdmi port 1 failure
5" hdmi screen with spi touch works at boot
other screens work when hotplugged after boot with previous screen
port 0 is required to have a reliable boot with all screens

hdmi port 0 quirks
5" screens work without modification
4.3" screen requires hdmi_ignore_edid

pi 4 dpms
true dpms is unimplemented on pi 4 which means no screen blanking - issue 3050
tvservice can probably take the image off the screen which will cause monitor to sleep
this would be the same kind of power usage as just using the screen power button
this makes the screen locker fairly redundant for now

vc4-fkms-v3d quirks
this driver does not support display_rotate - instead it uses randr
it may not support custom hdmi timing modes either
one of these is why it causes screen blanking and refresh issues when specified at boot
when not specified a non-randr fallback driver is used


Lattepanda Specific

notes on screen orientation
some sbc like raspberry pi set orientation at boot in a system specific config file
some sbc like odroid c0 set orientation with special directives in xorg.conf
some sbc like lattepanda set orientation like pc with xrandr and gui equivalents

notes on touch orientation
it is best practice to use xinput_calibrator even on capacitive screens
this gives 99-calibration.conf data for xorg so touch works at boot
if script sets up touch this gives less flexibility because it is dependent on script

waveshare 5" and 4.3" capacitive screen evdev notes
5" - xinput 244:1 242:1/0 required before running xinput_calibrator
4.3" - 250:1 248:0/1 required before running xinput_calibrator
audio connector is 2mm pin pitch 4 pin female jst

newer kernels and touchscreens
libinput is used instead of evdev
this means calibration and touchscreen orientation setup is different
xinput_calibrator is now redundant as it should be with capacitive screens
both should setup touch at start with xorg.conf.d configuration files
however libinput is not working properly at start this way
evdev can be installed and used instead of libinput
also libinput can be setup with udev
also libinput can set setup through a startup script with kde
also libinput can be setup with .xsessionrc - add 10 second sleep before xinput

power usage comparisons at 4.25v
model 22 (backlight on, cellular connected, no script) - 1.6 to 1.7a
model 22 (backlight off, cellular connected, no script) - 1.28a
model 22 (backlight on, cellular connected, script) - 2.0a
model 22 (backlight on, cellular connected, script) - 1.55a
model 20 (backlight on, cellular connected, no script) - 1.43a
???
model 20 (backlight on, cellular connected, script) - 1.6a (1.72a transmitting)
???
model 21 (backlight on, cellular connected, no script) - 1.25a
?
?
?
model 23 (backlight on, cellular connected, no script) - 1.15a

model 21 and 23 size comparison
they are almost the exact same size despite the screen difference
model 23 would seem to be pointless but has the potential to be lower power
widthwise they are the same because of width of board and battery
depthwise they are the same because of depth of battery/screen/board/cellular
lengthwise they are the same more from random influence

model 23 notes
4.3" may not have 9c/unresponsive screen bug
will need logical or for main thread screen off check - only if bug is present

programmatic differences between waveshare 4.3" and 5"
main issue on 4.3" is evtest ABS_MT_POSITION_X and Y Max do not match screen resolution
on 5" max is 800 for x and 480 for y
another issue on 4.3" is the driver issues screen releases (-1) on subsequent presses
on 5" only ABS_MT_POSITION_X and Y are updated and no releases are sent

touchscreen restoration is slow when awaking
seems like it should only take 5 seconds but takes much more time
in testing it is perfectly fast
the problem seems to be that easystroke hides the pointer when the device is gone
a single gesture after sleep should restore the pointer

measurement of true power consumption
is either device really at the charger voltage when measuring?
the extra power is heat lost in the wire as voltage drop
meaning 4.15v for all is more likely as a reference voltage for power

Phase 5

Divergent Paths


Ultimately the SBC technology only exists to make a device with a specific role. A device that fulfills every engineering goal at once is not currently attainable. The goal in this project is to proceed along two paths of development on what would sometimes result in conflicting goals in a single device. The first path is one of compatability and gaming performance. The second path is one of efficiency and size. Obviously an x86 device would fulfill the goals of the first path in the best way. A PC stick was chosen based on on the small profile and available RAM. To fulfill the goals of the second path would seem to require power management or PMIC support with some way to enter a low power state. The Khadas VIM3 SBC was chosen based on the advertised ability to suspend to RAM.


Some More Notes On Odroid c0 Development From The Interim Period

(Skip below if you want to see the more interesting newer stuff)
(Looking back you can see how important it was starting to become to investigate low power states)
(From this older testing you can see that it looks like odroid c0 and Lattepanda have poor low power state behavior)
(odroid does not support this at all and who knows what Lattepanda supports)

mid - .530ma at 4.25 screen switched off and 160ma entire unit off
android phone - 2500mah battery and only 3ma usage at idle

try freeze standby mem disk on lattepanda
bottom button wakes from low power states
freeze - 350 to 400ma on 4.2v - investigate further with more sensitive power supply
mem - 350 to 400ma on 4.2v - investigate further with more sensitive power supply
disk - needs swap and is not relevant

an sbc would need a power button connected directly to a pmic or cpu to awaken from sleep
a pmic without button like nanopi a64 is not enough

take a look at odroid c0 idle power again
75+ hours at 200ma on 16000 mah battery
c0 hdmi switched off conservative no keyboard no cellular - 140ma at 5v
c0 conservative keyboard attached no cellular - 230ma at 5v
freeze/mem - shuts down them immediately starts again
c0 conservative 313 no sim - 330ma at 5v
c0 conservative 340 no sim - 280ma at 5v
c0 conservative 308 no sim - 350ma at 5v
c0 conservative 303 no sim - 290ma at 5v
c0 conservative 313 sim - 330ma at 5v
c0 conservative 340 sim - 280ma at 5v
c0 conservative 308 sim - 370ma at 5v - larger
c0 conservative 303 sim - 290ma at 5v
c0 conservative 313 script running - 550ma at 5v
c0 conservative 340 script running - 290 to 470ma (320ma average) at 5v
c0 conservative 308 script running - 380 to 830ma (670ma average) at 5v
c0 conservative 303 sim - 300 to 510ma (400ma average) at 5v
compare power usage to device with no hub - should solder connectors first
add screen power usage to power figures when device is assembled
power must be supplied to touch usb port for touch functionality

may need a makeswap script to make a 512mb swap space if browsing is a problem

model 19 notes
needs barrel connector - check
needs 313 changed to 340 to save power
onboard powerboost 1000c does not charge correctly
onboard powerboost 1000c wastes a small amount of power
onboard powerboost 1000c should boost stability
instability could come from from keyboard unplugging
instability could come from unshielded usb wiring
instability could come from using the built in charger

model 19 - usable
odroid c0
10000mah battery
powerboost 1000c tied to screen power switch
screen data lines tied to odroid c0
soldered hub
313
4" screen

model 24 - too many brownouts - built in charger not problem - usb wiring is
odroid c0
16000mah battery
custom screen switch cable attached to hub port
soldered screen microusb unused
soldered hub
340
5" screen

testing of 5" screen with external power boards
micro step up - .58a at 4.2v
powerboost 1000c - .55a at 4.2v
powerboost 1000c being slightly larger but more efficient with a backup charger

viability testing
running with script on screen on no keyboard - 910ma to 1130ma with 950ma average
initial after sleep - 270ma to 510ma with 330ma average - 9:15
35ma - off current
330ma with 16000mah battery is about 48 hours battery life

getting away from odroid c0
deadend for power savings because future odroids seems to be focused on desktop use
moderate slowness
moderate instability
moderate soldering required


PC Stick Development

device 1
this device has a more conventional smartphone like shape and is slightly thinner
however it can be housed in a utility shell with a steel slider keyboard accessory

device 2
this device is more brick shaped to accomodate an oversized battery
meant to be used standalone or with a wireless keyboard

device 1 power figures
5v - 5.10v
1.00a - windows 10 idle with 5" screen on/hub/keyboard/performance
.750a - windows 10 idle with 5" screen off/hub/keyboard/performance
.85a linux idle with 5" screen on/hub/keyboard/performance
.60a linux idle with 5" screen off/hub/keyboard/performance
.16a shutdown with 5" screen off/hub/keyboard/performance

control comparison
c0 4.30v 1.15a - linux idle 5" screen on/hub/keyboard/performance
c0 4.30v 1.10a - linux idle 5" screen on/hub/keyboard/conservative
c0 4.30v 1.10a to 1.15 - linux script 5" screen on/hub/keyboard

new batteries for device 1
4.30v 1.10a - linux idle with 5" screen on/keyboard/powersave governor mode (4.19-4.20)
4.30v 1.15a to 1.55 with 1.25 average - linux script with 5" screen on/keyboard (4.18)
4.25v 0.02a - shutdown with usb powered off

device 2
4.33v 1.07a - linux idle with 5" screen on/keyboard/data connected
4.33v 0.93a - linux idle with 5" screen on/data connected
.93a idle - .25a screen off = .68a <> 20000mah / 680ma = 29.4 hours runtime

power saving modes
standby - not available
freeze - instant crash
mem - instant crash
disk - instant crash

power saving remarks
power usage falls by 100ma when irq #180 is automatically disabled
new cellular device only uses 35ma when idle
we are only seeing about 100ma more than the control comparison
this is remarkable given the increased specifications

768x1026 shown in xrandr bug
caused by xrandr framebuffer change by scaling
use panning instead of scaling to fix

mouse movement bug
scaling required to free mouse on device 1 - not required on device 2
hdmi names are slightly different between devices
panning option can be used instead to keep 1x1 scaling
xrandr runs and sets panning area larger than current resolution
xdotool focuses mouse on the bugged and or expanded area
xrandr runs again and disables panning
the mouse becomes unlocked
device 2 started at first with intel - not seeing that now
device 1 started at first with modesetting
this explains why only device 1 had buggy behavior

differences between device 1 and 2
freezes device2 - xorg option noaccel or change kwin to xrender or change driver
irq errors device2 - no fixes appear to be needed
broken shutdown device2 - hold to force shutdown
power button functionality device2 - hold to start
mouse movement bug device1 - fixed by xdotool and xrandr panning
screen initialization bug device2 - fixed by screen power switch
usb powerdown more temperamental device1 - fixed by waiting a few minutes

voltage drop running on batteries
converter efficiency is not a factor - voltage would not drop much at first
wire gauge is not a factor - minimal losses calculated
drop is coming from the batteries themselves

sb powerdown/screen initialization investigation first device
startup from usb poweroff but not cold boot - screen initialized
shutdown from initialization - pulling keyboard cuts usb power immediately
startup from usb poweroff again - screen initialized
same behavior on next shutdown from initialization
always works
sometimes will not power down usb immediately - wait 10+ minutes to try again

sb powerdown/screen initialization investigation second device
any shutdown will cause initialization failure
any device connecting or disconnecting when shutdown will power down usb
can get into a state where nothing works to clear initialization failures
thus a power switch is needed
was this caused by the device or the screen???
power switch added
code 92 at startup can hopefully be overcome by waiting for about 1 minute
this happens when powering screen down and back up again when shutdown
current idea is that software fixes for this problem will not be made
hardware reset is done before bootup assuming code 92 will not be a problem

irq errors and semaphore kernel log errors on device 2
reboot without removing modules - wait for kernel errors - semaphore errors
reboot and remove axp288_fuel_gauge crap - irq errors but not semaphore errors
reboot and remove i2c designware crap - working
device 1 - same power draw and works when i2c removed - worked with i2c also

flightgear investigation
this will only work well with an actual joystick
runs slow also

gaming layout fundamentals
device 1 should be optimized for widescreen use with physical keyboard
device 2 should be optimized for portrait use with onscreen keyboard
these are the least awkward positions given the device traits
this means only one keyboard configuration needs to be used - portrait 720x1280
easystroke should run in standard configuration alongside ksp
ksp lighting needs to be boosted by 50 percent
slowness - so click downres a few times/apply or accept/add title bar
slowness fix was definitely just apply or accept
not much difference between fullscreen and window
not much difference between driver vsync or not
not much difference between modesetting and intel
hdmi-x or hdmix caused by modeset or intel

landscape mode concerns
if 1280x720 is too slow edit debug mode for "max performance" 720x400
apply and accept helped framerate at 1280x720 as well
after apply window changed to 4:3 and slower but still faster than not applying
filling screen was somewhat slower but still faster than not applying
takes up more room stowed and unstowed and takes up usb

portrait mode concerns
something potentially needs to be done about up down left right and zoom
only needs + and - mapped to zoom and they are on onscreen keyboard
720x1280 with ksp window should have ok peformance because small ksp resolution
720x768 is the forced resolution for portrait to allow onscreen keyboard
limitation of no click and drag so no building without keyboard

device 1 gaming stability concerns
voltage drop is too high at screen without custom usb wiring like device 2
as much as 220ma additional power is used at screen external usb connector
custom usb wiring without switch seems to have fixed it
still uses a lot of power compared to device 2 - could be cellular device

pc stick based device limitations
voltage drop bug is very prominent with these due to high power draw
another problem is a total lack of any power saving features
the combination of these two problems make these devices untenable


VIM3 Development

device 1 general layout
board flat against screen is ultimately best
board on same plane as cellular
more space saved vs screen then battery
allows for regular slim hdmi cable
allows for regular screen microusb
logically makes space for side by side cellular configuration

notification limitations
suspend mode puts the cpu completely to sleep
the cpu then apparently can only wake via the power button
suspend also shuts off usb power
this means the cellular device is turned off and cannot transceive
the net result is notifications are impossible when in deep sleep

linphone data sms testing
for devices or plans without sms support
linphone sms send broken
linphone sms receive working

phone preparation steps
add did
add callerid
setup call forwarding

usb configuration
one strategy is to use a hub and slim down and place on board
another strategy is to power 5v only by vin connector and use usb-c as third

sleep mode works in android
sleeps instantly with power button
awakens in 3 seconds
cellular device takes about 15 seconds to awaken
current flow is unreadable in sleep
.80a-.85a on 5v read at android idle

hdmi autodetect did not work with 4"
barely worked with 7"
first test
1080p60hz worked with 4" at least with tv plugged in at boot
720p60hz works with tv plugged in at boot
480p60hz works with tv plugged in at boot
800x480p60hz works with tv plugged in at boot
second test
800x480p60hz did not work with 4" plugged in at boot
1080p60hz did work with 4" plugged in at boot
720p60hz did work with 4" plugged in at boot
480p60hz did work with 4" plugged in at boot
culprit seems to be the autodetected or specified 800x480p60hz mode

touchscreen problems
touchscreen needs hid-multitouch not included in fenix debian kernel 4.9
recompile inside docker container with hid-multitouch using make kernel-deb
touching screen within console always causes usb disconnect even when working

fenix kernel compilation problems
editing .config or using make menuconfig causes changes to be overwritten
edit arch/arm64/configs/kvims_defconfig to make lasting changes

function key
single tapping this key allows for sending a key input
could be used for bringing up the phone or switching the flashlight

kscreen
this time let kscreen handle the xrandr -s 1 needed to rotate within kde
this may work better with recovering from suspend

optimal 4" monitor settings
0 brightness for lowest power
70 contrast for enough brightness but not washed out
70 saturation as default

limitations of small 3.7v batteries
4000mah battery is a little too overloaded
really 4000mahx2 is still slightly overloaded
that is the source of the large voltage drop when on battery
4000mah with 1 amp load is like a 100ah with a 25amp load
android phone only uses ~120ma running so incurs smaller voltage drop
battery voltage is important because more voltage means less current
less current is less immediate load on the battery which is more efficient
the future is clearly with higher voltage batteries

easystroke failed
make clean first
edit main.cc of easystroke

modemmanager failed
problem was no kernel support for mbim/sierra devices
no more need for main thread to manually setup modemmanager

bluetooth testing
no configuration was necessary
seems to work and finds lg phone

reconnection failures
route/carrier check - change check to 2 instead of 1???
ip existence check - change check to 3 instead of 2???
this was a problem that caused a failure to reconnect overnight
however changing these values caused constant reconnects when restarted
related to eth0 obtaining a ghost ip throwing off checks

uuid problems
first device did not boot fully after flashing complaining of uuid mismatch
blkid showed actual uuid did not match uuid in env.cfg
image needed a last stage rebuild after changing uuid in env.cfg in root.img
second device booted without incident even with no changes
suspect it has something to do with nonstandard flashing process of device 1

device 1 power figures
shutdown - .027a on 4.25v
idle/no script - .980a on 4.33v
sleep - .065a on 4.25v = 53 hours standby time with 4000 mah

device 2 power figures
shutdown - .025a on 12.6v
idle/script - .350a on 12.6v
idle/no script - .345a/.310a on 12.6v
sleep - .034a on 12.6v
gaming - .330a on 12.6v

device 3 power figures
shutdown - .021a on 4.23v
idle/keyboard/cpu minimum/no script - 1.07a/0.80a on 4.23v
idle/keyboard/cpu minimum/script - 1.07a/0.875a/1.2a on 4.23v
sleep - .065a on 4.23v
gaming - 0.90a/1.3a on 4.23v

device 4 power figures
shutdown - .043a on 13.5v
idle/script - .410a on 13.5v
idle/no script - .405a/.385a on 13.5v
sleep - .043 on 13.5v
gaming - .430a on 13.5v

watt hour calculations
energy totals
small 3.7v pack 4000mah - 14.8 watt hours
medium 8000mah (extrapolated)
large 12v pack 20000mah - 240 watt hours (extrapolated)
large 12v pack 20000mah - 240 watt hours (actual)
16000mah 3.7v - 59.2 watt hours
9000mah 12v - 108 watt hours
shutdown - really the large pack based models could use zero with switch off
30ma draw on 3.7v = .03 amps = .111 watts = 14.8/.111 = 133.3hours 5.5days
medium 11days
240/.111=2162.1hours 90.01 days
20000/25=800hours 33.33days
idle
.980a*3.7v=3.6w 4000/980=4.0hours .16days
medium .32days
240/3.6=66.6hours 2.77days
20000/335=59.7hours 2.48days
high load usage
1500ma draw on 3.7v = 1.5 amps = 5.55 watts = 14.8/5.55 = 2.6hours .1days
medium 5.2hours .2days
240/5.5=43.63hours 1.81days
.3a idle->.35a gaming on 12v 20000/350=57.1hours 2.38days
sleep
75ma draw on 3.7v = .075 amps = .2775 watts = 14.8/.2775 = 53.3hours 2.2days
medium 4.4days
240/.2775=864.8hours 36.03days
20000/35=571hours 23.80days

main thread fixes
do not autostart modemmanager
modem enumeration fix
modem signal scrape fix
kdialog killall fix

more main thread fixes
potential fixes for eth0 throwing off checks
ip and carrier check race condition fix
more modem enumeration fixes

further main thread fixes
adapter check 5 got accidentally commented out - check
old modem number got accidentally commented out - check
old modem number is getting junk possibly written to it - check
implement sleep detection check - check
modem manager running check was too long for bugged os - check
presence of redundant modem number checks - fixed

main thread sleep mode enhancement
independent sleep mode implemented based on keyboard connection
since charger is not detected then detect keyboard instead
this allows for sleep when keyboard is not detected
uncomment in main thread to enable

even more main thread fixes
killall dhclient in cdc ethernet reconnect routine
move adapter 5 check outside modem enumeration check
increase dhclient timeout for cdc ethernet reconnect routine
disable initial connect attempt for adapter 5
disable eth0 at start

ip and carrier route check saga
these checks are not reliable because of an etho avahi device with address
one way to handle it is to bring down eth0 at script start
one way to handle it is to edit /etc/network/interfaces
one way to handle it is to disable the ethernet driver
not seen after return from sleep after running for a while
seen on fresh boot
not seen at all anymore with no modifications
perhaps it only happens on the first boot

5" screen quirks
5" screen can be unresponsive after reboot with vim3
shutdown instead of rebooting to reset screen usb circuitry

3.7v lithium ion (1s) charging strategy old and new
old strategy - 4.23v when unloaded and 4.35v when loaded
new strategy - 4.25v-4.27v all the time
new strategy is safer because if we become unloaded at 4.35v bad things happen
if we need to maximize charge under new strategy we simply unload

7.4v lithium ion (2s) investigation
putting 2x16000mah 3.7v batteries in series should be enough for stability
however series charging looks complicated and expensive
easier to use existing source of 12v lion/12v agm/build small 3.7v device

device 3 still failing even with usb-c in parallel
could be a failure of power supply or current limit on board
does not matter though because voltage falls low quickly
as low as 3.97 and 4.05 immediately off the charger
obviously current limit is not so easily reached with higher voltage

ethernet always up bug
iface eth0 inet manual as only ethernet entry in interfaces
managed=false in network manager config file
however this breaks standby mode
bring down eth0 through scripting instead

standby failure bug
when networkmanager is not managing interfaces then bugs happen
usb does not shut off and device crashes and powers off
manually bringing down eth0 allows standby to function

low signal bug with model 29
this device often says searching for signal
a vertical antenna on the top port improves the signal from 1 to 4 bars
the antenna does not completely stop the searching for signal issue
device is 10 feet from cellular signal booster with few obstructions
take advantage of mechanical joint in device and flex upward to improve signal

proposed device
vim3/5" screen/new cellular device/6800mah 12v lithium ion battery
would have rough smartphone like shape
would be a reliable alternative to model 30

retroarch technical configuration
sdl2 needed for video driver
rgui needed for menu driver
verbose mode is needed to figure out what is failing
sdl2 support is broken for loading roms in the debian 1.7.3 version
libretro-fetch.sh with retroarch as an argument will grab retroarch alone
other fetch arguments will grab specific cores
build-config.sh and /dist/info has emulator specific information
can cd directly to retroarch folder for special compilation
special retroarch compilation can include flags and manual jobs adjustment
./configure --help will show build options
--disable-kms needed to avoid linking error during build
the link error was narrowed down to a source code file for kms
kms is for window manager less display output so no loss
newer version of retroarch and the addition of snes9x2002 works ok
snes versions are not available in debian repositories
sdl2 with opengl specified on the command line works ok
SDL_RENDER_DRIVER=opengl ./retroarch --verbose
game must be loaded, paused, then f1, then f1 again
this sequence avoids a freezing bug
overlays are not working because they require the gl2 driver

retroarch joystick configuration with 8bitdo zero 1 gamepad
pair joystick
configure joystick buttons in retroarch
remap retroarch f1 button to something on the gamepad
remap retroarch p button to something on the gamepad
adjust retroarch render size
force retroarch window to top

kde and bluetooth device interaction
signal problems seem to be an issue
hcitool scan gives immediate results for regular devices
hcitool lescan tends to hang after a while for low energy devices
the lescan hang causes bluedevil to have trouble scanning for regular devices
move device closer and be patient and it will be found
pairing will fail unless the device is close as well
jstest will see the device but will not be able to properly test it
starting in shutter mode by holding select is a poison pill for bluez
hiconfig hci0 up and down may help
hciconfig hci0 reset may help
rfkill may help
disabling and trying to renable within kde completely crashes adapter until restart


VIM3 Development Continued

sierra 340 failures on model 29 continued
same when device switched out
same when device moved away from board
better when cable moved away from board
very bad with direct connection under screen
much better when placed alongside with cable alongside
needed to be farther away from vim3
mbim-proxy uses 100% cpu - could be cause or symptom
killing mbim-proxy causes it to be restarted and no more 100% cpu

device 5 design imperatives
there is nothing that really excludes the 4.3" or 5"
for 4.3" input usb on bottom
for 4.3" input usb flush with battery edge
usb flush with special connector comes at cost of height
if you have the height then you should try to fit things under it
this makes building more complicated and increases overheat chances
4.3" with flush right angle connector allows for attaching screen close
with close screen attachment the sbc can be attached opposite screen
with the 5" screen you are only adding 2cm to top and 1cm to sides
15mm minimum thickness with 4.3" screen on screen side of battery
15mm minimum thickness with 5" screen on screen side of battery
makes more sense to use the 5" screen if we can support it electrically
battery sandwich between screen and sbc is similar to model 30 layout

device 5 screen issues
screen touch failed on boot
works after shutdown then boot again
might should consider trying to turn power button functionality back on
this worked again but next time it fails try reloading hid-multitouch

device 5 power figures
.025a at 12.7v - shutdown
.410a at 12.7v - idle/no script
.420a at 12.7v - idle/script
.460a at 12.7v - gaming

retroarch improvements
threaded video increases performance and may fix menu bug when starting
do not pause when focus lost may fix freeze when focus lost

xsessionrc improvements
sleeps here slow the boot down
move all code and sleeps to child thread
turn off big processor cores by default here

main thread improvements
timeout in route/carrier check was too short so increase to 30 seconds
execessive dhclient requests may cause cellular device to reboot
dhclient requests may not be necessary at all
dhclient code on route/carrier and ip checks cleaned up

debug menu improvements
add option to turn big cores on and off
for falkon turn big cores off and high power on and animated scroll off
for snes emulation turn big cores off and low power on and threaded video on

8bitdo zero failure
after battery ran out this failed to work
does not show up in bluetooth list
fix is to turn on with start and then hold select several seconds

further main thread improvements
can be in state where modem has reset and modemmanager does not notice
mmcli -S works to rescan for modems
set to rescan automatically when mmcli -L finds nothing

even more main thread improvements
it is possible the the cellular device resets more than 10 times
this will make a 2 digit or larger number in mmcli -L which was not handled
now modem enumeration can handle any index number

continued main thread improvements
touch fails
add touch calibration to new modem enumeration

intractible usb problems
confirmed on model 32
because the problem is in hardware any software workaround will not work
can be in state when screen/cellular device is no longer initialized by kernel
try to switch cellular device from hub direct to sbc
switch screen direct from sbc to hub
the screen does not brown out this way
less wiring and less unshielded wiring is used by the celluar device this way
this is less wiring that could become a receive or transmit antenna
the problem appears to lie in device to sbc usb emi or sbc usb to device emi
there was a pronounced ping delay with old wiring
with new wiring pings transmit immediately as expected
if the problem is still bad then cellular wiring can be shielded with foil tape
the problem should not be as bad as it was
with a reduced problem occurence then software workarounds may be sufficient
model 29 somewhat reliable with direct cellular connect albeit different port
model 28 appears to have gotten away with having cellular plugged to hub
sometimes you can get away with cellular to hub but sometimes you can not
screen is attached to hub which is attached to left port and cellular to right
cellular is attached to white right angle to right angle extension
it is clearly improved with direct cellular connection to sbc after testing

more 8bitdo zero information
initially the controller comes setup with nintendo switch configuration
if it gets set to another mode it will not pair immediately
switch back to nintendo switch mode with y + power

retroarch freezes
sometimes freezes when loading or saving states
when save freezes occur the game is correctly saved regardless

black screen failures on device 5 - could be hdmi output flickering instead???
try moving controller further above screen - failed
try direct wiring screen to hub
try built in usb wiring in gpio
try abandoning third usb port and using bluetooth microphone and keyboard
happens after hours of gaming
the current idea is that something on the board overheats and interrupts hdmi
more evidence points to brownout - when script runs and hub connected
brownout does not occur when screen also has external power

Phase 5

Embracing the advantages of ARM and x86


x86 development with Lattepanda Alpha and Delta

design imperatives
switched power to screen and cellular device with single switch
best to elminate any hubs from the equation
4.3" screen to reduce bulk and power draw
12v power only with no stepdowns
bluetooth has to be working
screen with built in audio amplifier
working suspend mode

lattepanda alpha alternatives
delta seems good for now
rock pi x is another higher voltage x86 sbc choice
a usb-c pc stick would be another choice

typo keyboard for iphone 5
this is the smallest available keyboard of any type
will work with battery disconnected
should wire leads in parallel with one of the type a connectors
best to clip battery leads to avoid board damage
add \x03 for % to send a ctrl-c
add \E[A for ( to send a up
add \E[B for ) to send a down
add \t for + to send a tab
gestures would be better for unsupported keys

red herrings with typo keyboard and gaming
backspace does not work even though it repeats properly
keyboard and square key which somehow do not work
typo letter keys which do not repeat and somehow do not work
corrupted retroarch configuration
whether the screen overlay shows button presses or not
xmodmap -e just does not work sometimes
do not let xmodmap autostart and use a different name
new version of retroarch is no better and has broken sound
remap non working keys with xmodmap still does not work
most keys cannot repeat so xdotool is of little use
even with repeat xdotool timing would be difficult

retroarch settings
retroarch cores folder set to where cores were compiled
space and enter set to a and b for touch and typo
snes overlay turned on for touch and typo
overlay on in menus for touch and typo
5x windowed scale
force 0/100 position for retroarch in kwin rules
audio volume set to 8
buttons set for controllers
select + start menu option turned on for controllers

mechwarrior 2 on vmware x86 host
mechwarrior 2 windows needs windows 7 or earlier
vmware tools needs windows 7 sp1 64
vmware tools install is greyed until guest floppy drive is removed
sp1 cannot be copied in the standard way without vmware tools
shared folders do not work without vmware tools
use host only networking and setup standard host network share for sp1
windows 95 compatibility required to bypass movie on windows 8 64
windows 95 compatibility required to bypass movie on windows 7 sp1 64
missions do not launch on windows 8 64
missions do not launch on windows 7 sp1 64
mechvm works on all newer windows versions but is not the same experience
dos versions may work on newer windows with dosbox without mechvm
some errors on windows xp sp3 when installing vmware tools but it works
manual install needed on xp for mw2 for missions to load
updated files from the download folder needed to be copied to start mw2 on xp
mechwarrior 2 configured for wsad keyboard and mouse control
vmware does not support bluetooth controllers
best to map controller input to keyboard keys for mechwarrior 2
missions may work on 7/8/10 if properly installed and modified as with xp
slugs patch was required for mechlab to allow for a custom mech
not sure if mouse emulation or reconfiguring mw2 for joystick to keyboard is best
mouse emulation is best because emulator stays the same and movement will be better
will need a joy2key like program with joystick mouse support
this may be good for general use games and programs also
use win98/me compatibility for windows xp
ultimately mechwarrior 2 is kind of basic
farpatcher to increase view distance only works on dos
mechwarrior 2 does not feature throttle decay like the later versions
lack of high view distance kills it but a great game for the time

mechwarrior 3 on vmware x86 host - host and native os is windows 8
installed from iso/patched/no cd added
hardware mode has blurry blocks/software works but is ugly on xp on vmware
98/me compatiblity did not fix hardware mode on xp on vmware
radeon mw3patchdraw patch did not fix hardware mode on xp on vmware
dgvoodoo does not work because of dx11 on xp
dgvoodoo causes directx6 error on windows 7 sp1 64 on vmware
dgvoodoo requires .net upgrade on windows 7 sp1 64 on vmware
windows 7 sp1 64 works with hardware mode without dgvoodoo
game can use up to 1600x1200 with registry edits
1600x1200 causes crash every time on vmare but 1280x1024 works ok
mech3hires v1 patch works to prevent crash on escape with 1280x1024
mech3hires v2 only enables option menu so not tested
mech3hires v4 crashes on all included resolutions
mech3hires v5 patch crashes on any resolution except 800x600 and 640x480
nglide wrapper will not work because the game is not glide compatible
try dxwnd directx troubleshooter in vmware or native
try wine3d windows wine emulation in vmware or native
ctrl + numpad 0 causes torso twist to function
vsync added in vmware vmx configuration file
vmware mouse behavior is better in windows 7 sp1 64 than xp
performance is low in hardware mode in windows 7 sp1 64 in vmware
needs to be installed rather than ripped native just as in vmware
microsoft basic render driver in dgvoodoo native causes same dx6 error as vmware
control scheme must be loaded into registry from ui the first time
dgvoodoo only needs option to disable and passthru to directx to let driver handle it
passthru does not allow for forced resolutions but custom and mod should work
dgvoodoo works on windows 7 64 on vmware but 1600x1200 does not
slower on windows 7 vmware but ok with graphics not underclocked
vmware helps during missions with snapshot feature
ultimately too hard and kind of bad
mechwarrior 2 somehow feels and even looks better
the difficulty - somewhat addressed by allowing more salvage with cheat engine
the drab color scheme - not addressed
the lack of mechs - not addressed
the resolution - native allowed for 1600x1200 resolution
the performance - native allowed for better performance

super mario rpg
reverse a and b in input settings
change aspect ratio from 4:3 to unchanged
snes9x 2005 has best sound and cpu efficiency
change audio to 15 in config file and anything over creates more distortion

notes on screen orientation
some sbc like raspberry pi set orientation at boot in a system specific config file
some sbc like odroid c0 set orientation with special directives in xorg.conf
some sbc like lattepanda set orientation like pc with xrandr and gui equivalents

failure of video playback
test video fails to play
mplayer no longer being maintained
install mpv

the wakeup problem - x86 wakeup with the power button
important otherwise a keyboard is needed which is awkward
touchscreen does not cause a wakeup
terryza - works when elogind disabled
aoxun - works when elogind disabled
lattepanda - works when elogind disabled

difficulty of charging on 3.7v system
barrel connectors and long lengths of charging cable contribute to voltage drop
some devices are worse than others but it is difficult to charge fully
one strategy is to overvolt but that is dangerous without a sufficient load
with 12v becuse of the reduced voltage drop this is less of an issue

bios edits
alpha turn off micro sd to avoid kernel errors
alpha or delta turn off ethernet if it is blocked

new cellular device
VSVABEFV brand
works with us lte frequencies
uses modern qualcomm 4g chip with 150mbps download speed
as small as any cellular device but has wifi hotspot
can work with dongle mode and hotspot simultaneously
hotspot mode may be required for proper cellular signal
acts as usb cdc ethernet device when connected in dongle mode
dongle mode does not work in windows 8 32 bit on test computer
configuration page is at 192.168.1.1 and uses password admin

new mobile device
ultra thin device with lattepanda delta/advanced 4g device/5" capacitive screen
custom unbalanced 12.6v 4000mah series charging battery pack
wired to be able to charge even with switch off
voltage drop during boot - 12.2v
voltage drop after boot - 12.4v
voltage drop at immediate sleep after boot - 12.5v then back to 12.6v
this indicates that the batteries conceptually are very strong
do a final check on charger polarity while disconnected at charger side before charge
set charger voltage to 12.6v exactly and current to 300ma
test charger output off at sleep - dangerous because of charger capacitance et al
test charger output on at sleep - possible with charger limits enabled
test charger output off at bios - dangerous because of charger capacitance et al
test charger output on at bios - dangerous because demand current might be high et al
the batteries will wear less and take a more equal charge if demand current is low
devices with this battery configuration should sleep as much as possible
constant vigilance for overheating and bulging should be exercised during charge
the idea here is to follow all battery safety rules except series charging rules
may have to get used to a long and slow charge
tight charger parameters/sleep on - works fine / charges slow / .041a
charge while running at 500ma works ok

grub fix 1
grub is bugged after messing around with operating systems
bootup in rescue mode from usb installer and mount system root
mount and or create efi partition as first partition
run grub-install now that the system is automatically chrooted

grub fix 2
after a fresh install grub stil fails with a command line
grub prefix is looking for a debian folder which does not exist
this prefix appears to be hardcoded into the grub efi files
copy the /boot/efi/devuan folder to debian to fix

768x1026 shown in xrandr bug
caused by xrandr framebuffer change by scaling
use panning instead of scaling to fix

mouse movement bug
scaling required to free mouse on device 1 - not required on device 2
hdmi names are slightly different between devices
panning option can be used instead to keep 1x1 scaling
xrandr runs and sets panning area larger than current resolution
xdotool focuses mouse on the bugged and or expanded area
xrandr runs again and disables panning
finally the mouse becomes unlocked

linphone data sms testing
for devices or plans without sms support
linphone sms send broken
linphone sms receive working

router script notes
useful to have a physical ethernet switch to switch between hardline and mid
pfsense firewall at minimum must have filters reloaded

PCSX2 optimizations
1.4.0
salvaging some functionality from an otherwise slow emulator
about 75% average speed is normal
tune everything as much as possible
sdl sound, sdl api alsa, linear interpolation
change sound to async mix to play sound at full speed
change window resolution to 720x480 to stretch across screen
change zoom to 0 to fill screen
disable all cpu security mitigations - no more than 5% difference
skipdraw causes glitches and does not increase speed
frameskip causes glitches and does not increase speed
ee, iop, and vu 1 and 2 sub options do not increase speed
1.5.0
too slow
only debian binary is supposedly slow
about 50% average speed is normal
set gsdx plugin to use sse 4.1
set gamepad plugin to legacy
turn off large framebuffer
1.6.0
probably too ambitous for a binary installation
was indeed too ambitious with outdated libwx and libc

340 notes
extremely reliable when connected to data
bounces around networks when not connected to data and is slow to respond
searching problem has no fix but may be related to phone type sim card
has error sometimes that has it staying connected to data when device goes to sleep
when connected to data and host awakens the device will be unresponsive
if unresponsive the only fix is to power cycle
a power cycle requires physical movement or a switch on most hosts
as mentioned before one fix is to script a disconnect before sleep
another fix is to put the device on a hub or wiring with an off switch for sleep

kamoso
replaces kamerka
needs gstreamer1.0-plugins-bad
preview looks like it has a red hue but actual capture is fine

xvkbd failures
when typing a window covers the numbers making them unusable
hold right click on xvkbd/choose property/unchoose integrate completion panel

new distribution onscreen keyboards
matchbox - broken - wrecks other windows on screen
onboard and florence - not tested
xvkbd - works ok
QT_IM_MODULE=qtvirtualkeyboard nameofprogram
.bashrc works only for falkon and /etc/environment works for all qt programs
may need to remove dictionary to prevent autocomplete and gesture conflicts

model 39 proposal
rebuild model 37
use custom 3s battery pack
use usb-c charging plug


Custom battery pack development

summary
the benefits of higher voltage input are clear for stability and battery life
however the existing 3s batteries use low quality cells and electronics
with a diy series battery pack there is potential for improvement

balance charging proposal
2 small charge boards can be added with a single microusb between them
also a so called 2s charger board could be used

the first question is whether 2 is going to be significantly thinner than 3
2 x 16000 mah batteries are the same thickness as small blue 3s but more capacity
2 x 4000 mah batteries are about a third the thickness of small blue 3s
3 x 4000 mah batteries are about half the thickness of small blue 3s

the second question is whether the lattepanda can work from 2s lithium ion
3s balanced is out of the question because of electrical complexity
2s may be more efficient than 3s because step down to many 5v components is less

no way that a usb-c powerbank is going to work better than this
it uses up the usb-c port
it will have poor plug and unplug behavior with external power
it is rated for capacity at 3.7v so the largest will be only like small blue 3s
it has a cover and extra electronics that will increase the size

necessity of balance charging
this is really not necessary and a shame it has taken so long to realize this
to be super safe an individual charge connector could be added to each battery
the device could be shutdown and each battery charged individually if necessary
the blue 3s batteries may not even use balance charging anyway
this would allow for 3s 4000 mah packs if necessary without any circuitry

given the lack of alternatives and balancing is not necessary a pack can be specified
2 x or 3 x 4000 mah packs
charge connector
power switch
voltmeter

thickness
new device - 3cm or 1 1/8" - failed
second new device - 3.3cm
existing device - 6cm

new device
5" screen
lattepanda delta
2s 4000 mah lithium polymer - failed
long slim cellular device
direct switched usb ports for cellular and screen

2s failure with lattepanda delta
not enough voltage
there is no recourse

would a single 4.2v charger in parallel with 3 batteries work???
batteries cannot be connected in series and in parallel
even to just a charger not to themselves???
to charge with one charger they would have to be in parallel which is impossible

concerns about lack of balance charging
it seems that one battery could indeed over charge
a scary proposition
we should continue on with 3s regardless because there is little choice
3 individual chargers externally or internally is too complicated
3 individual chargers externally or internally could cause ground loop
really the fear may be overblown because it seems that the charge would self regulate
using external charger balancing feature would be too clumsy
can use 3s bms with balance if this fails and the project survives the failure

2s advantages vs 3s
smaller
cheaper
lighter
safer
simpler


ARM development with VIM 3

vim 3 recovery procedure
in the event the os is rendered unbootable
ideally a backup should be made regularly with usb burning tool
a backup should be made with usb burning tool to recover recent files after a failure
restore old backup or modify existing backup externally or flash new os and start over
this is a clear disadvantage to an arm device with emmc storage

power usage figures
x86 control is .041a at 12.60v at sleep with 12.6v indicated at battery
model 38 sleep - .026a at 8.40v with 8.32v indicated at battery
model 38 sleep - .026a at 8.45v with 8.40v indicated at battery
model 38 alternate sleep - .031a at 8.45v with 8.41v indicated at battery
8.45v should be top voltage to avoid battery damage

vim 3 usb-c connector
supposedly outputs vin voltage on usb-c
but perhaps not because version 13 usb-c wiring is different from previous
test usb-c voltage - definitely in parallel with vin connector - dangerous high voltage
could possibly still be used witb usb-c devices that expect a higher voltage

falkon touchscreen support
3.0.0 works with touchscreen on lenovo tablet control
3.0.0 works with 4.3" touchscreen on vim 3
one way to handle this is to use main thread or child script to toggle easystroke
easier way to handle this might be to disable easystroke up/down action - failed
the best way is to add an exception for falkon within the easystroke configuration

asoundrc discrepancies between devices
0,4 instead of 0,3 for device
35db instead of 20db for volume boost

touch and input improvement program
install qtvirtualkeyboard-plugin for good virtual keyboard
edit /etc/environment to launch keyboard with qt applications
turn on kde compositing and set animation speed to fast
up script changed to send single up
down script changed to send single down
cancel action added to easystroke
cancel script added to send ctrl-c
add easystroke exceptions for touch capable programs like falkon

VINdication for the VIN
the vin connector electrically is fairly equivalent to USB-C
the vin connector is however mechanically fragile
screen dimming issues from a defective vim 3 were present with the vin or usb-c
using the vin connector would free up the USB-C for backup and restore usage

retroarch build
clone git://github.com/libretro/libretro-super.git - not large - not retroarch
libretro-fetch.sh with retroarch as an argument will grab retroarch alone
other fetch arguments will grab specific cores
build-config.sh and /dist/info has emulator specific information
can cd directly to retroarch folder for special compilation
special retroarch compilation can include flags and manual jobs adjustment
./configure --help will show build options
--disable-kms needed to avoid linking error during build
--disable-wayland / --disable-pulse for convenience
--disable-x11
this results in successful build but no display drivers are built
--disable-xrandr instead of --disable-x11
this results in successful build that starts but with a black screen
--disable-x11 and --enable-sdl
this results in successful build and successful display
dependency - libxxf86vm-dev
dependency - mesa-common-dev
dependency - libx11-xcb-dev
dependency - libsdl1.2-dev

retroarch build error notes
with just --disable-kms --disable-wayland --disable-pulse the build fails
errors reference xf86vidmodegetmodeline
one way to fix is to add LIBS := -lXxf86vm -lpthread in the makefile
this fix seems to allow compiling with the implied x11 option on
instead a second fix was to compile with --disable-xrandr
this second fix also allows compiling with the implied x11 option on
the x11 option gives a black screen with the second fix and unknown with the first
thus the entire operation may be a red herring
retroarch works with the sdl option with --disable-x11 --enable-sdl instead

retroarch controller woes
controller input fails in retroarch
usb controller mode fails also
lack of /dev/input/js0 and lack of jstest working is red herring
working input driver is x in example
working gamepad driver is udev in example
linuxraw gamepad driver was default and broken
udev gamepad driver was unavailable
sdl gamepad driver works
x11 gamepad driver not tested

retroarch operational
pair joystick
set retroarch joystick driver to sdl
set retroarch audio driver to alsathread
set retroarch joystick buttons
set retroarch menu joystick start+select option
set retroarch menu swap ok and cancel buttons option
set retroarch scale 3x/window size 720x720/custom window size off/no kwin overrides
copy game
copy bios
no core downloads available for arm64
use libretro-fetch to download pcsx_rearmed
make -f Makefile.libretro without configuring to compile pcsx rearmed
set pcsx threaded video to async
set pcsx sound reverb to off
set processor to interactive governor/BIG cores on
internal fps is a red herring
alsathread driver and BIG cpu cores on are the keys to performance
alsathread driver is much clearer
something about BIG cpu cores make them much better for emulation
the BIG cpu core advantage is particularly noticeable in sound quality
BIG cpu core performance is decent with FMV and better with rendering
LITTLE cpu core performance is bad with FMV and marginal with rendering

retroarch psx emulator testing on vim 3
testing with chrono cross
pcsx rearmed - works perfectly if given enough power
pcsx1 - crashed after compiling and loading iso
pcsx2 - listed in build-config.sh as a ps1 emulator but is a ps2 emulator
rustation - requires rust dependency and not recommended by gametechwiki
duckstation source - build failure - "cannot convert 'bool' to 'EGLNativeWindowType'"
duckstation binary - obtained but not reliably tested
mednafen - compiled but not reliably tested
mednafen hw - build failure - cannot find -lgl
system overheating prevented reliable performance testing - should test again

fbturbo
compiles successfully
fails with black screen on /dev/fb0
fails with error "Undefined Symbol: xf86DisableRandR" on others
use https://github.com/KenjiBrown/xf86-video-fbturbo.git instead
switch branch to aarch64-gentoo
error: "no 3d acceleration because the driver has been compiled without libump"
driver is larger but seems no faster because of the error when built with libump
error is gone after reboot
changing framebuffer numbers from 0 causes black screen that is recoverable
system overheating prevented reliable performance testing - should test again

vim 3 emmc file recovery
decompress all images before writing
usb boot with ubuntu is red herring because emmc access is not possible
krescue on micro sd works fine - does krescue work from usb???
prepare partitions for mounting - aml_partitions -m
mount rootfs emmc partition - mount /mnt/rootfs.loop /mnt/rootfs
tst/maskrom mode does not seem to be required to boot from micro sd
keys/upgrade mode is required to boot from usb
one way to recover is to keep the micro sd card loose in slot and pop in when needed
chmod -x /usr/sbin/lightdm to disable lightdm to prevent black screen at start

retroarch psx performance summary
game tested is chrono cross
pcsx reloaded is actually ok at 720x480 custom window
another thing to try would be retroarch framebuffer compile like on model zero
unfortunately overheating is an issue here
more heatsinks would be ideal
a fan would seem to be better because heatsinks can become saturated to a point
BIG core underclocking would be a good idea
LITTLE cores overclocking did not work well in the past
around 1400 mhz is sufficient for good performance from BIG cores
this is a tremendous development as it saves a lot of power
fan installation was also hugely successful and moves incredibly more air than expected

new debug menu
power profile concept added
power profile 1 - LITTLE cores on/BIG cores off/interactive/default frequencies
power profile 2 - LITTLE cores on/BIG cores on/powersave/1400 mhz BIG core limit
power profile 3 - LITTLE cores on/BIG cores on/powersave/default frequencies

history lesson
there was a push for palmtop computers back in the late 1980s
one particular aspect of these palmtops were pc compatibility
indeed they were seen to compromise usability for small size
this strikes me as a similar to the mobile internet device project today
in the sense that android is not pc compatible and the x86 mid is
even the arm mid is more pc compatible than a typical android device

bloatware status between architectures
pulseaudio - x86 no - ARM no
systemd - x86 no - ARM yes (breaks everything to remove)
network-manager - x86 no - ARM yes (breaks sleep to remove)

Phase 6

Focusing on x86 only


Software

bluez quirks
antenna position may be a red herring
tinfoil connected to antenna did not help
keyboard worked better without tinfoil and with antenna nearby
bluez-obexd needs to be installed to send files and browse files
pair/trust/authorize needs to be done to receive files
windows tablet needs to be set to receive files
as mentioned before send and receive works fine with windows tablet with both mid
blackberry can search/pair/send to alpha at short range
alpha fails immediately when sending to blackberry
linux laptop and alpha cannot see each other
blackberry can search/pair/send to delta at normal range with better transfer speeds
delta fails immediately when sending to blackberry
linux laptop can see delta but delta cannot see linux laptop
send and receive works fine with linux laptop and delta
failing when sending to blackberry may be a security problem with the blackberry
a file was able to be sent between alpha and delta after repositioning several times
the conclusion in the end is that the alpha has an incredibly weak bluetooth subsystem
change discoverytimeout in bluetooth main config for bluetooth visibility permanence
definitely helps to have the alpha second antenna installed

linphone quirks
all network ports should be enabled by checkbox in version 4
this avoids tcp and tls failures
this avoids immediate call failures
this avoids failure to login
asoundrc should be setup correctly in version 3
this avoids having to pause and unpause to hear audio
this avoids failure to capture audio
this avoids poor network connection red herrings

more linphone testing
immediate outgoing call failure with 503 service unavailable
echo test calls work and incoming calls work
check mobile internet device on home internet connection - not needed
check that all ports are checked in version 4 - not needed
check with voip.ms support - found calls were blocked as part of a security measure
authorize calls through email to fix
one quirk is that outgoing calls do not ring and immediately connect
another interesting fact is that udp mode works fine and with direct connect no stun

mpv performance
performance governor generally still needed with the following
--vd-lavc-threads=4
--vd-lavc-fast=yes
--hwdec=auto
--vd-lavc-framedrop=all
--vd-lavc-skipidct=all
--vd-lavc-skiploopfilter=all
performance governor not needed with --vo=xv
default --vo=gpu has bad speed and black screen problems


Power system

sleep power evalution
aoxun pc stick experiment - .123a x 8.44v = 1.03 watts
lattepanda delta control - .040a x 13.8v = .55 watts
android phone control - .003a x 4.2v = .01 watts
lattepanda alpha control - .063a x 12.65 = .79 watts

model 42 power usage figures
.650a at 8.44v idle at desktop / now .500a
.725a at 8.44v idle with main thread
.123a at 8.44v sleep

model 44 power usage figures
.280a at 12.63v idle at desktop
.310a at 12.63v idle with main thread
.040a at 12.63v sleep

strength of lead acid in application
the best battery life may paradoxically be achieved by this type
due to peukerts law the performance of these batteries in this application is high
the batteries are rated for 1 amp or higher discharge rate in their design capacity
a small pc is always going to be below 1 amp at 12v at idle or sleep
these batteries often run motorized equipment and the like so a small pc is a low load
in practice their voltage drop is low and effective capacity high
cost/reliability/availability/recyclability/ease of construction are also factors
their utility use is inversely proportional to their fanciness in a mobile device
similar effect is seen in large lipo batteries meant for power applications with high c

limitations of laptop usb-c battery packs
laptop battery packs generally needed for lattepanda delta/alpha
documentation calls for 45w 15v output for power supply even though dc input can be 12v
usb-c is required because this is the only connector that supports the pd standard
power delivery allows for the highest voltages and currents
virtually all of these have a combined usb-c in and out with inherently no passthrough
insignia laptop usb-c battery pack would allow the alpha to sleep for 100 plus hours
however the use case would be pretty different
the device would stay shut down and charging after use at home
the device would stay asleep after use while away
easiest way to switch is just to plug and unplug
could consider using another usb-c charger to power device while battery is charging
ultimately this would discourage use of the device
ultimately it would still be pretty large and need a special right angle usb-c to usb-c
ultimately it is good to keep for backup and testing usage
single input/output for all these laptop usb-c battery packs seals the deal negatively

weakness of abenic 6800 mah 12v lithium battery
this battery is really 1800 mah which it does feel like it has
voltage drop is bad because the load is close to .5c - like 50a on a 100ah battery
talentcell has a 6000 mah 12v lithium battery but it uses less dense cylindrical cells
a better alternative is rc lipo batteries although they need charger extensions
the existing 7000 mah is not bad
there are 2 smaller zeee premium 3s 5200 and 4200 mah lipo batteries available
the 4200 mah battery is much smaller and no larger than a custom 3s lithium battery

battery testing regime for comparison
abenic "6800 mah"
3:01 - 12.2v at start / 3:35 - 11.8v / 3:50 - 11.7v
zeee premium 4200 mah
9:03 - 12.4v at start / 9:33 - 12.2v / 9:48 - 12.1v

custom 3s lithium battery testing
2 custom 3s battery packs have failed with end battery discharged or in protection mode
these custom battery packs are unbalanced
custom 2s packs are more reliable
sleeping often is one key to to try to avoid failures
not exceeding 12.63v charge voltage is another key to try to avoid failures


PC stick

the thickness problem
previously most x86 mobile internet devices have been very thick
arm based designs are much easier to make thin with lesser battery requirements
lattepanda delta and alpha require a huge 3s or 4s high capacity battery
lattepanda original only requires a 5v input
a step down to 5v does not have to increase thickness but only footprint
experiments have shown a custom made non balanced 2s lithium battery is reliable
this type of battery is fairly thin and small
this kind of device should perform not much worse than lattepanda delta
delta not only has a worse cache and ipc but does not have avx extensions like alpha
fundamentally any mobile device based on delta or alpha has to be a tank
it is hoped that another small x86 sbc with more ram and power will come along

pc stick notes
kde power button handling disabled in power settings to disable menu when waking up
add pi user to bluetooth group to enable kde bluetooth integration
smbclient installed and smb.conf edited to add max protocol = SMB3 to main to fix samba
turn off proxy settings that were mysteriously on in falkon to fix page loading hangs
s2idle is sleep default instead of deep sleep
seems to never recover from sleep after specifying deep sleep
thus sleep uses somewhat more power than lattepanda delta or alpha
turn usb switch off before power is connected
turn usb switch on before pressing power button for bootup

reasons for higher pc stick power usage
cooling fan still running while asleep
step down converter inefficiency
linux kernel not taking full advantage of hardware
design shortcuts by manufacturer
differences in ram power usage
more ram than delta model

advantages of more advanced pc sticks
better processor
display port dual display out
possibility of better sleep performance
these three advantages are already present in the lattepanda delta and alpha

concerns about more advanced pc sticks
power draw could be higher due to cpu and integrated ethernet and displayport
no guarantee that s3 sleep can work
could result in thicker device due to bulge at end of pc stick for ethernet
time may be better spent developing proven designs in the lattepanda delta and alpha

new pc stick usb hardware implementation
testing voip calls has revealed a longstanding problem with power stability
this has happened many times in the past
the dual input hub custom design has proven somewhat unreliable
screen flickers and resets and general usb resets and instability are a problem
lattepanda delta/alpha would need 2 cables tied together with switch like old design
pc stick would need thick cable for screen and hub tied together with switch
this procedure is optional with model 43
this procedure is necessary with model 42 and will simplify wiring by tossing a hub
the necessity comes down to the fact that the 5" cuts out and the 4" flickers
the cutout is unacceptable and the flicker merely annoying
in other words the dual input hub method is better for the 4" screen
in other words the 5" screen necessitates a dedicated switched cable

wiring harness of last resort
for weak usb subsystems
this is a three way wire with hub/cable then cable then screen power cable and switch
this uses both screen power connections at once
this should not be needed


Gaming

simcity 2000 ps1
only 2 zoom levels but both are very zoomed in - terrible
no free cursor movement - only center and 4 quadrants can be focused - terrible
performance is good

simcity 2000 snes
2 speed levels
2 zoom levels though they are reasonable
performance is not bad when the system doing the emulation is configured properly

simcity 2000 saturn
3 speed levels
has 3 zoom levels with about same zoom out as snes
performance may be slower than snes

simcity 2000 pc with wine
this is surely not necessary
the screen elements will be very tiny to interact with
there will definitely also be other troubleshooting

simcity 2000 nintendo 64
japanese only
no translation available

simcity 64 dd
the city is presented in full 3d graphics
unfortunately distance fog is a major problem and zoom is limited
mupen64plus standalone default rice video plugin has buggy blue terrain on load
the only plugin that will load on mupen64plus 2.5.9 is gliden64
the gliden64 plugin does not support the option to disable fog
technically if the rice or glide64 built in plugins would work they could disable fog
nightly builds have issue with media loader
mupen64-next for retroarch has no renderers with a disable fog option
parallel for retroarch has no working renderers with hangs before loading
a working nightly version or new release of standalone mupen is needed to disable fog

simcity 2000 on mid specifically
saturn version requires at least on demand governor to run smooth
snes version performs at full speed on powersave governor with snes9x 2005
3 to 4 aspect ratio looks best with snes
instead of choosing aspect ratio choose custom and use 720x960 with 30 pixel y offset
all console versions have limited zoom out which makes them useless

flawless simcity 2000 on mid
simcity 2000 special edition used
the complication and resource usage of newer games does not translate well to mid usage
copy win95 folder from iso and 32 bit install shield into wine drive c to install
set wine to windows xp and not to emulate a desktop
set kwin custom window not application size to fill screen
hold script for a lower case h gesture that allows for hold click choosing zones
zoom in script with a clockwise circle gesture that sends home key
zoom out script with a counterclockwise circle gesture that sends end key
laying out roads works with easystroke and the touchscreen by default
mass moving the map works with easystroke arrow key emulation
focus and bulldozer and landmark deployment work through default touch controls
press enter or load to bypass no cities in file chooser wine bug
make convenient kickoff wine simcity shortcut with terminal and launch feedback

overlay response failure
retroarch has a delay before an action registers with the overlay
test without script - poor response
test with keyboard mouse - poor response
test retroarchgui change - poor response
test different overlays - poor response
test switching retroarch input driver - all have poor response or do not work
test easystroke registering on second touch - does not register
test mouse overlay response on windows - works fine - september 19 2021 build
test newly compiled version - poor response
test switching newly compiled version input driver - poor response
test disabling easystroke - this fixed the problem

hybrid approach
use left first directional control only
on right second screen tap on any location send a button directly
easystroke actually can not be used because of the latency problem
but choosing the top or bottom of the screen could switch between a and b
it is unclear top/bottom sensing would have any benefit to just using the overlay
unfortunately this means there is no easy way to emulate more than one button this way
it does work reasonably well for jumping mario around however and is more portable

touch overlay the hard way
full bash dialog controls that send variables when clicked for full low latency control
this would be a standalone touch controller program essentially

retroarch setup
fairly new version required to position overlay
force retroarch resolution in kde
set custom 720x960 aspect ratio
adjust screen edges if needed
toggle old snes portrait overlay
toggle show overlay in menu
set overlay size and position
specify alsa audio driver
map controller buttons
set reverse a and b menu buttons
set select and start buttons for menu
set core updater to true in retroarch config file
set new core directory for retroarch
genesis plus gx core has good genesis performance
snes9x 2005 has good snes performance
zero 2 set to switch mode with start and y and then pairing mode with holding select
zero 2 is not reliable with disconnects and repairings required
steelseries free is reliable


Miscellaneous

dd records
the concept of records is how many blocks dd has written
usually these blocks are 512 bytes
fdisk -l will show the block size on an existing drive
if 240000000 records have been written with 512 byte blocks then a 120 GB drive is full

esata and large drives support
old gateway laptop does not support 1tb ssd and has no relevant bios options
old gateway laptop is usb 2.0 only and has no high speed bus except for mini pci
asus gaming laptop has esata and supports 1tb ssd with ide compatibility mode in bios
asus gaming laptop apparently does not support esata hotplug within the os
asus gaming laptop does not support scanning for newly inserted drives within the os
asus gaming laptop can go to bios and change drives
asus gaming laptop has strange double restart quirk when choosing boot drive

update uuid on partition
partuuid or uuid can be used by grub but partuuid must be specified
best to just use uuid
watch uuids with blkid
boot recovery change with tune2fs -U random partitiondevice
update fstab with new uuid manually from recovery
grub can be updated with install-grub from recovery
also grub can be updated by using find and replace with the new uuid in grub.cfg
this method allowed for keeping a newer boot structure on a legacy system
installer boots in bios mode on the old system so grub-install wants to convert to bios
but just editing grub.cfg allows for keeping the drive portable to newer systems

antenna availability
ipex also called mhf4 is in use throughout the project
this is the connector used on the lattepanda alpha and delta
this connector is also used in m.2 4g devices
drone fpv antennas are convenient in this application


Future hardware points

reasoning to replace model 43 with model 44
small bluetooth keyboard is not very practical
4" screen is harder to read and play games on
4" screen has possible design flaw
thicker design
taller design
screen flickering due to dual input hub method
less practical charging method
usb-c connector is not available for dual display

4" screen design flaw
the issue with lines through the screen is a recoccuring problem
seems to have happened on model 43 but model 43 is decomissioned anyway
the problem could appear at random
the problem could also be caused by the screen sleeping for a time but still powered
the 5" screen is preferable anyway despite the tn panel viewing angle issues
working with the 4" screen does not save much space or power over the 5"
the ips technology in the 4" screen is apparently not mature enough in this application

proposed model 44 alternate specifications
could use lattepanda alpha instead of delta
this would allow for better processor and more memory
would only lack software switched usb ports and m.2 4g module support versus model 45

proposed model 45 specifications
5" screen
lattepanda delta 3 - delta 3 has updated design process cpu and 8gb ram
no switched usb ports needed - delta 3 supports software usb power control
custom 3s battery with regular sleeping to prevent failures and usb-c charge connector
m.2 4g module - delta 3 has sim card slot - this frees another usb port
bottom usb port freed for microphone usage
usb-c port freed for dual display usage
no extra hub for space and power savings

Phase 7

Bringing it all together and tying up loose ends


Miscellaneous Developments

the race to the finish line
really the fight has been won for some time with these devices
the 5" devices are quite small and light and have reasonable battery life
the 7" devices promise to be more usable for work and play
the new oled 5" screen or 5.5" screen may make both device lines redundant
with good clarity and power usage the new screens could make the ultimate device
similar to how large and clear screen smartphones have made tablets redundant
so far the mid screens have not been quite large or clear enough or too large

model 45
first freebsd mid
uses udoo x86 ultra version 1 with 7" improved 1280x720 screen
zte mf861 cellular and basic audio amplifier and no bluetooth
working sleep function and zfs mirror with emmc and micro sd
multitouch functions and touch response is good
no runtime scripts just web browser/email/sip phone and sms

new mid ideas
hard to know where to go from here
performance and gaming is not that important
fitting in the custom bag pocket is important
very high standby time is important
sleep life of 5 days is considered sufficient

model 46
economy mid
uses vim 3 with 5" screen
1 7000 mah 3s is very high 8.3 days sleep time at 35ma
fits in custom bag pocket for convenient transport
has vim 3 feature of easy sleep
fast enough for emulation

basis for model 42 rebuild
model 44 is the superior design so should not be changed
slightly unstable with power draw of existing 5" screen
easy to move due to screen-battery-device design instead of screen-device-battery
battery is awkwardly tilted on the screen on the existing design
already partially disassembled and decomissioned
flat battery edge makes potential for thin design second only to model zero

model 47
model 42 rebuilt as ultra modern mid
uses pc stick with 5" oled screen and micro amplifier
side by side 12v battery configuration for 40 hours sleep time at 100ma
improved readability for gaming and business use
fits in custom bag but fails for high standby time
fast enough for some pc gaming

conclusions for now
compiled from new ideas section and race to the finish line section
clear that fitting in the custom bag is a priority
clear that a reasonable standby time is a priority
clear that an easy to read screen is a priority
clear that low power during usage is a priority
clear that devices thinness is a priority
interesting to contrast these priorities to the ones at top of page

oled 5" screen observations
might be fragile so build on top of foam
is the clearest screen ever observed here looks like 4k
turns off when no signal received
may not be picky about resolution worked on first try
touch works brilliantly and on first try
does seem to be fixed at 960x544 resolution
fixed resolution does not keep from scaling in software in xorg

model 47 power usage
has amplifier drawing 5v power also
.4-.5a at 12v idle usb on device awake
.2-.3a at 12v idle usb on screen asleep device asleep
.1-.2a at 12v idle usb off device asleep
seems to use about 10ma per hour when in converter power save mode
about as expected as pc stick does not have deep sleep
seeing .3-.4a with web browser open now for 13.3 hours usage at 300ma

changelog
portrait mode - specify 960x544 and hardware id
touch debug - specify hardware id
kwinrulesrc - change for lower resolution
edit falkon default page zoom to 67%
set tray icons to minimum to deal with lower resolution

linphone user interface notes
kwin cannot resize linphone beyond a certain size for some reason
best to start linphone at 500x500 which is beyond the minimum
also best to position linphone at top only at start so finger can drag
finger drag does work for now but not sure if it will stay working so not ideal
can close linphone and reopen to have kwin reposition
microsip may be better if user interface size continues to be a problem

on the suitability of screens
5" oled is better for pc stick because of lower power draw
the usb power system on a pc stick is marginal
5" standard is better for lattepanda because of integrated amplifier
there is little space left for an amplifier with a lattepanda

early charger shutdown
charger can wrongly detect that charge has finished when device is sleeping
this does not happen with a dedicated power supply because they charge always
the charger is needed here because of the balanced battery
best to keep usb switch turned on while sleeping on charger
this always gives the charger a load to work off of so does not stop charging


Ongoing with x86 Linux

delta 3 observations
no lights turn on by default when first plugged in
auto power on feature disabled by default
usb cutoff during sleep appears to be enabled by default

proposed camera solution
front and rear cameras can be added
logitech c270 stripped and taped to each other on top or bottom
microphone on one camera can be used
room for 2 usb cameras and 1 screen with delta 3 with integrated cellular

sensor situation
lattepanda delta 3 can monitor voltage in bios
unknown if 12v is regulated or not
lm-sensors does not detect voltages

hibernation
create swap - dd if=/dev/zero of=/swapfile bs=1M count=512
format swap with mkswap
find offset with filefrag -v nameofswap and look for first physical offset no dots
edit fstab with swap file name like /home/pi/SWAP none swap defaults 0 0
find uuid of partition that swap is on with blkid
edit initramfs resume with RESUME=UUID=UUIDNUMBER with no quotes
edit initramfs resume with resume_offset=OFFSETNUMBER behind UUID with no quotes
edit /etc/default/grub GRUB_CMDLINE_LINUX with resume=UUID=UUIDNUMBER with no quotes
edit /etc/default/grub GRUB_CMDLINE_LINUX with resume_offset=OFFSETNUMBER behind UUID with no quotes
update grub with sudo update-grub
update initramfs with sudo update-initramfs -u
first resume is capital in initramfs and lower case in grub
uuid must be partition that contains swap not uuid of swap itself

new kernel
kernel 5.18 was needed to support delta 3
this was needed to allow xorg to start
error was a lack of /dev/dri/card0

display manager failure
not going to be using a display manager anymore
all references to lightdm and sddm should be deleted
remove lightdm and sddm from tree
remove lightdm and sddm from kde 64 applications
install xinit
inittab needs to be edited on vterm section
1:2345:respawn:/sbin/getty --autologin pi --noclear 38400 tty1
bashrc needs to be edited at very end but not xsessionrc or xinitrc
echo "Starting Xorg in 5 seconds"
sleep 5
startx
never again with the display managers because they always fail

m.2 cellular troubleshooting
no connection
signal is always 0
sim is good and shows phone number
mmcli -m 0 for status
initially not sure if it is an antenna or cellular device problem
turns out that device is not north american band capable
device replaced
other 2 devices are a nightmare
power usage/space/sleep ability are not much of an advantage anyway

model 48
new design with focus on usability
uses lattepanda 3 with 5" standard screen
custom 3s battery with unlimited hibernation time
improved readability for gaming and business use
fits in custom bag and usb ports turn off hibernating
fast enough for almost all pc gaming

model 48 customizations from beginning
edit bashrc for auto login and startx
remove gir app indicator from kde 64 applications
switch iceweasel for firefox-esr for kde 64 applications
remove those default icons from bar
set windows controls to the largest size
turn off screen locking
turn off screen blanking
remove pulse audio
remove kscreen
set to start a new session at login
customize kickoff icons
recompile easystroke due to new libboost serialization version
copy easystroke configuration
copy portrait mode and 2 essential touch scripts
remove retroarch helper utility reference from portrait mode
update portrait mode for compatibility with all current devices
edit xinitrc to start portrait mode because not starting with bashrc
edit xinitrc to run startplasma-x11 because does not run with blank xinitrc
setup qt keyboard in /etc/environment with QT_IM_MODULE=qtvirtualkeyboard
copy gesture action scripts
install 2 bluetooth firmware files
add quicklaunch on panel for on screen keyboard script with keyboard icon
move hunspell en_US.dic to disable qtvirtualkeyboard suggestions
copy signal icon python script
copy battery icon python script
copy notification icon python script
copy signal readout variable file
copy zoom in gesture script
copy zoom out gesture script
copy sudoers for user dhcp permission
copy rc.local for power management
copy notification/signal/battery icons
setup kwinrulesrc for linphone
rebuild main thread
3 python tray icon scripts edited for ayatanaappindicator

model 48 changed files
main thread kde to main thread kde mini
rc.local
xinitrc
bashrc
sudoers
kwinrulesrc
portrait mode
2 bluetooth firmware files
signal icon script
battery icon script
notification icon script

model 48 software paradigm
can be used without main thread
just run email/phone/dhclient
the kde network monitor can be used to show network connection
this would be the level 1 config
level 2 config would be current with mini main thread
level 3 config would be integrated control with 313/340 with full main thread

model 48 power usage figures
all tests with eup mode turned on
convenient hibernation - .050a at 12v main power switch on
after power on to bios and power off now seeing .030a
transport hibernation - .000a at 12v main power switch off
.290a at 12v idle with screen on cellular on
.225a at 12v idle with screen switched off with button cellular on
after a few hours now seeing .450a
because battery gets a bit run down when system is under load and voltage drops
the reduced voltage with the same power means current must rise
thus current is closer to 500ma when battery is very low
this is one of the reasons that the device default state should now be hibernate
this means the battery is really only fully charged when shutdown or hibernating

claws mail setup
email login must be full email
ssl and not starttls is ok
rebuild folder tree if there is a login problem

linphone login nightmare
sip with colon at beginning of user name cannot be removed
this allows for the button to add the account to become ungrayed

linphone ui issues
since version 4 kwin cannot force size
set size to 100x100 to get minimum possible size
set position to -120x0 to allow call end button to appear on right of call window
contacts and previous calls can just be manipulated on the left
call by tapping a previous call or contact and pressing call
call by typing in the top bar and pressing call
minimize by pressing the linphone button in the tray

after the honeymoon
delta 3 has less advantages than thought
m.2 cellular turned out poorly
usb poweroff was not available during sleep
power usage and heat is substantial with 30 or 50ma used even in hibernation
an original delta with system power switch would be fine
this device could hibernate then the system switch is powered off
with system power switch/hibernation the new and old device would be zero power
so new and old mid still require doing a thing in software and then using a switch
does have better cpu/more ram/more emmc storage

end of the kwallet bad dream
now kwallet does not need manual configuration to disable
just turn falkon passwords to plaintext in falkon options

voltage monitoring
delta 3 can view system voltages in bios
lm-sensors on linux does not see any voltage sensors
openhardwaremonitor on windows does not see any voltage sensors