Marc's Public Blog - Electronics Hacking


vvv Click on the categories below to see other topic specific pages vvv



>>> Back to post index <<<

π 2026-10-15 01:01 in Electronics, Hiking, Linux

Making Garmin MTP units like Montana 710 not immediately shut down when plugged into a linux machine

This is a bit of a long page, so the TLDR, is:
Create /etc/udev/rules.d/99-garmin-passthrough.rules with
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="091e", ATTR{power/control}="on", ATTR{power/autosuspend}="-1"

save and run "udevadm control --reload-rules; udevadm trigger"

this ensures linux will not autosuspend the port which in turn causes the montana not to shut down, allows virtualbox to grab the port, hand it over to windows, and have basecamp work again. Yeah!

So many Crashes and Bugs with Montana 700

I have been a Garmin GPS user for over 20 years, starting with a Vista, upgraded to Oregon 700 and stayed with that for many years until they were discontinued, and my last one died. From there the Montana was the only Garmin GPS with a touchscreen and reasonable on screen keyboard to create new waypoints on the fly when I travel, so despite its size and weight (both too big compared to a more capable cell phone), I went with that.

The Montana 700 worked just like the ancient Vista HCx, it emulated a usb storage drive when you plug it in USB and I could mount it on linux as a drive, move files around like gmapsupp_xxx.img files when I had too many and wanted to hide some to avoid overwhelming the GPS. Also, it was easy to just copy all the tracks to linux and store them forever (I have all my tracks from the last 20+ years, you never know, haha).

