Thread: Bug report: Mac Target Disk Mode not working in some cases
Brought to you by:
aeb,
bencollins
From: Andrew F. <and...@gm...> - 2024-08-25 20:31:59
|
Hello, I firstly wanted to thank the maintainers for working on the ieee1394 system for Linux. It's great to see continuing support for firewire in Linux. I have encountered a bug in that some Macs are not detected in Linux, when the Mac is being used in "Target Disk Mode". For those unfamiliar, Target Disk Mode boots an older (firewire-compatible) Mac in a mode where connecting it to another computer via firewire causes the Mac to appear as an external firewire hard drive. See the Wikipedia article <https://en.wikipedia.org/wiki/Target_Disk_Mode> for more information. To be clear, I am not trying to run the Linux1394 system on an older Mac; I am trying to connect a Mac in Target Disk Mode to a regular PC running Linux over firewire. The Mac should appear as an external firewire hard drive. On some Mac models, it works just fine. However on other models, it doesn't work. If I connect one of these non-working models to a Mac running OS X, it does work, so it does appear to be an issue with Linux1394. Mac models that work: Macbook Pro late 2008 iMac G4 Mac models that do not work: iBook G4 Powerbook G4 I have access to more Mac models to test if necessary - the benefits of hoarding old electronics! If the maintainers are interested in investigating this issue, what sort of debugging information can I provide? There's only a few lines in dmesg that to my eyes look useful ("sbp_scsi_abort" is one) but I can provide full dmesg output if helpful. I have a number of different Firewire PCI / PCIe cards I can use, including one that should be able to run the "nosy" ieee1394 packet sniffer (although I have no clue how to set that up!). Many thanks, and kind regards, Andrew |
From: Takashi S. <o-t...@sa...> - 2024-08-26 08:39:22
|
Hi, On Sun, Aug 25, 2024 at 09:31:40PM +0100, Andrew Ferguson wrote: > Hello, > > I firstly wanted to thank the maintainers for working on the ieee1394 > system for Linux. It's great to see continuing support for firewire in > Linux. > > I have encountered a bug in that some Macs are not detected in Linux, when > the Mac is being used in "Target Disk Mode". For those unfamiliar, Target > Disk Mode boots an older (firewire-compatible) Mac in a mode where > connecting it to another computer via firewire causes the Mac to appear as > an external firewire hard drive. See the Wikipedia article > <https://en.wikipedia.org/wiki/Target_Disk_Mode> for more information. To > be clear, I am not trying to run the Linux1394 system on an older Mac; I am > trying to connect a Mac in Target Disk Mode to a regular PC running Linux > over firewire. The Mac should appear as an external firewire hard drive. On > some Mac models, it works just fine. However on other models, it doesn't > work. If I connect one of these non-working models to a Mac running OS X, > it does work, so it does appear to be an issue with Linux1394. > > Mac models that work: > Macbook Pro late 2008 > iMac G4 > > Mac models that do not work: > iBook G4 > Powerbook G4 > > I have access to more Mac models to test if necessary - the benefits of > hoarding old electronics! > > If the maintainers are interested in investigating this issue, what sort of > debugging information can I provide? There's only a few lines in dmesg that > to my eyes look useful ("sbp_scsi_abort" is one) but I can provide full > dmesg output if helpful. I have a number of different Firewire PCI / PCIe > cards I can use, including one that should be able to run the "nosy" > ieee1394 packet sniffer (although I have no clue how to set that up!). > > Many thanks, and kind regards, > Andrew Thanks for the report. I'm sorry but I have less interests in the issue, since I have no actual hardware to investigate the issue (I'm a developer of ALSA, thus the center of my interest is multimedia protocol such like IEC 61883.) Therefore it is up to you. If you are willing to solve the issue, I would help you. Else, nothing changed. In Linux kernel v6.10, I added some tracepoints events[1]. These events are available to track asynchronous communication between Linux system and peer node. If the issue is caused by any kind of communication error, you could diagnose it. ``` $ ls -1 /sys/kernel/debug/tracing/events/firewire/ async_phy_inbound/ async_phy_outbound_initiate/ async_request_outbound_complete/ async_response_inbound/ async_response_outbound_initiate/ async_phy_outbound_complete/ async_request_inbound/ async_request_outbound_initiate/ async_response_outbound_complete/ ... ``` Additionally, I think the protocol in the case is SBP. The protocol specification is still available[2] and it would help your diagnose, too. [1] https://www.kernel.org/doc/html/latest/trace/events.html [2] http://ieee1394.docs.kernel.org/en/latest/specifications.html#the-serial-bus-protocol Regards Takashi Sakamoto |
From: Adam G. <ad...@po...> - 2024-08-31 10:18:17
|
On Sun, Aug 25, 2024 at 09:31:40PM +0100, Andrew Ferguson wrote: > I have encountered a bug in that some Macs are not detected in Linux, when > the Mac is being used in "Target Disk Mode". [...] > Mac models that do not work: > iBook G4 > Powerbook G4 Hi Andrew, I did a quick test with kernel 6.8-rc1 and a titanium Powerbook G4 (powerbook3,4 A1001). I held down T and turned on the Powerbook. After about 25 seconds, the FireWire logo appeared on the screen, and the drive appeared on Linux as sdb. I was able to read from the drive with dd. Can you provide steps to reproduce the problem? -- Adam |
From: Andrew F. <and...@gm...> - 2024-09-02 16:08:05
|
Hello Takashi, Adam. Thanks both for the replies (and apologies for the tardiness of my response). Takashi, I completely understand that this is of less interest to you - it is an extremely niche case. Your work on the ALSA drivers is amazing. Just a few weeks ago I was helping a friend setup a Digidesign 002R on Linux (thanks to the ALSA drivers). They will be using it to record their Wurlitzer theatre organ for conversion to a "sample pack" to allow them to play it digitally on their computer. I also have used a Mackie Onyx 400F with my 8-track analogue tape recorder, although I managed to break it (the Mackie) by accidentally looping phantom power into it. There's a Focusrite Liquid Saffire 56 on ebay I may get as a replacement - I need 192kHz input. I don't have any experience of kernel development, but I know C through various work on 5G network stacks. So there is (some!) hope that I will be able to fumble my way to a solution. Thank you for your advice about the tracepoint events - I will investigate this. (I'm about to go on a trip abroad for work reasons, so no / few updates doesn't mean that I'm not interested in solving this!). Adam, would you be willing to send me the serial number of the PowerBook G4 you used? That lets me see all of the specs and whether or not it is similar to mine. Separately (and very much a n00b question!), what's the best / easiest way to get kernel version 6.8-rc1? is there a specific distro that ships with development / rc builds of the kernel, or is it better to install something like Debian Stable and then compile / install a development build? Ideally I'd replicate your setup to confirm it isn't an issue on my end. Thanks! Andrew On Sat, 31 Aug 2024 at 10:59, Adam Goldman <ad...@po...> wrote: > On Sun, Aug 25, 2024 at 09:31:40PM +0100, Andrew Ferguson wrote: > > I have encountered a bug in that some Macs are not detected in Linux, > when > > the Mac is being used in "Target Disk Mode". > [...] > > Mac models that do not work: > > iBook G4 > > Powerbook G4 > > Hi Andrew, > > I did a quick test with kernel 6.8-rc1 and a titanium Powerbook G4 > (powerbook3,4 A1001). I held down T and turned on the Powerbook. After > about 25 seconds, the FireWire logo appeared on the screen, and the > drive appeared on Linux as sdb. I was able to read from the drive with > dd. > > Can you provide steps to reproduce the problem? > > -- Adam > |
From: Adam G. <ad...@po...> - 2024-09-08 04:26:18
|
On Mon, Sep 02, 2024 at 05:07:40PM +0100, Andrew Ferguson wrote: > Adam, would you be willing to send me the serial number of the PowerBook G4 > you used? That lets me see all of the specs and whether or not it is > similar to mine. Separately (and very much a n00b question!), what's the > best / easiest way to get kernel version 6.8-rc1? is there a specific > distro that ships with development / rc builds of the kernel, or is it > better to install something like Debian Stable and then compile / install a > development build? Ideally I'd replicate your setup to confirm it isn't an > issue on my end. Hi Andrew, Sorry for my late reply. My PowerBook G4's serial number is QT23727VLP4. This is my recipe for building kernels from kernel.org tarballs on Debian Bookworm: sudo apt-get install build-essential sudo apt-get build-dep linux tar xzf linux-6.11-rc1.tar.gz cd linux-source-6.11-rc1 cp /boot/config-6.1.0-15-amd64 .config scripts/config --enable DEBUG_INFO_NONE scripts/config --disable DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT scripts/config --disable CONFIG_DEBUG_INFO_BTF scripts/config --disable SECURITY_LOCKDOWN_LSM scripts/config --disable MODULE_SIG make olddefconfig make clean make bindeb-pkg Note that the upstream kernel source contains a build script for Debian packages. However, Debian has their own, different procedure for building development kernels: https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-official-vcs I've also tested with 6.11-rc1 now. Again, the Linux box was able to access the PowerBook's drive over Firewire. I was able to mount sdb10 as an hfsplus filesystem and see the contents. -- Adam |