### Class

# FwupdPlugin Quirks

#### Description [src]

    final class FwupdPlugin.Quirks : GObject.Object
    {
      /* No available fields */
    }

Quirks can be used to modify device behavior. When fwupd is installed in long-term support distros it’s very hard to backport new versions as new hardware is released.

There are several reasons why we can’t just include the mapping and quirk information in the AppStream metadata:

- The extra data is hugely specific to the installed fwupd plugin versions
- The device-id is per-device, and the mapping is usually per-plugin
- Often the information is needed before the FuDevice is created
- There are security implications in allowing plugins to handle new devices

The idea with quirks is that the end user can drop an additional (or replace an existing) file in a .d director with a simple format and the hardware will magically start working. This assumes no new quirks are required, as this would obviously need code changes, but allows us to get most existing devices working in an easy way without the user compiling anything.

Plugins may add support for additional quirks that are relevant only for those plugins, and should be documented in the per-plugin `README.md` files.

You can add quirk files in `/usr/share/fwupd/quirks.d` or `/var/lib/fwupd/quirks.d/`.

Here is an example as seen in the CSR plugin:

    [USB\VID_0A12&PID_1337]
    Plugin = dfu_csr
    Name = H05
    Summary = Bluetooth Headphones
    Icon = audio-headphones
    Vendor = AIAIAI
    [USB\VID_0A12&PID_1337&REV_2520]
    Version = 1.2

See also: `FuDevice`, `FuPlugin`.

#### Hierarchy

#### Ancestors

- GObject

#### Constructors

###### fu_quirks_new

Creates a new quirks object.

since: 1.0.1

#### Instance methods

###### fu_quirks_add_possible_key

Adds a possible quirk key. If added by a plugin it should be namespaced using the plugin name, where possible.

since: 1.5.8

###### fu_quirks_load

Loads the various files that define the hardware quirks used in plugins.

since: 1.0.1

###### fu_quirks_lookup_by_id

Looks up an entry in the hardware database using a string value.

since: 1.0.1

###### fu_quirks_lookup_by_id_iter

Looks up all entries in the hardware database using a GUID value.

since: 1.3.3

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct FwupdPluginQuirksClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.