Sunday, September 22, 2019

The pretender: Fooling 3dmark SkyDiver to test your card

This is a quick post about a funny discovery I made when testing a GTX 460 I received second-hand.  I also received a GTX 550 knowing that it needed a GPU fan replaced, but, in a PC built from the usual modular pieces, I put in both cards just to see if the drivers would squawk about the SLI cable I affixed between them.  It did not, but it neither activated SLI.  I ran the Sky Diver benchmark and the GTX 460 completed.  Power off. I slapped on a fan to the GTX 550 which required removal of the GTX 460 due to the unsightly tape-fastened fan and it benched slower than the GTX 460. Power off. Swapped in GTX 460 in place of the GTX 550, and launched the benchmark.  But the benchmark stated I needed a capable video card.  It reported the GTX 460 as the video card installed in the system.  Power off.  Removed the ad-hoc fan from the GTX 550 and installed it in the slot neighboring the GTX 460.  Power on with both cards. Run benchmark.

My takeaway: you stand a chance of benching other DirectX 12 cards if 3dmark's Sky Diver detects you have at least one card capable of running the benchmark.  

This does make me wonder how awful a GT 630 performs on Sky Diver. The passmark video score for a GTX 460 is around 2,600 and the GT 630 - later generation but really tiny - was below 900.

Saturday, September 14, 2019

Good eve-ning

In my last post,  I stated that I was all done installing Chrome OS on ordinary PC laptops.  For the next month, I have changed my mind. The same evening as writing this post, I gave one last visit to my Chrome installations, and accidentally discovered a fix to a sign-in problem I had with Eve on my devices.  Almost all of my devices on which I can sandbox Chrome OS are absent a TPM 2.0 module, which I believed was the reason why I could never complete sign-in on a fresh install.

The discovery happened while upgrading an installation of Glimmer.  Glimmer successfully updated from 68 to 76. By grabbing the PARTUUID and a little magic with sed, verity booted with vmlinuz extracted from /dev/sda4.  Skip over the next point. I included it only to jog my own memory.


  • The actual image resided on an SD-CARD on which I had installed Glimmer as a way to squeeze some extra life out of a ASUS Chromebook with a crippled eMMC.  Although updates would attempt to install, it reported that no updates were available solely because on the ThinkPad Yoga 11e (20de) the internal disk drive didn't have /dev/sda4 and higher.  Apparently a check is made before downloading, and part of the check validates there's a partition to accept the update.


After the update, I had a new message stating that this was the last release of Chrome for my device.  It also meant that no further updates were allowed. That triggered my interest to follow in the footsteps of Project Croissant and see if Eve would work as far back as a BayTrail CPU.

With this current update of Glimmer, I had no idea where the system recorded the flag that no further updates were allowed.  Even by advertising it as an Eve, no new updates were available.  I rolled back to 68, which invalidated my stateful partition - not exactly unexpected - but after getting to a console,  I redeployed Eve to a resized /dev/sda5.  This redeploy involved taking advantage of /dev/zram0 to hold the expanded contents of the Eve .zip  and losetup -P to expose the partitions.  Then a dd of /dev/loop1p3 to /dev/sda5, capturing /dev/loop1p2's, /dev/loop1p4's vmlinuz and kernel configs, and finally the /dev/loop1p12 EFI partition contents.

Eve booted with vmlinuz.A from its EFI partition, but didn't with the /dev/loop1p2 derived vmlinuz.  I realized that Eve has two different kernels in the dl-edge recovery image. The /dev/loop1p2 derived image was larger than vmlinuz.A.  /dev/loop1p2 also has cros_recovery in the kernel config.  This suggested I ought to use kernel derived from /dev/loop1p4.  And, so, I discovered that the /dev/loop1p4 derived kernel worked with verity.

I expected wireless, bluetooth and sound to be asbent.  eve-release/R76-12239.92.0 doesn't come with firmware for the Intel 7260-AC, and it doesn't load support for the sound chipset in my device, but modprobe snd-hda-intel solves it.  I learned that with verity turned on, I must pass lsm.module_locking=0 at boot.  I then used the same technique I previously wrote up for my Dell Latitude 5175 to get wireless working on the ThinkPad Yoga 11e.  Surprisingly, I was not presented with a fresh Chromebook setup dialog; however, the installation continued to report that it was the last update for my system.

