Jump to content

Sergei Steshenko

Members
  • Posts

    54
  • Joined

  • Last visited

Posts posted by Sergei Steshenko

  1. On 8/5/2019 at 4:58 PM, martinayotte said:

    Isn't what you wish to set in U-Boot : INITIAL_USB_SCAN_DELAY

     

    EDIT: Ouups ! INITIAL_USB_SCAN_DELAY seems to be only for AllWinner SoC ...

    But maybe some of this code could be copied to other USB drivers ?

     

    EDIT2: Oh ! It seems that there is a more general way to delay on any plateforms in common/usb_hub.c using the env variable "usb_pgood_delay" ...

    Is "usb_pgood_delay" in small letter or in capital ones ?

  2. I've ordered a 5V 6A power supply in metal enclosure. It typically takes 2 .. 3 weeks for such orders to arrive. If and when the supply arrives and I test it, I'll report my findings and the URL to the item.

     

    The supply has voltage adjustment, is also for LEDs, the description claims it underwent burn-in test under 100% load, blah, blah, blah.

     

    Ironically the 5V 6A is cheaper than 5V 5A.

  3. 1 hour ago, jock said:

    @Sergei Steshenko You can add kernel command line parameters using the extraargs argument. They will be appended to the command line as is:

    
    extraargs=rootdelay=30

    If you are booting the kernel from the sdcard/emmc and the root filesystem is on the external HDD this may work. Of course if the HDD is suffering power outages (like you're describing), it won't work anyway.

    "You can add kernel command line parameters" - do you mean to add them to /boot/armbianEnv.txt or I can add them interactively while booting ? If the latter, how do I do this ? I.e. what keys should I press in order to be able to add 'extraargs' ?

  4. 24 minutes ago, Sergei Steshenko said:

    I've checked my 5V 4A power supply. Well, it's fake 4A. With HDD attached voltage drops sometimes to less than 4.5V. It's hard to say what the voltage exactly is - because the HDD squeaks every second or so, and DMM integrates, but there shouldn't be more than 0.5V of voltage drop.

     

    24 minutes ago, Sergei Steshenko said:

    I've checked my 5V 4A power supply. Well, it's fake 4A. With HDD attached voltage drops sometimes to less than 4.5V. It's hard to say what the voltage exactly is - because the HDD squeaks every second or so, and DMM integrates, but there shouldn't be more than 0.5V of voltage drop.

    I have also checked my 5V 3A power supply - the same.

  5. 40 minutes ago, DRAGO4k said:

    I used a 5v 2.5A Logitech power adapter (so it should be real 2.5A or close enough).

    1) the power for the USB devices go through the power management chip and is 0 while the unit is turned off

    2) the voltage dropped in a range of 4.3-4.8v under load meaning even 2.5A is not enough for the unit alone.

    3) a ~0.20mA load on the usb dropped the voltage to 4.5v during idle.

    4) a ~0.60mA load on the usb dropped the voltage to 4.2v during idle.

     

    I will probably power this from an ATX PSU and measure the amps and usb load.

     

    When i have the time I will test with an actual hdd.

     

    I've checked my 5V 4A power supply. Well, it's fake 4A. With HDD attached voltage drops sometimes to less than 4.5V. It's hard to say what the voltage exactly is - because the HDD squeaks every second or so, and DMM integrates, but there shouldn't be more than 0.5V of voltage drop.

  6. @jock, this is what I found: "Increase disk detection timeout at boot with Linux/Systemd" - https://serverfault.com/questions/938506/increase-disk-detection-timeout-at-boot-with-linux-systemd  :

     

    "

    I've finally found it! It's of course but a simple kernel parameter, found here https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html

    The parameter I was specifically looking for is rootdelay, I had already tried rootwait but apparently that wasn't enough, as it still aborted the wait after 10 seconds. Now it actually does not wait the full 30 seconds specified, but only about 10-15 seconds depending on how long it takes for my disks to show up, so setting a really high value doesn't seem to hurt, although I've only set 30 for my use case, which so far seems to have completely resolved the issue!

    You can add it to your kernel boot parameters in Grub or systemd-boot.

    Grub: /etc/defaults/grub -> GRUB_CMDLINE_LINUX_DEFAULT="rootdelay=30 quiet"

    systemd-boot: /boot/loader/entries/yourentry.cfg -> options rootdelay=30 [other options]

    ".

     

    So, is there 'rootdelay' in /boot/armbianEnv.txt ?

  7. 9 minutes ago, DRAGO4k said:

    it looks to me like a problem regarding the negotiation of amps over usb.

     

    1) check power consumption of the hdd in a normal pc - or try to see how much is negotiated

    2) check what power you get via Q8 or what is negotiated

     

    as a last resort splice a usb cable, get the VCC and GND from a proper power supply.

     

    PS: might be also a limit in the device tree for the usb(s) - or a limit of the hardware itself

    Again, I power the USB port from a separate power supply - which is 5V 4A. When the HDD is powered from 5V 4A and at the same time TV box is powered from 5V 2.5A, everything works.

     

    When both the HDD and the TV box are powered from 5V 4A, the drive is not detected.

     

    With my USB port adapter I completely bypass whatever limits of USB - the only limits are the ones of power supply I'm using.

     

    FWIW I am an electronic engineer by trade.

  8. I think there is a problem with timeout of detection of external HDD. The following text probably looks convoluted - I've tried my best.

     

    I have a number of HDD USB <-> STAT adapters - a USB-3.0 one and a USB-2.0 one. My last experiment was with the USB-2.0 one - quite possibly it consumes less current from USB port than the USB-3.0, but results are the same.

     

    If I take my HDD connected to the USB-2.0 adapter, and connect the adapter with the HDD to my DESKTOP Linux PC, the HDD is detected, albeit with a delay of several seconds, and contents of the HDD can be read without a problem.

     

    If I connect the same USB-2.0 with the same HDD (with Armbian RK3288 system) to my RK3288 box, there are repetitive attempts to reset the drive (squeaking sound about once per second), and the system fails to detect the drive. The power supply I'm using is 5V 4A (however one can believe the rating) power supply. I have also a 5V 3A power supply - the same results.

     

    I have soldered a special USB port adapter which is USB male -> USB female connector with GND, D+, D- soldered straight from the male to the female connector and +5V line goes USB male pin -> SS34 Schottky diode anode -> SS34 cathode -> +5V pin of the USB female connector. In addition to this there is a 5.5mm/2.1mm power connector soldered to the USB female connector, and I connect the 5V 4A power supply (using a Y-splitter) to the 5.5mm/2.1mm power connector. There is also a 3300uF electrolytic capacitor connected to +5V and GND pins of the output female USB connector. The capacitor is intended to buffer voltage drops due to impulse current consumption by the HDD. In such a manner I completely bypass the USB port current limit - now current is limited by the +5V 4A power adapter I'm using. I.e. the current limit (assuming 4A is true) is 4A - current_consumed_by_the_RK3288_box. Still the same repetitive attempts to reset the HDD with squeaking sound. The USB male -> USB female adapter I've soldered definitely works - I tested it with USB mouse and with HDD on my desktop.

     

    But if I additionally use another power supply - 5V 2.5A (which came with the RK3288 box) to power the box and the 5V 4A power adapter with the USB adapter I've soldered to connect the USB-2.0 HDD adapter + HDD to the RK3288 box, I am able to boot. Alternatively instead of self-soldered USB male -> USB female adapter I can use ready made powered USB hub - the system also boots. Again, the main point being TWO power supplies working at the same time: the 5V 2.5A + 5V 4A.

     

    My theory is the following. On desktop the timeout is long enough, so even with the standard USB port without any external power supply the system manages to detect the drive, albeit slowly. In the Armbian image the timeout is too short, so the system is able to detect the drive only when it spins up quickly enough, and it happens with two power supplies working in parallel.

     

    So I can order a more powerful power supply - say, 5V 5A. And/or I can try to change timeout, but I do not know in what file it's coded. @jock, do you know what the file is and what is the procedure ? I mean I need to create a new SD card boot image with the modified file setting. I.e. I need to modify the file and then to run something to modify the image, correct ? Thanks in advance.

  9. 7 hours ago, jock said:

    Got it. I'm trying the box with an HDD attached to the OTG USB port. too

    It works wonderfully and it is a perfect desktop replacement to me :)

    Are you using the sdcard too? In my setup I have an image installed on the eMMC and, by default, it boots from the USB HDD when it is attached, so no need for the sdcard at all.

    Yes, I do use the SDcard too. As I wrote above, I didn't want to risk changing the box internal state yet again, so I decided to keep the SDcard while having the system on HDD.

     

    Is there a way to copy what I have on SDcard at the moment to a smaller SDcard ? It's a pity to have a 16GB SDcard just to host the /boot partition, i.e. a 4GB card, or even a smaller one, should suffice.

     

    Back to the issue of newer kernels. Probably 2 decades ago I compiled a Linux kernel after making small changes in TV capture card (ironically, I stopped watching TV in 2006 or so). Since with HDD the TV box is a full fledged computer, there shouldn't be a problem to compile the kernel natively. Is there a way to have multi-boot WRT to kernels ? Like on regular x86 boxes GRUB(2).

     

    Regarding the USB OTG port - in order to use it as yet another USB master port do I have to configure it somehow or just to plug the drive into it using the appropriate adapter cable ?

     

    Could you please have a look into arm-cortex-a7 'gcc' vs arm-cortex-a17 real HW issue mentioned in my previous post ?

  10. @jock, thanks for the update.

     

    At the moment I have my gig working, and the system is on HDD. Since I'm using optical SPDIF out, I'm not affected by the vertical magenta strip issue at the moment. So there is no real need for me to try a new setup at the moment - I'd rather spend time on "perfecting" my audio stuff. I mean that trying a new image would mean destroying already installed and configured stuff on HDD because of the way 'nand-sata-install.sh' script copies data.

     

    ...

     

    Some more questions. I tried 'gcc -v' and it shows arm-cortex-a7 (or something like this - I'm writing from my desktop PC - not from the TV box), but RK3288 is of ARM-cortex-A17 kind. So, does it mean that the available 'gcc' is not fully optimized for A17, or it's a no issue ?

     

    ...

     

    I have tried 'Suspend' from XFCE menu. Though the session is terminated, I don't have a clue how to resume. Does suspend work ? If yes, how does one resumes the session ?

  11. Another issue is that apparently "Log Out" -> "Reboot" and 'sudo reboot' do not work, or, rather, do not work fully. Session is indeed terminated, the control button on the TV box lights first red and then blue - as it should, but new boot doesn't occur.

     

    Sometimes I can achieve boot by cycling the button blue -> red -> blue several times, but the easiest and quickest way is to power the whole thing off and then on.

  12. I've made some progress. The good news is that booting having the system on external HDD works.

     

    The needed for my scenario option was '1' in the 'nand-sata-install.sh' script actually present on the SD card. I decided to ago along my original intent of booting from SD card and system on HDD - didn't want to change the TV box internal state.

     

    When 'nand-sata-install.sh' works, it sees existing partitions and asks to what partition to copy data. When it copies data, it completely overwrites the partition, i.e. it copies data as image - not file by file. Which, by the way, means that user home directory is copied too.

     

    The script also created /etc/fstab, and even though the drive is HDD, the contents of  /etc/fstab are such as if it is tailored for a flash drive. So I later edited the file to make it look like more or less normal desktop Linux PC file.

     

    Even after the system is moved to HDD, it still uses ZRAM and RAM logging - I found a couple of posts describing how to disable both.

     

    The tricky part was enabling swap partition on the HDD. And the trickiest part was realization that there should be NO entry in /etc/fstab file for swap - unlike on my desktop Linux PC. I.e. UDEV rules automatically take care of swap partitions and if there is an entry on swap in /etc/fstab it is in conflict UDEV resulting in "Dependency failed for swap" message during boot.

     

    I think Armbian documentation on 'nand-sata-install.sh' script should be amended to explain all these issues.

     

    In my case the USB HDD is connected via a powered USB hub - otherwise there's not enough current to spin it up.

     

     

  13. "It looks to me that ALSA is quite messy" - your characterization is quite mild. The probably most fundamentally wrong thing about ALSA is that its configuration files are not debuggable. I.e. there is no way to find what is wrong, even from the point of view of syntax. At least, this was the case years ago - I got confirmation of this statement from ALSA developers.

     

    ...

     

    Regarding 'nand-sata-install.sh' - here is the source: https://github.com/pfoo/armbian-lib/blob/master/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh  . The destination drive is formatted by the script. I do not see the word 'swap' in the script. Some device names are explicitly checked and adjustments are made. Which means that some adjustments might be necessary for RK3288. I will try the script - I have a drive from somebody else's Windows machine, so I'll first let the script do with it whatever it wants. I am not a shell programmer, so it's not clear to me what happens after the script is run and then the destination drive is not connected. Will the source SD card be still bootable in the sense that the whole system can start from it ? Anyway, I haven't done much configuration on the SD card. I haven't even installed updates and the media script (the main goal of the whole thing is audio anyway).

  14. "maybe you're interested in giving the sound devices the right names," - @jock, IIRC, earlier in this thread you've proposed a workaround. I haven't implemented it yet. I've been studying pulse audio in general, made some simple adjustments on my desktop PC, etc.

     

    My final goals include adding some LADSPA stuff of mine to pulse audio, so I have more things to learn. Or taking usage scenarios I might decide to dump pulse audio altogether using pure ALSA - which IIRC also allows to use LADSPA stuff.

  15. Another set of questions.

     

    I want to use an external USB drive (to be exact, an HDD with USB adapter) to host the system. I've read  https://docs.armbian.com/User-Guide_Getting-Started/#how-to-install-to-emmc-nand-sata-usb  and if I understand correctly my best option is 3 - "boot from SD - system on SATA or USB". The perfect option would be to also boot from SATA or USB.

     

    So, do I have to partition the USB drive myself and the 'nand-sata-install' script imposes its partitioning ?

     

    When I deal with desktop/laptop Linux distros, I partition the drive myself.

     

    If 'nand-sata-install' script partitions the drive, will it be possible for me afterwards to change partitions adding, for example, swap partition ? I mean if I do not destroy data changing partitions will the whole boot mechanism find needed for booting data ?

  16. I didn't try this monitor with a regular PC - it's physically inconvenient for me to try. The monitor is a "no-name" - I got it as a present, its IR control (it was used by the original owners as TV screen) stopped working, so the original owners bought a new monitor.

     

    The good news is that when I use optical out, sound is not affected by presence/absence of the magenta stripe. And my "production" use means using optical out.

     

    "Sometimes, expecially with older (<4.20) kernels, it may happen that sound disappears even without the purple line" - appears to be that way. I.e. I have an impression that sound sometimes disappears even without the magenta stripe. With optical out it appears to be more stable. The image I'm using has a 4.19.20 kernel, i.e. a version that can be affected according to your statement. I don't official Armbian images with newer kernel exist.

     

    Anyway, is the buggy kernel driver being worked on ? Or it's a closed source part and everything depends on Rockchip ?

  17. Still no good news with 'xrabdr'. Fundamentally, my monitor supports only one mode, so other modes have no effect when I use 'xrandr'. I.e. the whole thing always reverts to default.

     

    Another strange thing happened. I was doing 'rmmod' and then 'modprobe' of several kernel module in the hope to reinitialize the and thus maybe change the system behavior. I wasn't changing any configuration file on the way. After a number of attempts sound reproduction disappeared completely - regardless of presence of the vertical magenta strip. There were no error messages during 'modprobe' operations.

     

    So, in order to restore sound I simply re-flashed the SD card - now I again have sound. Very strange.

  18. @jock  thanks for the 'xrandr' suggestion - I will try it.

     

    Another observation. Using the XFCE GUI entries I tried to change the refresh rate from 60 to 30 - not changing the resolution. This screwed up X11 - it failed to start after the change. However the change also caused appearance of that infamous vertical magenta strip in text mode as Linux boots. There was no vertical magenta strip before my change.

     

    So, it seems, some X11 setting isn't quite right - because intentional changing of refresh rate causes the same defect.

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines