Nothing from drm.debug? how do you get slack-image?
Please verify your drm.debug option is passed to kernel
uname -r
cat /proc/cmdline
please attach full log…i need to see whats happen directly before crash
Nothing from drm.debug? how do you get slack-image?
Please verify your drm.debug option is passed to kernel
uname -r
cat /proc/cmdline
please attach full log…i need to see whats happen directly before crash
The arm image of slack is downloadable from here: http://arm.slackware.com/installation/ At the bottom of this page is " click here to download the root filesystem images." and on “here” is link to minirootfs: ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-devtools/minirootfs/roots I use slackware-current image because this provide hardware float support. How can I grab the full log which will help to find the reason of this issue?
root@slackarm:~# uname -r
4.16.18-bpi-r2-main
root@slackarm:~# cat /proc/cmdline
board=bpi-r2 console=earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait service=linux vmalloc=496M debug=7 initcall_debug=0 video=1280x1024-32 drm.debug=0x7
bootup-log you can write to file
dmesg > file.txt
for power-down log just select in your terminal-application (putty/minicom) and copy to a textfile on client like you did for crash, but not only the crash…also lines before (starting at your poweroff-command)
OK, BootUP log is here: https://drive.google.com/file/d/1-w5Nr1ZIVx7s2CKsF-GlZzn7Zio3uNxY/view?usp=sharing
But power-down log is not easy to have as a part of messages I have on serial console but other part on hdmi port. So firstly will be good to fix this issue. What I should change in my uEnv.txt file to have all messages on serial console. Now, I’m not able to login to the OS on serial console. Login screen is only on hdmi port.
bootup-log looks clear so far…
you should see all messages also on serial-console. you could try
dmesg -E
before running poweroff-command, i have no other idea because i see all messages also on serial (and some additional after fbcon is disabled)…
for login on serial, maybe its hidden because of drm-messages…just press enter and you should see login-prompt on serial
it seems that there is a process that prevent you to login from console (after starting xserver).
my bootargs are similar for console
root@bpi-r2:~# cat /proc/cmdline
board=bpi-r2 console=earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200 kgdboc=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait vmalloc=496M debug=7 initcall_debug=0 video=1280x1024 drm.debug=0x7
After enter I’m not see login prompt on serial console. I see:
Starting OpenSSH SSH daemon: /usr/sbin/sshd
Enabled CPU frequency scaling governor: ondemand
Starting crond: /usr/sbin/crond -l notice
Loading /usr/share/kbd/keymaps/i386/qwerty/uk.map.gz
as a last commands from boot process and then I’m able to logon only on hdmi. And when I run poweroff/shutdown on serial console I got:
INIT: Switching to run[ 2168.352919] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[ 2168.352919]
...
for serial-problem you should ask in slacks forum and maybe for process of powerdown…there seems to be a difference to debian-systems
there is a crash on killing init-process, with drm.debug the fbcon-lines are missing…strange.
[ 112.696153] [<c0101a0c>] (__irq_svc) from [<c0550664>] (cfb_imageblit+0x2fc/0x4e4)
[ 112.696172] [<c0550664>] (cfb_imageblit) from [<c05bdf98>] (drm_fb_helper_cfb_imageblit+0x24/0x44)
[ 112.696187] [<c05bdf98>] (drm_fb_helper_cfb_imageblit) from [<c054ed7c>] (bit_putcs+0x280/0x42c)
i guess it tries to display a bootlogo or splash-screen which is not available in my kernel…imho you should ask in slackware-forum for serial-problem and kernel-crash
maybe @DeadMeat can help here, currently he tries to change framebuffer-driver to new generic framework…maybe in old driver the bitblt-functions are missing
I checked again with Raspbian (stretch) : -> on kernel 4.4.70 after powerdown command I got
[ OK ] Reached target Shutdown.
[ 275.514617] reboot: System halted
and BPI is not powered off.
-> on kernel 4.19.16 after powerdown command I got
root@bpi-iot-ros-ai:~# poweroff
[ OK ] Started Show Plymouth Power Off Screen.
[ OK ] Deactivated swap /var/swap.
[ OK ] Stopped LSB: Autogenerate and use a swap file.
[ OK ] Unmounted /run/user/1000/gvfs.
[ OK ] Unmounted RPC Pipe File System.
[ OK ] Stopped User Manager for UID 1000.
[ OK ] Stopped User Manager for UID 0.
[ OK ] Removed slice User Slice of root.
[ OK ] Removed slice User Slice of pi.
Stopping Permit User Sessions...
Stopping Login Service...
[ OK ] Stopped Login Service.
[ OK ] Stopped Permit User Sessions.
[ OK ] Stopped target Network.
Stopping Raise network interfaces...
Stopping dhcpcd on all interfaces...
[ OK ] Stopped target Remote File Systems.
[ OK ] Stopped target Remote File Systems (Pre).
[ OK ] Stopped target NFS client services.
[ OK ] Stopped Raise network interfaces.
[ OK ] Stopped dhcpcd on all interfaces.
[ OK ] Stopped target Basic System.
[ OK ] Stopped target Sockets.
[ OK ] Closed D-Bus System Message Bus Socket.
[ OK ] Closed Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Closed triggerhappy.socket.
[ OK ] Closed Syslog Socket.
[ OK ] Stopped target System Initialization.
[ OK ] Stopped target Swap.
[ OK ] Stopped Apply Kernel Variables.
[ OK ] Stopped target Encrypted Volumes.
Stopping Update UTMP about System Boot/Shutdown...
Stopping Load/Save Random Seed...
Stopping Restore / save the current clock...
Stopping Network Time Synchronization...
[ OK ] Stopped Load Kernel Modules.
[ OK ] Stopped target Slices.
[ OK ] Removed slice User and Session Slice.
[ OK ] Stopped Forward Password Requests to Plymouth Directory Watch.
[ OK ] Stopped target Paths.
[ OK ] Stopped Forward Password Requests to Wall Directory Watch.
[ OK ] Stopped Load/Save Random Seed.
[ OK ] Stopped Restore / save the current clock.
[ OK ] Stopped Update UTMP about System Boot/Shutdown.
[ OK ] Stopped Network Time Synchronization.
[ OK ] Stopped Create Volatile Files and Directories.
[ OK ] Stopped target Local File Systems.
Unmounting /boot...
Unmounting /media/pi/BPI-BOOT...
Unmounting /run/user/1000...
Unmounting /run/user/0...
[ OK ] Unmounted /run/user/1000.
[ OK ] Unmounted /media/pi/BPI-BOOT.
[ OK ] Unmounted /run/user/0.
[ OK ] Unmounted /boot.
[ OK ] Reached target Unmount All Filesystems.
[ OK ] Stopped File System Check on /dev/mmcblk0p1.
[ OK ] Removed slice system-systemd\x2dfsck.slice.
[ OK ] Stopped target Local File Systems (Pre).
[ OK ] Stopped Create Static Device Nodes in /dev.
[ OK ] Stopped Remount Root and Kernel File Systems.
[ OK ] Reached target Shutdown.
[ OK ] Reached target Final Step.
Starting Power-Off...
Here, after wait a few seconds:
[ 91.252329] reboot: Power down
[ 92.259992] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
[ 92.259992]
[ 92.273118] CPU: 0 PID: 1 Comm: systemd-shutdow Tainted: G W 4.19.16-bpi-r2-main #1
[ 92.286032] Hardware name: Mediatek Cortex-A7 (Device Tree)
[ 92.295587] [<c0114bbc>] (unwind_backtrace) from [<c010ea18>] (show_stack+0x20/0x24)
[ 92.307376] [<c010ea18>] (show_stack) from [<c0b51c30>] (dump_stack+0x90/0xa4)
[ 92.318713] [<c0b51c30>] (dump_stack) from [<c01286ac>] (panic+0x100/0x284)
[ 92.329801] [<c01286ac>] (panic) from [<c012df00>] (complete_and_exit+0x0/0x2c)
[ 92.341331] [<c012df00>] (complete_and_exit) from [<c014ece0>] (sys_reboot+0x170/0x218)
[ 92.353621] [<c014ece0>] (sys_reboot) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[ 92.365650] Exception stack(0xde913fa8 to 0xde913ff0)
[ 92.375103] 3fa0: ffffffff 00000000 fee1dead 28121969 4321fedc 4321fedc
[ 92.387799] 3fc0: ffffffff 00000000 00495038 00000058 bef56c88 00495028 fffff000 bef56e74
[ 92.400551] 3fe0: 00493f20 bef56ba0 0048fb18 b6c9e598
[ 92.410235] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
[ 92.410235] ]---
and BPI is not powered off. My BPI-R2 is rev V1.1
I have soldered power-button so I blacklist mtk_pmic_keys module to avoid boot loop.
I done more tests - distribution the same as in my previous post: Raspbian with kernel 4.19.16 and two BPI-R2 motherboards: 1st MB - on this I have burned BPI-R2-EMMC-boot0-DDR1600-0k-0905.img.gz to /dev/mmcblk1boot0 to be able to boot from eMMC (it was described here: BPI-R2 new image : ubuntu 16.04 V1.2.1 BT and WIFI AP mode are working fine 2017-11-27 in point “5. FAQ” subpoint “g”) 2nd MB - really new one, eMMC not touched only SD with OS inserted
and on the 1st MB I have kernel panic but the 2nd MB orrectly powered off on poweroff command.
Which one image I can use to test (for mmcblk1boot0) but having the possibility to boot from eMMC too?
as i have not soldered my power-switch i cannot test this…
is your second board also hw rev 1.1? if it is rev 1.2 you have a switch for selecting boot-device if both having a valid preloader installed.
in rev 1.1 emmc is only used, if sd-boot is not possible (not inserted or at least no preloader).
to boot from emmc you need preloader on emmc (boot0-partition) and uboot with pointing to emmcs-root-device (depending on kernel used). official and my kernel have mmc swapped (sd=mmcblk0,emmc=mmcblk1). so you need to load kernel with uboot from right device (in uboot sd=mmc dev 1, emmc=mmc dev 0) and set your root in bootargs to right partition (from kernel view)
The new MB is rev 1.2
you can try my debian (https://drive.google.com/open?id=1oP7jy1KrrIOifvImo2nQ59wx3_9hHkgk 4.14.80) burn to mmcblk1+ preloader to boot0 but you need to change in uenv.txt partition 1:1 to 0:1 and root to /dev/mmcblk1p2 (should be mmcblk0p2) and in root-partition/etc/fstab (mountpoint for /) also to /dev/mmcblk1p2
New few test. Slackarm updated to the fresh current version, kernel the same: 4.19.16 and two BPI-R2 MB: 1st rev 1.1 with soldered power-switch and second rev 1.2 without soldered power-switch.
On both now I haven’t kernel panic but on the 1st a have:
INIT: Switching to runlevel: 0
INIT: Sending proceRunning shutdown script /etc/rc.d/rc.0:
INIT: version 2.93 reloading
Saving system time to the hardware clock (localtime).
Stopping system message bus...
Unmounting remote filesystems:
Stopping udevd
Sending all processes the SIGTERM signal.
Sending all processes the SIGKILL signal.
Saving random seed from /dev/urandom in /etc/random-seed.
Turning off swap.
Unmounting local file systems:
/sys : ignored
/proc : ignored
/ : successfully unmounted
Remounting root filesystem read-only:
mount: /dev/mmcblk0p2 mounted on /.
[ 60.111412] reboot: Power down
and MB no powering off - still on.
The 2nd powered off correctly after poweroff command.
If something from mmcblk1boot0 (eMMC boot part) can have impact on this situation on 1st BPI-R2?
I done one more test with 2nd MB (BPI-R2 rev v1.2) without soldered power-switch and not touched eMMC. But, to UP it automatically when power back I connected 5V to otg. And, on poweroff command I have the same result as on the 1st MB with soldered power-switch. MB was not powered off but keep stay on [.................] reboot: Power down message 
Result are the same with and without acpid.
Thank you for your tests,but currently i have no idea how to “fix” it. Maybe it’s impossible to power it off if it is externally “forced” to power-on (with bridged power-switch/otg-power).
How do you want to power it on if you have it powered off (disabled power-switch)? I think there can be no solution.
Very easy Arduino project solved the problem definetly (Arduino Mini 3.3V):
int pin = 13; // PIN NUMBER
void setup() {
// put your setup code here, to run once:
pinMode(pin, OUTPUT);
digitalWrite(pin, LOW); // Make signal LOW
delay(10000); // wait 10 sec
digitalWrite(pin, HIGH); // Make signal HIGH
}
void loop() {
// put your main code here, to run repeatedly:
}
Now Arduino switch on the power button for 10 sec. Regards, Radek
Nice project. Guess you could even use an attiny85 for that.
Be careful with power level…arduino is most 5v and bpi-boards are mostly 3.3v
Afaik also a FET would be enough with some self holding circuit (capacitor for 10s).
I measured the voltage on the standard Power button and it’s 3.8V. So everything should be fine. But for security reason better will be probably Arduino 3.3V.
Ok, i verified documentation. MT6323LGA (Power Control module) can be powered between 3,4 - 4,5 Volts. Logical HIGH signal from Arduino 5V can be too much for MT6323LGA.
I replaced Arduino 5V with Arduino 3.3V and it’s working fine also. @frank-w thank you for your suggestion, now all is working without problems and is safe. Regards, Radek.