This was good and bad news. The good news is that I was able to get Eve working with my BayTrail. That bad news is that the stateful partition would have to be powerwashed, and I would almost certainly be unable to complete initial setup sign-in.

The normal symptom from a newer ChromeOS on a BayTrail/Haswell has been a BIOS boot loop, the screen fades to white, or I can't complete initial setup sign-in.

To rid myself of the update flag, I would have to powerwash.  After powerwashing, instead of the Chrome splash, I experienced a boot loop in to the all to familiar recovery dialog.  Instead of counting up to 5 minutes, it rapidly rebooted barely giving time black & white to see the recovery screen.

I booted a live CD and formatted the stateful partition of the internal disk to ext4 with a volume name of STATE.  I rebooted back to Eve, and sign-in failed, as expected.  Sign-in would get just beyond MFA, and then spin for about 5 minutes before reporting that sign-in failed.

I repeated the sign-in process and the system became unresponsive. I then used CTRL-ALT-F2 and signed in to the text console as root.  There was a delay of several seconds before the text console came active. I ran the command top, and observed that flashrom was using a fair amount of CPU.  I killed off flashrom, and a new flashroom process appeared to have spawned in its place.  I killed it again, and top finally indicated the CPU was nearly idle.  I returned to the Chrome interface and I was now prompted with settings for my account.

This can many any number of things, but here are two possibilities:


  1. Eve now ignores TPM as a requirement and retry signing in will now complete first-time setup of a Chromebook.
  2. Eve tries to flash updates before permitting setup (sign in) of a new Eve Chromebook, and if that process times out, so does signing in.  Killing off the flash updates might be accelerating the sign in process.
  3. Dumb luck and timing. EDIT: 09-22-2019. I powered up the laptop and couldn't get signed in. I this happened on the 09-12-2019, but happened again. Although I had previously formatted STATE ext4, I found hints of legacy glimmer configuration under /mnt/stateful_partition/encrypted. Eve somehow snagged an update_engine config directive files and what looks like cache content, to which end removing them resolved the no more updates available issue, but after a restart, I could not get signed in.  Perhaps a previous accidental partial boot to glimmer corrupted STATE, or perhaps the purge of the glimmer containing data did me in.  I repeated the wipe of STATE.  And just like the issue on 09-12, I was unable to get signed in.  For what it is worth, I proved that even when Eve is allowing me t sign in, I can't get signed in when offline.  If I close the lid on an active session, I can resume.  If I power off, to get logged in next time, I have to be online.  Therefore, removing tpm_managerd isn't helping. Neither was killing flashrom on setup, other than, flashrom did appear to be a long running process during initial eve setup. Takeaway: It looks like that in addition to putting a layer over /lib/firmware, I'll have to put a layer over the place where swtpm should be deployed.   To keep with my desire to only use code from trusted sources, I will need to automated building my own swtpm.  I see Crossiant distributes the source code in the same spot as the .tar archive, yet the paranoid side of me thinks that binaries which process and contain sensitive user credentials are a good target for bad actors.  Building this myself is not the result I would like to have with eve; however, I feel it is better than building my own ROOT-A -B or -C, with or with other's projects, and then have to learn how to lock it back up with verity.  Or worse, disable verity.

Here's a strange behavior on my ThinkPad Yoga 11e running Eve:

  • Pressing SPACE-n-m produces a beep. EDIT: 09-16-2019 this actually appears to be a key-jamming indicator.  B-N-M also does it, but J-K-L does not.  H-J-K-L also beeps.

Friday, September 13, 2019

Polishing some Chrome

This is a short recap on my lack of progress over the last few months in making stock Chrome a solid platform for compatible hardware. I halted work on it when I found myself unable capture the kernel that most Chrome builds deploy to the KERN-A or KERN-B partition after successfully updating the ROOT-A or ROOT-B partition. 

By accident, I stumbled on to the very tool I needed in a bit of code for SuperSU.  That tool is futility.  The command line syntax of futility is self-explanatory.  After ChromeOS reports that you are up to date, use futility to extract the vmlinuz. The next dialog requires you have cros_debug passed to the kernel at boot and that a shell (CTRL-ALT-T) grants you root. UEFI boot is assumed in this example.  The EFI partition is normally partition #12 (/dev/sda12) and for my example I have mounted it under /tmp/sda12.

futility vbutil_kernel --get-vmlinuz /dev/sda4 --vmlinuz-out /tmp/sda12/syslinux/vmlinuz.B

