Skip to content

save rfkill state only after a device is stable and around for at least 10s #5768

@benzea

Description

@benzea

I was doing some work on rfkill and noticed that there are certain conditions where a device is programatically added and removed and the rfkill state is restored to be blocked. This is weird, because the reason for the device to be added in the first place is because another rfkill switch has just been unblocked. The result is that disabling airplane mode in GNOME can result in bluetooth to be still disabled. See https://bugzilla.gnome.org/show_bug.cgi?id=781506 for detailed logs of what is happening in the error case (the error is surprisingly rare).

At this point I am thinking that the best solution here is to never put a device into the blocked state if it is plugged in at runtime (as opposed to boottime). So it is correct to restore the block state for e.g. an external USB bluetooth dongle. But if this dongle is attached after boot then it makes sense to assume the user wants to use the dongle and not block it even if there was a block state saved.

I am open to other suggestions of how to solve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFE 🎁Request for Enhancement, i.e. a feature requestrfkill

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions