helloSystem / ISO

helloSystem Live and installation ISO
https://github.com/helloSystem/
BSD 3-Clause "New" or "Revised" License
806 stars 58 forks source link

A1278 crash and reboot when SD slot is empty #335

Closed louies0623 closed 1 year ago

louies0623 commented 2 years ago

Describe the bug It will restart immediately when entering the loading screen, Have tried "unset boot_mute" but it will restart immediately.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Live Boot'
  2. Click in
  3. See error

Expected behavior Into the desktop.

Version (please complete the following information):

Computer (please complete the following information):

probonopd commented 2 years ago

Please try again with a fresh downloaded ISO and a new USB stick.

I cannot reproduce the issue.

probonopd commented 2 years ago

Can you boot them to single user mode? (Interrupt the bootloader by pressing backspace, then at the OK prompt enter boot -s)

louies0623 commented 2 years ago

It will get stuck on the FreeBSD loading screen to use “boot -s”. Then use "unset boot_mute" and "boot -s" command, it will restart immediately, both devices are.

louies0623 commented 2 years ago

Update I recently tested that Ghost BSD and Nomad BSD can be executed on these two laptops to enter the system, but Hello System 7.0 still cannot be executed normally.

probonopd commented 2 years ago

Can you please submit a hardware probe from GhostBSD and post the URL here? Thanks.

probonopd commented 2 years ago

Please also try helloSystem 0.6.0. Does it work better?

louies0623 commented 1 year ago

Sorry I haven't had time to test, on build 0.8 H77, it's stuck on the freeBSD logo.

louies0623 commented 1 year ago

Can you teach how to use hardware probe on Ghost BSD Live.

louies0623 commented 1 year ago

Is it because the system does not support dual graphics cards, because the notebooks that cannot start normally are laptops with a mix of nvidia and intel graphics cards.

probonopd commented 1 year ago

Can you use such machines e.g., using NomadBSD? How?

louies0623 commented 1 year ago

20230119_183033 Now A1278 can’t even enter the logo in 0H277.

louies0623 commented 1 year ago

20230119_202609 Macbook a1278 is now stuck here at build 0H277.

probonopd commented 1 year ago

Build 0H277 is a FreeBSD 14-CURRENT based experimental build.

Please try one of the 13.1 based builds. Thanks.

louies0623 commented 1 year ago

OH278 A1278 20230121_163209

probonopd commented 1 year ago

Failed to load kernel? That's really bad. I doubt this has to do with the dual GPUs. Is the boot medium good?

louies0623 commented 1 year ago

what is boot medium.

probonopd commented 1 year ago

The USB stick or external hard disk you are using to boot helloSystem.

louies0623 commented 1 year ago

Is good.

louies0623 commented 1 year ago

In the latest version 0.9.0, it still restarts by itself. 20230902_135043

probonopd commented 1 year ago

I see a couple of errors related to USB device 0x1908:0x0226 (most likely a GEMBIRD SDXC reader). Maybe the crashes/rebooting are related to it.

According to https://bsd-hardware.info/?id=usb:1908-0226 it seems to be handled by the umass driver.

Possibly this is caused when there is no card in the reader. Please insert a microSD card into the slot and try again.

probonopd commented 1 year ago

Possibly related? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263868

Would entering

hw.usb.quirk.0="0x1908 0x0226 0 0xffff UQ_MSC_NO_INQUIRY"
hw.usb.quirk.1="0x1908 0x0226 0 0xffff UQ_MSC_NO_RS_CLEAR_UA"
boot

at the FreeBSD boot prompt change anything? If yes, then those lines could be added to /boot/loader.conf.

Maybe other USB Mass Storage quirks are needed?

louies0623 commented 1 year ago

I see a couple of errors related to USB device 0x1908:0x0226 (most likely a GEMBIRD SDXC reader). Maybe the crashes/rebooting are related to it.

According to https://bsd-hardware.info/?id=usb:1908-0226 it seems to be handled by the umass driver.

Possibly this is caused when there is no card in the reader. Please insert a microSD card into the slot and try again.

20230902_173333

probonopd commented 1 year ago

OK, so this fixed it? No more crash?

louies0623 commented 1 year ago

Surprisingly it boots fine just the trackpad doesn't work, I might try again in case it was just accidental.

louies0623 commented 1 year ago

You can celebrate now, the system can be used, the touchpad can be used, the only exception is that the wireless network card cannot be used. Macbook 7,1

Update: Trackpad no longer works again.

probonopd commented 1 year ago

So it works with a SD card in the slot but it does not work with no SD card in the slot?

louies0623 commented 1 year ago

I used the SD card as the Live test. I have not tried it if it is booted from a flash drive and then the Sd card is inserted.

probonopd commented 1 year ago

Need to test with and without a SD card in the slot. So that we know whether a missing SD card can cause the trouble. Thanks!

louies0623 commented 1 year ago

Yes, inserting the SD card will be fine

probonopd commented 1 year ago

And without?

louies0623 commented 1 year ago

The only prerequisite is that the SD card must have EFI boot or the like before it can be used. Generally, it is not suitable if it is just used to store data. It will restart directly.

probonopd commented 1 year ago

So, when there is no SD card in the slot, then the A1278 just reboots?

louies0623 commented 1 year ago

yeap

probonopd commented 1 year ago

Let's further analyze this:

Please test whether https://github.com/helloSystem/ISO/releases/download/r0.6.0/hello-0.6.0_0F54-FreeBSD-12.2-amd64.iso works without a crash with an empty SD slot.