The futility binary can also yank out the command line for the kernel, albeit having unresolved variables, for the kernel.  With a little comparison to existing entries in the grub configuration, it seems pretty straight forward that by fetching the PARTUUID for the newly updated partition and combining that with the remainder of the verity syntax, verity can be enabled.

In the small ground made moments before writing this up, I cut a corner by specifying root=/dev/sda5, but still cheered loudly when Chrome booted and reflected the upgrade from 68 to 76. 

Despite the small victory and the ease it would seem there is in automating updates with less than 10 commands, it is unlikely I will contribute any future updates on this blog.

While searching for answers to some of my own Chrome on PC laptops, I discovered that alternatives are bountiful. With several alternative sources for a Chrome hybrid installation available, FydeOS, AtB, Chromefy, any other write-up should be provided only because it has something the others lack and something and audience connects with. The alternative offerings keep improving and simplifying the update process, which in essence achieves what I finally scored today with futility, even if it does not have a parallel to my desire to preserve factory image integrity.

Furthermore, now that TPM's have become a standard part of Chromebooks, I suspect my fascination with making an uber Chromebook from an i3 or higher Windows or Linux laptop will fade, simply due to the challenge and implication of neutering kernel-based TPM security.

As a reminder, my objective was to provide a deployment method using only stock Chrome image, with Play Store support where factory offered, and result in a system successfully applies updates.  Now that this is complete, I am moving on.




Sunday, January 20, 2019

Epple, let's see!

If I happened to be in a cafe and if my ears latched on to any muttering of "Disk II," I suspect I would be unable to resist eavesdropping and attempting to penetrate the conversation.  I exhausted a tremendous portion of my childhood from 1986 until 1991, ensuring I could make a backup of every Apple II program I encountered.  Even the crappy ones like Shamus and Frogger.  I lacked any electrical theory foundation, lacked any oscopes or meters, and could barely program my own rudimentary Disk II machine code; there was no way I could create a 6&2 decoder, but fetching raw data wasn't impossible.

In a pursuit to reclaim my own fatiguing memory of the Disk II system and behavior of said games, I purchased (the absolutely fantastic) AppleSauce floppy drive controller.  


  • I refrain from using the designer's full name or storefront to avoid appearing on the first page of Internet search engines for would-be seekers of AppleSauce or other Disk II-ish topics.  As for AppleSauce, this isn't said enough: John thanks and thanks.


The AppleSauce controller has a continuously-developed software counterpart that smartly rips a flux image of the floppy media, and through its Disk Editor, permits exporting to the AppleSauce-driven WOZ1 and WOZ2 formats.  

Emulators are adopting mature WOZ support at an impressive rate.  The AppleSauce storefront details Apple II emulators with WOZ support, and like AppleSauce, many emulators continuously change.  Some need to be built from source.

I found that one emulator which does not require to be built, but does require OS X -- Gerard's fantastic work -- and sadly, for me, it does not work with the WOZ of Frogger captured by fouram.  I had a master Frogger disk in my former library, which worked on my enhanced //e back then. I get the impression it should work but the booted Frogger WOZ1 never gets too far beyond the Spiradisc banner before creating drive chatter.  If my memory serves me correctly, it should boot to window blind filled game screen.

I'm no stranger to building from source on Linux, but rarely have a I had to assemble all the aclocal, automake, and autoconf components.  

This post is an anchor to help preserve the steps (the right steps perhaps?) which resulted in a working Epple2 build.

  • Download and unzip xa65
  • Edit Makefile of xa65 to set DESTDIR = ~/
  • Run make
  • Run make install
  • export PATH=${PATH}:~/bin
  • Download and unzip epple2 (great work Christopher M!) 
  • Run aclocal
  • Touch config.h.in
  • Run automake --add-missing
  • Edit configure variable named ac_default_prefix=/usr/local to be =~/
  • Run ./configure
  • Run make
  • Run make install
  • Download and unzip Apple-II-Source (this produces applesoft.a65 and monitor.a65)
  • Run aclocal
  • mkdir build-aux
  • automake --add-missing
  • autoconf
  • Run automake --add-missing
  • Edit configure variable named ac_default_prefix=/usr/local to be =~/
  • Run make
  • Run make install

After these steps, epple2 booted after I kicked off emulation with F1.  Prior to addingapplesoft.a65 and monitor.a65, I would get a low-res screen of colors, which I thought meant something.  

