Sitelet https://github.com/usb4java/usb4java/issues/75
Skip to content

CAP_SUPPORTS_DETACH_KERNEL_DRIVER always FALSE #75

Description

@developersu

Environment:

  • OS: Gentoo amd64
  • Java version openJDK 11.0.5
  • usb4java version 1.2.0 and 1.3.0

Bug description
On Windows (x64) 7, 10, Linux (amd64) every time I check hasCapability(LibUsb.CAP_SUPPORTS_DETACH_KERNEL_DRIVER) I see false value.

However, the chain of kernelDriverActive(..) ?-> detachKernelDriver(...) -> do_the_job -> attachKernelDriver(...) works for me.

Also setAutoDetachKernelDriver(...) works as a charm.

I'm reading your documentation / examples and I don't understand, why should I check this CAP_SUPPORTS_DETACH_KERNEL_DRIVER? Could you please tell me on what platform it would return true? What is the best practice for this? Just don't check and use setAutoDetachKernelDriver(...) for every app without any pre-validations?

Thank you!

Reproduction
System.out.println(LibUsb.hasCapability(LibUsb.CAP_SUPPORTS_DETACH_KERNEL_DRIVER));

Expected behavior
Emm.. To be honest, now I'm not sure what should I expect. Please advise.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions