# bhyve framebuffer: atkbd data buffer full



## aragats (May 2, 2017)

I believe this is an old issue, but I experience it in my both bhyve Windows 7 setups on completely different hardware.

When accessing bhyve framebuffer via vncviewer (doesn't matter which one) I cannot type, bhyve spits out _*atkbd data buffer full*_ message with each keystroke.

There exists a bug report but nobody ever reacted it.

This issue is very annoying, are there any workarounds?

Thanks!


----------



## grehan@ (May 2, 2017)

Can you post the bhyve command line you are using ?


----------



## aragats (May 2, 2017)

Here is the script I run to start bhyve:
	
	



```
#!/usr/local/bin/bash
CD=/home/sergeym/vm/win7-inst-v5.iso
HD=/dev/zvol/zoo/win7
UEFI=/usr/local/share/uefi-firmware/BHYVE_UEFI.fd
MEM=4G
VM="win7"
IF="tap0"
MAC="mac=00:A0:98:78:32:22"
DPY="w=1024,h=768"

while true
do
    sudo bhyve \
      -c 4 -S \
      -s 0,hostbridge \
      -s 3,ahci-hd,$HD,sectorsize=512 \
      -s 4,ahci-cd,$CD \
      -s 5,fbuf,tcp=0.0.0.0:5900,$DPY \
      -s 10,virtio-net,$IF,$MAC \
      -s 31,lpc \
      -l com1,/dev/nmdm0A \
      -l com2,/dev/nmdm1A \
      -l bootrom,$UEFI \
      -m $MEM -H -w \
      $VM

    RES=$?
    sudo bhyvectl --destroy --vm=$VM
    if [ $RES -eq 1 ]
    then
        exit 1
    fi
    echo sleeping for 5 sec...
    sleep 5
done
```


----------



## grehan@ (May 4, 2017)

Some more questions: what variant of Win7 ? (e.g. sp2)

Also, what CPU models were you seeing this issue on ?


----------



## aragats (May 4, 2017)

Both are Windows 7 Enterprise SP1.
One is on Intel(R) Core(TM) i7-3520M.
Another on Intel(R) Xeon(R) CPU E5-1650 v3.

I believe, OSs have latest updates, especially the one on Xeon.

The keyboard used to work in VNC several months ago, I'm not sure when it's happened: after updating FreeBSD or Windows. Usually I use RDP, not VNC.


----------



## grehan@ (May 5, 2017)

I tried this config and it seemed to work Ok with an install/boot of Win7 Sp1. However, that wasn't with much runtime. Are you seeing this immediately on reboot, or after a long period of use ?


----------



## aragats (May 5, 2017)

Yes, believe, I see it right after reboot.
When I start typing in the username/password boxes (in a VNC client) nothing happens (no symbols appear) until the buffer gets filled, and bhyve starts printing _*atkbd data buffer full*_ messages.


----------



## sp55aa (May 20, 2017)

you need add this to bhyve:

```
-s 29,xhci,tablet
```


----------



## aragats (May 20, 2017)

sp55aa said:


> you need add this to bhyve:
> 
> ```
> -s 29,xhci,tablet
> ```


It's not clear how xhci "fixes" the keyboard problem since it's for mouse (in this case). Yes, the keyboard is working, but the mouse doesn't since Windows 7 doesn't support XHCI.
I and other people already have tried installing Intel drivers without any success, see this thread.
The keyboard used to work before a certain update, and I believe it still works for many people...


----------



## aragats (May 20, 2017)

This is really funny: after I've tried the _*xhci*_ option and then removed it, the keyboard works in VNC now!
I restarted bhyve several times and it still works! Cannot imagine what could happen!

UPDATE: the keyboard still works after restarting the computer!
Maybe grehan@ can shed light on this magic?


----------



## grehan@ (May 20, 2017)

Unfortunately not  I've not been able to repro this - have had a 4 vCPU Win7 VM up and running on and off for a couple of weeks now without seeing the issue. That said, I didn't include the nmdm config lines so will give that a try.


----------