louies0623 commented 1 year ago

Yes, is working.

probonopd commented 1 year ago

Conclusion: So it seems that on the A1278 (and possibly other models), there is a regression which makes the system crash and reboot if no SD card is in the reader. Seemingly it worked in FreeBSD 12.2 but fails in 13.x.

louies0623 commented 1 year ago

0.9.0 At present, only the SD card with boot can be inserted to start. Only the SD card for data storage will be restarted.

0.6.0 Work no problem

louies0623 commented 1 year ago

@probonopd Build:0I35 The problem still exists.

probonopd commented 1 year ago

I have not attempted a fix against the crash yet; someone with the affected hardware needs to test and tell me which USB Mass Storage Quirks are needed, and which one fix it:

https://github.com/helloSystem/ISO/issues/335#issuecomment-1703776499

probonopd commented 1 year ago

Following https://github.com/helloSystem/ISO/pull/521/commits/07e39aa06ecce3ce29d058e7f21d488488fcf25f by @u20230812, please retest on hello-0.9.0_0I39-FreeBSD-13.2-amd64.iso and newer.

louies0623 commented 1 year ago

The problem still exists

u20230812 commented 1 year ago

The problem still exists

What vendor:deviceid is your reader?

I found three in the hardware database. The fix that was just merged that you are trying only works for deviceid 8406. If you have one of the other two they can be added and tested with the following either as a PR to loader.conf or by entering the loader prompt and adding them with the set command prior to booting.

hw.usb.quirk.5="0x05ac 0x8404 0 0xffff UQ_MSC_NO_INQUIRY"
hw.usb.quirk.6="0x05ac 0x8404 0 0xffff UQ_MSC_NO_RS_CLEAR_UA"
hw.usb.quirk.7="0x05ac 0x8404 0 0xffff UQ_MSC_NO_TEST_UNIT_READY"
hw.usb.quirk.8="0x05ac 0x8404 0 0xffff UQ_MSC_NO_START_STOP"
hw.usb.quirk.9="0x05ac 0x8404 0 0xffff UQ_MSC_NO_INQUIRY_EVPD"
hw.usb.quirk.10="0x05ac 0x8408 0 0xffff UQ_MSC_NO_INQUIRY"
hw.usb.quirk.11="0x05ac 0x8408 0 0xffff UQ_MSC_NO_RS_CLEAR_UA"
hw.usb.quirk.12="0x05ac 0x8408 0 0xffff UQ_MSC_NO_TEST_UNIT_READY"
hw.usb.quirk.13="0x05ac 0x8408 0 0xffff UQ_MSC_NO_START_STOP"
hw.usb.quirk.14="0x05ac 0x8408 0 0xffff UQ_MSC_NO_INQUIRY_EVPD"

lsusb | grep 'Reader'

Bus 002 Device 003: ID 05ac:8406 Apple, Inc. Internal Memory Card Reader

https://linux-hardware.org/?view=search&vendor=apple&name=SD+Card+Reader&vendorid=05ac&typeid=disk#list

8404
8406
8408
louies0623 commented 1 year ago

I encountered a situation, I inserted the Live SD plugged with Ghost BSD and then executed Hellosystem Live USB, and then immediately unplugged the SD card when the language selection was displayed, it restarted.

u20230812 commented 1 year ago

I encountered a situation, I inserted the Live SD plugged with Ghost BSD and then executed Hellosystem Live USB, and then immediately unplugged the SD card when the language selection was displayed, it restarted.

Not surprising and I'm guessing you have one of the other vendorid's. What vendor:deviceid is your reader?

Are you sure you tried Ghost/helloSystem experiment above with the hw.usb.quirk.0...hw.usb.quirk.5...hw.usb.quirk.14?

louies0623 commented 1 year ago

https://bsd-hardware.info/?probe=d49b8413db

u20230812 commented 1 year ago

https://bsd-hardware.info/?probe=d49b8413db

So that's yet another reader 8403. I have no idea how many of these there are so @probonopd this quirk list could get big.

Give this a try from the loader prompt before booting the ISO.

set hw.usb.quirk.0="0x05ac 0x8403 0 0xffff UQ_MSC_NO_INQUIRY"
set hw.usb.quirk.1="0x05ac 0x8403 0 0xffff UQ_MSC_NO_RS_CLEAR_UA"
set hw.usb.quirk.2="0x05ac 0x8403 0 0xffff UQ_MSC_NO_TEST_UNIT_READY"
set hw.usb.quirk.3="0x05ac 0x8403 0 0xffff UQ_MSC_NO_START_STOP"
set hw.usb.quirk.4="0x05ac 0x8403 0 0xffff UQ_MSC_NO_INQUIRY_EVPD"
louies0623 commented 1 year ago

I took a brief look at the hardware info of Apple's Card reader in Linux and BSD. 8403, 8404, 8406, 8408

https://bsd-hardware.info/?view=search&vendor=Apple&typeid=card+reader#list

https://linux-hardware.org/?view=search&vendor=apple&name=SD+Card+Reader&vendorid=05ac&typeid=disk#list

probonopd commented 1 year ago

If you have the hardware, please test whether adding the same quirks (but with your vendor/device ID) can solve the issue. And if it does, please let us know! Thanks.

louies0623 commented 1 year ago

I think it's better to ask for your help, because this is beyond my ability to understand.

probonopd commented 1 year ago

Added https://github.com/helloSystem/ISO/commit/b9a2d0d2ba62fb38d27df32291977c06900c0ea7.

Please retest in build 0I41 or later.

If it is still crashing, please let me know