This is also the time garmin introduced garmin explorer that was meant to sync all the tracks and waypoints of your GPS to the garmin cloud. It's a great idea in principle, in practise it was written poorly and never fixed in the last 2 years I've seen it, so with lots of tracks and 4000+ waypoints, I got:

  • over 24H to sync the waypoints to the cloud through some inefficient one by one copy with huge latency between each. Sad...
  • the copy/compare/sync is unreliable so it eventually duplicated all my waypoints both in the cloud and on my unit. Terrible....
  • at the same time, it likely had bugs or a memory leak that caused my GPS to shut down while I was recording tracks, leaving me with lost tracks when the GPS shut down, even more sad
  • I unfortunately confirmed that anything that causes an OS or serious application error that can cause a coredump (I'm going to guess it's not a memory protected OS and dates back to windows 3.1 memory management days), the unit shuts down and stops recording instead of rebooting
  • during that time the web explorer cloud site never had a properly working export mode where I could download all my data in a simple GPX file. The file would miss track names, or waypoints, or waypoint types. It's really not so hard to write something like this but as of this writing it's still broken in different ways and apparently not a priority to fix
  • turning off garmin explore fixed many of the crashes with the Montana 700, even if it brought it back to the level of an Oregon 700, however I found another vexing bug where when recording a track for multiple days while plugged in, usually a moving diving boat, the unit would shut down on its own after a day or two and stop recording too, losing part of my track.
  • I even got the unit/software to be wedged enough that the power button would register a beep as normal, but refuse to shut down the unit, to the point that I had to remove the battery to force a shutdown.
  • During all of these issues, I got coredumps, but while I was hopeful they would allow garmin to fix their software and OS (even with bad/corrupted maps or unexpected data, the unit should never crash). Unfortunately, since it's probably not a full OS with full memory protection and the software is not written to withstand imperfect data, as far as I know, nothing I reported, ever got fixed. It's also possible that they were just memory overflows with no protection either, and this example below clearly shows code was allowed to corrupt data (here sprites):

    All that said, while nothing I reported got fixed, not even the unit rebooting after a crash instead of just shutting down, garmin support did their best to help, even if nothing may have happened in the end. As part of that, they did rule out bad hardware by replacing my 700 twice, and after I still got more problems, all the way to the unit refusing to shut down, they gave me one more swap to a garmin 710 which is new hardware and upgraded to USB-C (I was indeed surprised that the 700 upgraded from super obsolete mini-USB to pretty obsolete micro-USB, and didn't have USB-C yet).

    Stopping using 3rd party openstreetmap gmapsupp.img files and moving to Garmin Topoactive data

    Unfortunately none of the coredumps gave any clue if we were hitting hardware bugs, or software bugs, and whether they were linked to the openstreetmap maps I was using when travelling in other countries. This is where I have to thank Leslie and Elizabeth from garmin support for pointing out that topoactive maps that were added in the last years are actually free repackaging of openstreetmap data in a way that has been verified not to crash the garmin software. This is not to say that the openstreetmap maps I was used to getting from the net, were crashing the montana, but it's technically possible. Big bummer that the many coredumps I gave never got anyone to say why the unit was crashing and whether it could be linked to bad map data. That said, the new topoactive data is much simpler to get than what I was doing manually and moving to the sdcard in a bunch of gmapsupp_country.img files, so I happily switched to that. Links:
  • https://support.garmin.com/en-US/?faq=24WYX2WS2aAJvm5lYQgAM7
  • https://support.garmin.com/en-US/?faq=UXl1PP15829qvEX6jdqekA
  • Upgrading from Montana 700 (usb-storage) to Montana 710 (MTP)

    At the same time, Garmin kindly authorized upgrading me to a Montana 710 at their cost, which I assume they did without ever being able to figure out if the 700 hardware was it fault. At the same time, I vouched to fully switch to topoactive maps, which is actually one great thing garmin implemented and that I'm happy to switch to.

    However, I still need to get the data off it (tracks and waypoints) and cannot use garmin explorer as explained above due to how broken it is, so I still need to use garmin basecamp in virtualbox with my windows 7 image, the last ok-ish windows :)
    When switching to USB-C garmin also switched from USB-storage (drive emulation) to MTP, which is reasonable. Linux has supported MTP for over 10 years, and it also works in windows 7, so no problem in theory. In practise, everytime I plugged the GPS in and activated storage mode (when using garmin spanner mode so it asks me before doing so), the GPS said it was switching to usb-storage mode, and then would shut down.
    When plugged in a real windows machine (not through virtualbox), it worked perfectly fine, and I tried with 7 other linux machines, including one 15 years old with a very old linux kernel, and each time it shut down, bummer.

    By then, I was pretty screwed because I did need basecamp and virtualbox to work, and eventually google gemini looked at the logs before shutdown:

    kernel: [94868.932764] usb 3-5: new high-speed USB device number 34 using xhci_hcd
    kernel: [94869.136992] usb 3-5: New USB device found, idVendor=091e, idProduct=0003, bcdDevice= 0.01
    kernel: [94869.136998] usb 3-5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    kernel: [94869.740855] usb 3-5: reset high-speed USB device number 34 using xhci_hcd

    Turns out the problem was this, as explained by The entire crash and shutdown loop was driven by the kernel's runtime USB autosuspend dropping link power at the 2-second mark.

    When no host kernel driver binds to the interface, the kernel suspends the port. The Montana firmware interprets that link drop as a physical cable disconnect, terminates storage negotiation, executes an emergency waypoint flush, and turns off. Keeping the link energized via ATTR{power/autosuspend}="-1" completely resolves the failure mode, allowing any VM to claim the device without racing against link power down.

    The montana is wrong, but garmin support made it clear that because it works on windows, they were not super interested in diagnosing or fixing it. Maybe with this page, they'll consider a fix, but in the meantime, the workaround is this:

    Create /etc/udev/rules.d/99-garmin-passthrough.rules with ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="091e", ATTR{power/control}="on", ATTR{power/autosuspend}="-1"

    save and run "udevadm control --reload-rules; udevadm trigger"

    this ensures linux will not autosuspend the port which in turn causes the montana not to shut down, allows virtualbox to grab the port, hand it over to windows, and have basecamp work again. Yeah!

    now it works
    now it works

    basecamp loading maps via MTP in virtualbox on linux
    basecamp loading maps via MTP in virtualbox on linux

    MTP shows both filesystems, the built in storage and sdcard
    MTP shows both filesystems, the built in storage and sdcard


    More pages: October 2026 July 2026 May 2026 December 2025 October 2025 July 2025 March 2025 January 2025 November 2024 September 2023 August 2023 June 2023 May 2023 April 2023 January 2023 November 2022 January 2022 May 2020 January 2020 December 2019 April 2019 January 2019 June 2018 May 2018 June 2017 April 2017 May 2016 February 2016 November 2015 October 2015 August 2011 July 2011 May 2011 June 2010

    >>> Back to post index <<<

    Contact Email