Bug in Ubuntu's dispatcher-c-rewrite.patch in usb-modeswitch package break some LTE modems support


There is bug in dispatcher-c-rewrite.patch of usb-modeswitch package in Ubuntu that prevent usb-modeswitch from automatically applied correct configuration to LTE modems such as HP lt4220 / Snapdragon X12 LTE.

I filled bugreport to usb-modeswitch package but it’s looks like this patch was abandoned by Canonical. It’s a bit unclear what it’s purpose (what issue it solve and how upstream usb-modeswitch works in other distributions without it) and what to do if nobody working on fixing this in downstream (in Ubuntu).

What can be done to solve this?


The purpose of the patch seems to be to avoid a TCL dependency. To drop it, the jimtcl package (currently in universe) would need to first be included in main.

The patch is not small, and it’s not surprising if keeping up with upstream lags. At the same time I notice that jimtcl is a “small-footprint” TCL implementation, and it’s maintained by the same Debian developer as usb-modeswitch.

So a question to the Canonical folks here is: Any chance that a MIR for jimtcl would be approved?

Mathieu Trudel-Lapierre seems not to be here, but @didrocks (I see that you also are a member of the MIR approval team), do you have any thoughts?

Hey @gunnarhj,

I don’t know this package too well, but I don’t think we would take a second TCL implementation in main, as tcl is already in. It would need very strong argument on using it in usb-modeswitch and not the reference one (or try convincing upstream to make compatible tcl usage in usb-modeswitch) with the suite of TCL modules we already have in main.

So, I guess adapating the patch would be the way to go and it sounds late anyway for eoan, wdyt?

I have no strong opinion. I just notice that we have a significant Ubuntu/Debian delta and that a failure to keep it up-to-date seems to be causing @RussianNeuroMancer’s bug.

When the patch was written, the ISO should fit on a CD. The fact that that is not the case any longer is at least one argument. :slight_smile:

But I’ll ping Mathieu, who wrote the patch, and hear what he says.

usb-modeswitch is, as far as I can tell, up to date in the archive.

Are there bugs though? Certainly well could be.

However, that doesn’t mean the C rewrite patch is abandoned or completely busted, nor does it mean it is unnecessary. We made this extensive change to usb-modeswitch for one important reason: it would be best to not pull Tcl in the boot patch for a single thing that runs at every boot, on all systems. AFAIK that still would be the problem if it wasn’t a compiled C program.

At this point, I think that if the package can be compiled to a single binary with existing Tcl magic as it was added by upstream, and it doesn’t mean pulling in new Tcl things in main (ie. it’s completely self-sufficient with just the usb-modeswitch binary package) then it’s probably fine to drop the patch, since it imposes no maintenance burden on anyone then. That said, usb-modeswitch hasn’t changed in a while, doesn’t look likely to change much in the future, so the benefit is small.

I think the best course of action right now is just to tackle the bugs that are open, fixing whatever might be buggy in the rewrite.

Is there any information I need to provide to help with this bug I linked in the first post? I currently replacing this laptop with Lenovo Yoga C630 WOS so I will have HP Elite x2 1013 G3 with HP lt4112/Snapdragon X11 on hands for a limited time, so when new owner will start using it, my help with debugging will be a bit slow, as I will have to rely of new owner free time, and he could don’t have free time for weeks/months :frowning:

Edit: ok, I already see your answer on Launchpad.

Thanks for your reply, and welcome to the community hub, @cyphermox. :slight_smile:

I will make an attempt to build with existing TCL. Otherwise I see that the OP now has elaborated on the bug report, which is good.