Defeat media pop-up icons on HD-Fox T2

/df

Well-Known Member
If you have the little brother, enabled for recording and CF with an external USB disk, you may be vexed that at start-up the display is blocked with a pop-up "USB is loading" followed by the Video/Music/Photo icons that also appear when you press Media (Yellow) in the media browser functions of the menu system.

Some old ideas based on sending (eg) 0 and Exit commands using ir, failed to defeat these icons consistently. However the observation that the icons don't appear on my HD-Fox setup with a 64GB SD card indicates that the presentation of the icons is a timing issue rather than some hard-coded start-up process in the HD-Fox settop binary.

Recently the following exchange prompted me to look at this again:
I just discovered how to wake up the disk controller.
Code:
echo "- - -" > /sys/class/scsi_host/host0/scan
...
and
It seems you can [do this on the HD too].
On my box echo "- - -" >/sys/class/scsi_host/host2/scan

Poking a bit more, both HD and HDR have host0, host1 and host2 and:
Code:
humax ~ # cat /sys/class/scsi_host/host?/proc_name
sata_svw
sata_svw
usb-storage
A bit of investigation led to this as a minimal boot-time script /mod/boot/xinit.d/a_usbdisk that defeats the media icons for my system with an external 3.5" disk in a USB 2.0 SATA enclosure connected via an unpowered hub. I found that it typically took 2-3 iterations (and so seconds) for the usb-storage node to appear.
Code:
#!/bin/sh

[ "$(cat /etc/model)" = HD ] || exit

# 5 might be enough
ii=10
while [ $ii -gt  0 ]; do
	for dd in /sys/class/scsi_host/host?; do
		# below would log progress to xinit.log
		# printf "%s -> \"%s\"\n" "$dd/proc_name" "$(cat "$dd"/proc_name)"
		# look for scsi_host of type usb-storage that isn't a virtual disk
		if [ "$(cat "$dd"/proc_name)" = usb-storage ] && 
		   [ -z "$(grep -ls 'File-Stor Gadget' "$dd"/device/target*/*/model)" ]; then
			# below would display hstn on the front panel
			# /sbin/display "\$hst${dd##*/host}"
			break 2
		fi
	done	
	ii=$((ii - 1))	
	sleep 1
done

exit 0
Notes
  • The disk scan command as originally quoted turned out not to be relevant; all that was needed was for the USB device to have been recognised as a storage device before the settop binary hooked into it. Presumably the settop binary mounts the device if the disk scan command isn't used, but only shows the media icons for a "new storage medium", recognised when its /sys/class/scsi_host/hostn appears.
  • Also unnecessary was this fragment, intended to force-cold-plug USB devices: for dd in /sys/bus/usb/devices/*/uevent; do echo add > "$dd"; done
  • The test to ignore a virtual disk hasn't been seen to run, and it's possible that the sysfs entry being tested may not have been created at the point where it's being checked.
 
Last edited:
If you have the little brother, enabled for recording and CF with an external USB disk, you may be vexed that the display is blocked with a pop-up "USB is loading" followed by the Video/Music/Photo icons that also appear when you press Media (Yellow) in the media browser functions of the menu system.
I don't get that problem, possibly because I don't turn it off.
 
at start-up the display is blocked with a pop-up "USB is loading" followed by the Video/Music/Photo icons

I noticed this popup has started appearing following a recent update to virtual disk 2 v2.0-4. Is this a regression from the previous version. Can't recall if there was a setting I need to select to disable the message.

Edit: Just noticed the thread title relates to the HD-Fox T2. I'm observing the same issue on the HDR-FOX T2.
Should I create a new thread?
 
The only differences between virtual-disk2 version 2.0-3 and the latest (2.0-4) are a fix for a missing dependency and a new test to ensure that it can only be installed on CF version 3.11 or later.
 
So if you are seeing the media icons on an HD, check that the virtual-disk service has auto-startup OFF in WebIf>Service Management; this is a reliable approach provided that you don't need the service to be running, as on the HD. Otherwise, more details of the configuration will be needed.

The "USB is loading" message may appear transiently, depending, I think, on what real USB devices are connected and how fast they are to start up.
 
if you are seeing the media icons on an HD, check that the virtual-disk service has auto-startup OFF in WebIf>Service Management

Thanks. I must have previously disabled this service. I only have it installed because ntfs-3g is dependant. I'm guessing the update enabled the service auto start again. To confirm, the box is a HDR
 
Back
Top