Refine HID report writing logic

Blocking write on the keyboard HID device causes screen freezing
during turning off the host power. To fix this issue, this commit
refines the logic using non-blocking write. As a side effect,
non-blocking write introduces event dropping when kernel HID driver
returns -EAGAIN when the driver is in busy state so this commit also
adds retry logic to cover the case.

Tested: Didn't see the screen freezing issue.

Change-Id: Ibd95f567c49f448cd053948c14c006de17c52420
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
3 files changed
tree: fa70eff8f8c7ef372a65e81854d23877c8dd946a
  1. create_usbhid.sh
  2. ikvm_args.cpp
  3. ikvm_args.hpp
  4. ikvm_input.cpp
  5. ikvm_input.hpp
  6. ikvm_manager.cpp
  7. ikvm_manager.hpp
  8. ikvm_server.cpp
  9. ikvm_server.hpp
  10. ikvm_video.cpp
  11. ikvm_video.hpp
  12. LICENSE
  13. MAINTAINERS
  14. meson.build
  15. obmc-ikvm.cpp
  16. README.md
  17. scancodes.hpp
  18. start-ipkvm.service
README.md

OpenBMC IpKVM Server

The obmc-ikvm application is a VNC server that provides access to the host graphics output. The application interfaces with the video device on the BMC that captures the host graphics, and then serves that video data on the RFB (remote framebuffer, also known as VNC) protocol. The application also interfaces with the BMC USB gadget device to pass HID events from the BMC to the host, allowing the user to interact with the host system.

Usage

Once the host is running and an appropriate HID gadget device is instantiated on the BMC, the application can be started with the following command: obmc-ikvm -v <video device path> -i <HID gadget device path>

For example:

obmc-ikvm -v /dev/video0 -i /dev/hidg0