I hope this wrte-up help saves time.

Friday, January 11, 2019

Hey HughesNet, how about giving me a real boost?

A year ago, family signs up for HughesNet. Family decides to buy the HughesNet booster - which in concept is a sound idea - especially since Family decided to anchor the HughesNet modem/router at one far end of the house, but Family has an old house, and outlets are few in number, and those in the ideal Wifi coverage zone are encumbered by either being part of the Dining Room or the Kitchen (it's a long narrow kitchen layout - annoying for the cook, for sure.)  So, that's a pretty much a "no," for slapping in a wall wart in a public or volatile space, and absolute avoidance of the "mancave" loose snaking-across-floor or taped-to-ceiling cabling approach.  Furthermore, an additional "no" to the use of EoP/powerline adapters as fixture infrastructure.

I give full points to HughesNet for simplifying the installation of the booster, but I - I - yeah - I cannot give any points to an overpriced ($99) booster which fails to implement PoE and fails to use a standard 12V "router" plug.

However, I have good news: inexpensive PoE splitters with yellow plastic tips can be ever so slightly altered to permit the slightly larger size of the center conductor tip of the HughesNet booster.  With a hobby knife, gently widen the inner circumference until it snugly fits in to the booster.

The model number of the splitter with which I first tried and had first success was a U5160+U6023.

With this alteration, a single cable can be run cleanly through the attic, a clean fixture mounting, and no wall wart.

Times of Lorex

Once upon a time, I played a wonderfully designed game called Times of Lore.  While rummaging through some of my old disks late last year (2018), I found the backups I'd made of the game in 1991.  The disks were still integral, which pleased me, since it had been before the turn of the century that I last toyed with them, and easily 9 years before that, that I undermined the copy protection scheme.  At that time, I was in high school, and I almost never recorded my procedures, but for this game, I distinctly remember that the Apple II DuoDisk drives were very noisy compared to the older shoebox shaped (Shugart) drives.  That noisiness always seemed to lend me a clue.  When booting the store bought master of Times of Lore, I could hear track seek noises similar to ProDOS 1.1.1, and after much trial and error, I found I could mostly close the spring loaded drive latch, but not all the way, and at a precise moment, rip out the disk and swap in a PRODOS disk with Copy II Plus.  If my memory serves me correctly, this gave me the chance to lift the data and write it back absent any raw copy protection.

That bit of history is merely a limp segue in to a matter that has been consuming much of time as of late: a Lorex video surveillance system.

A family member purchased a Lorex system and then expected some relative would set it up.  Until the lucky day that I successfully cross-train in to a different field, I will invariably navigate the agonies of family knowing I'm classically trained in computing technology.

Family was told that setting up a Lorex was easy.  Family was told wrong.  A few takeaways for anyone planning to install a Lorex:

  • the Lorex 4K cameras have an excellent consumer grade picture.
  • the Lorex NVR PoE ports are totally adequate, but the way Lorex coils up the 90 foot cables, renders the cables quite uncooperative.  In cooler weather, I have found it is easier to make fresh runs from a CAT5e spool and terminate both ends.  
  • the Lorex NVR requires a Chrome plug-in that cannot be resolved.  The next bullet point has the work around.
  • direct access to the Lorex 4K cameras successfully directs Chrome to NACL Web Plugin that can manage the NVR.  
  • a building that's pre-wired or at least has existing conduit for cabling drastically reduces deployment time.  
  • The individual cameras have username/password logins that should be changed, but out of the box, do not require a password change.  If deploying a discrete PoE network, change the passwords of the cameras.
  • The NVR has generous list of other cameras which can be added, like Sony and JVC, to name a few.  Sadly, ABS MegaCams do not make the list.
  • The cameras will work via PoE with Ubiquiti ToughSwitches at the 48V setting, and Netgear GS-108/GS-110TP switches.
  • The Lorex utilizes a Western Digital purple surveillance drive.  I considered buying an SSD to replace it, since the environment will be harsh, but the purple drives appear to be well suited for this purpose. 
The time commitment is far more than I anticipated, with cabling and infrastructure being the most laborious and having the steepest learning curve.

Unresolved issues include:
  • Ensure that the request to not cloud sync the footage be honored.  Block with home router ACL sandwich? 
  • Standardizing footage/NVR administration.  Chrome? Android? Windows?
  • Securing the NVR.  Will a lock box with an aft fan suffice?
  • Securing the out of band camera network yet providing a means to relay SMTP alerts directly through Lorex's service.
  • PoE switches ideally should be placed in a convenient location, but this building is challenged by its 1960's construction, lacks grounded outlets, and any power to the attic.  Furthermore, the attic is accessible only from the stairwell to the basement.  It seems to make the most sense to locate the attic mounted PoE switches close to the attic entrance.
  • Many cables will have to be run.



Saturday, September 15, 2018

Why did the chicken crossystem the road?

Last weekend I established a mature procedure for deploying Chrome to my ASUS X200LA and my ThinkPad Yoga 11 20D9.  That procedure is stored on paper, at the moment.

I also learned last weekend the reason why I was unable mount any Chrome OS partitions. This is because of the RO setting on the ext4 filesystem.  I found a message thread about someone trying to modify the contents of an existing image, which greatly helped me.  I zeroed out the location with the disable_rw_mount flag, and this proved that the RO was the stumbling block. Using mount /dev/recoveryblockdevp3 /media/chromerecovery is not likely going to succeed in Fedora or Ubuntu.  Your first idiot test begins now (I already failed mine)...and all my frustration up to this point was easily solved by mounting read-only.  So let's say for a moment, the freshly downloaded recovery image is on /dev/sdb, then after making my mountpoint /tmp/sdb3, I can successfully mount /dev/sdb3 /tmp/sdb3 -o ro.

Being able to mount the recovery image and inventory the contents is particularly useful for helping me find out what /lib/firmware images and /lib/modules/`uname -r`/kernel/drivers/net ko's are shipped per a given recovery image.  I also found that it might be a good idea to traverse the image and see if tpm_managerd is required.  My Thinkpad 20D9 does not have a TPM 2.0, but a TPM 1.2.  I have to wonder if this is why snappy doesn't allow me to add my first Google account, but gets stuck in an endless loop.

Today I dived in to re-writing the VbGet and VbSet functions of lib/crossystem.c to consult /etc/os-release.d/* files of my design.  In this little side adventure, if /etc/os-release.d/hwid exists, then this derivation of crossystem (I created) will report the contents of that file.  If that file exists and the crossystem "sys_param_list" Param allows writing, then the file can be written to, thus storing the desired value.

The point of this exercise was to become more familiar with the keys and values that Chromebooks use; in particular finding out how to assign a FWID and HWID.  After successfully getting it compiled and working on Fedora 28, I copied it over to my ThinkPad running Chrome and it tested with flying colors (provided I mounted /etc/os-release.d as tmpfs).  However, I still couldn't get updates. Updates would have to be performed by dumping an image from a recovery image, until later.

Tonight, I made progress.  I was able to add a FWID and HWID and loaded the beta channel for GANDOF on my Thinkpad.  I then wiped it all out, installed 10462, primed the FWID and HWID, and the stable-channel update applied.  Here's the result with /dev/sda5 mounted to /tmp/sda5 (ro):

localhost / # grep -n DESCRIPTION /etc/lsb-release /tmp/sda5/etc/lsb-release/etc/lsb-release:14:CHROMEOS_RELEASE_DESCRIPTION=10452.99.0 (Official Build) stable-channel gandof/tmp/sda5/etc/lsb-release:14:CHROMEOS_RELEASE_DESCRIPTION=10718.88.2 (Official Build) stable-channel gandof

Although I haven't rebooted yet, seeing this is good news.  I will then run through my manual process for updating grub.cfg (/dev/sda12).

GANDOF works nicely on my ThinkPad Yoga 11e (20D9/20DA) with the exception the kernel apparently doesn't initialize the touchscreen.  The 4.4 kernel for the BayTrail hardware have a working touchscreen but are absent Play Store support.  EDIT/20180918 Testing with a fresh deploy of BANJO, the update from 10452 to 10718 also came with a new kernel but it only deployed to the ChromeOS kernel partition despite indicating it updated /dev/sda12.  After reading the Disk Format - The Chromium Project page, I gathered that an update or recovery image might not deliver a consistent vmlinuz and kernel partition.  This might kill my interest in going further.

TERRA is my current choice for my ASUS X200LA - keep in mind I swapped out the wireless card for an Intel AC7265 so I wouldn't have violate dm_verity or layer with tmpfs and override module_locking.