# Ubt0: Ubt_Bulk_Read_Callback USB,ERR_STALLED(13.1PreRelease(Stable) vs 14.0-Current)



## Lamia (Mar 1, 2022)

This is dmesg output on 13.1PreRelease:


> ubt0: ubt_bulk_read_callback:1119: bulk-in transfer failed: USB_ERR_STALLED


A command like "poudriere bulk -f....", ran from desktop, will kill display and the image shows what appears next on screen. One can't get any work done at the terminal than to reboot.

On upgrading to 14.0-CURRENT and rebooting, the kernel debug message below comes up.




All USB options (Legacy Support, XHCI Handoff, USB Mass Storage Driver Support and Port 60/64 Emulation) in Bios are disabled, yet no luck.


----------



## SirDice (Mar 1, 2022)

Log in to FreeBSD Bugzilla
					






					bugs.freebsd.org


----------



## Lamia (Mar 1, 2022)

Hurriedly done!
Thank you Sir.


----------



## SirDice (Mar 1, 2022)

Better report the issue so it can be fixed before the release.


----------



## hselasky@ (Mar 1, 2022)

FreeBSD-14 should boot off a USB stick. What you've found is a bug in the ahci driver.


----------



## hselasky@ (Mar 1, 2022)

262263 – ahci: Unaligned free to UMA zone (ada_ccb)
					






					bugs.freebsd.org
				




I'm trying to get some people to look at this. I believe it is a known issue and will be fixed soonish!


----------



## Lamia (Mar 1, 2022)

I found a bug! Hurray!!!
Now, I am elated that wasted hours and days yielded sometime magnificent.

Imagine waking up to a new day full of promises of doing XYZ tasks, only to start hopping from one version or distro to another in a bid of place your box in a functional state for the tasks.

Not the best!


----------



## hselasky@ (Mar 1, 2022)

I wonder if the USB UBT issue you are seeing is caused due to missing firmware.


----------



## Lamia (Mar 1, 2022)

Most likely. If I could disable the peripheral, that would be fantastic. 
I am running out of ideas and patience. I cannot run poudriere/portmaster builds on server and client boxes. Such poudriere command kills a display on one box;  portmaster in a jail causes kernel panic,I suppose, and restarts another box. 

Thanks to the entire dev team.


----------



## hselasky@ (Mar 1, 2022)

To disable ubt, I think you can add to /boot/loader.conf :

```
dev.ubt.0.disabled="1"
dev.ubt.1.disabled="1"

# Or

hint.ubt.0.disabled="1"
hint.ubt.1.disabled="1"
```
This or something similar to this should do the trick. I don't remember the exact syntax.


----------



## Lamia (Mar 1, 2022)

See https://forums.freebsd.org/threads/...gen-only-4-hours-on-freebsd.66025/post-388960. The preferred approach is no longer accessible - dead link. Got a clue of doing it with dev rules? I could guess but need to sure it is only ubt0 disabled as indicated in the error message.


----------



## grahamperrin@ (Mar 1, 2022)

Sorry, messages crossed paths. 



Lamia said:


> … Got a clue of doing it with dev rules? …



I stumbled across this 2016 gist: <https://gist.github.com/unrelentingtech/44f4f3e791a057bc4f3619a166a03b87>


----------



## argwings (Mar 1, 2022)

There's some Bluetooth change in stable that I feel like was supposed to make it into releng several months ago but didn't, but I can't for the life of me find it now.

It's from here: https://github.com/sinetek/iwmbtfw
Will that be in there? I think the most important change is in iwmbtfw.conf.


----------



## grahamperrin@ (Mar 1, 2022)

argwings said:


> … some Bluetooth change in stable … from here: https://github.com/sinetek/iwmbtfw …



<https://github.com/freebsd/freebsd-src/search?q=iwmbtfw&type=commits> finds a few things but nothing in stable/13.


----------



## argwings (Mar 1, 2022)

Yeah, 0x0029 from the screenshot needs firmware from iwmbtfw.


----------



## Lamia (Mar 1, 2022)

FreeBSD 13.1-PRERELEASE FreeBSD 13.1-PRERELEASE #1 stable/13-n249796-d69b681240f: Tue Mar  1 01:25:04 PST 2022    /usr/obj/usr/src/amd64.amd64/sys/CUSTOMKERNEL  amd64



grahamperrin said:


> Maybe this? (If not, I'll delete this post.)
> 
> 
> 
> ...




I am afraid, it did not work.


grahamperrin said:


> Sorry, messages crossed paths.
> 
> 
> 
> I stumbled across this 2016 gist: <https://gist.github.com/unrelentingtech/44f4f3e791a057bc4f3619a166a03b87>



Nope.


argwings said:


> There's some Bluetooth change in stable that I feel like was supposed to make it into releng several months ago but didn't, but I can't for the life of me find it now.
> 
> It's from here: https://github.com/sinetek/iwmbtfw
> Will that be in there? I think the most important change is in iwmbtfw.conf.


I installed it but no luck.


argwings said:


> Yeah, 0x0029 from the screenshot needs firmware from iwmbtfw.


Honestly, I did.



> If users want to disable isochronous transfer on ubt (like me), set loader tunable  hw.ubt.usb_isoc_enable=0


Nope.



> If users want to disable isochronous transfers, which cause high  frequency periodic interrupts from the USB host controller, then net.bluetooth.usb_isoc_enable can be set to zero, either as a   sysctl(8) or as a loader.conf(5) tunable


It was set in sysctl.conf and box was restarted. No luck.


----------



## argwings (Mar 1, 2022)

Last time I had bt working was on stable, and I had to do a cold boot for the ugen to appear. I can't be bothered, really. Seems like it's not your real problem though.


----------



## Lamia (Mar 1, 2022)

hselasky@ said:


> hint.ubt.1.disabled="1"


This worked. 

I suspect enabling META_MODE in /etc/src-env.conf is making poudriere to break display and drop to console. The customkernel & world were built with it enabled i.e. loaded filemon before make build.


----------



## argwings (Mar 1, 2022)

I'll try that. I get console spam for like a minute with a similar error to your first screenshot each boot. Oddly disabling it in the BIOS didn't help.


----------



## Lamia (Mar 2, 2022)

I need completely drop heimdal; I have GSSAPI_MIT set in make.conf. Yet, a pkg upgrade is indicating that it will pull heimdal.

New packages to be INSTALLED:
        heimdal:

I am now using ports despite building pkgs with poudriere.

/ete/make.conf:


> OPTIONS_SET+=GSSAPI_MIT
> OPTIONS_UNSET+=GSSAPI_BUILTIN GSSAPI_HEIMDAL GSSAPI_NONE KRB_MIT KRB_HEIMDAL KRB_BASE KERBEROS HEIMDAL



The kernel and world used same make.conf.


----------



## argwings (Mar 2, 2022)

No luck putting that in device.hints.


----------



## argwings (Mar 3, 2022)

Complaining in a bug report worked. xD Not only did I put that hint in the wrong file but I also had the wrong number, and I needed to cold boot.

hint.ubt.0.disabled="1" in /boot/loader.conf


----------

