Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bluetooth does not work properly after waking up from suspend #362

Open
genericCandy opened this issue Mar 20, 2024 · 2 comments
Open

bluetooth does not work properly after waking up from suspend #362

genericCandy opened this issue Mar 20, 2024 · 2 comments

Comments

@genericCandy
Copy link

When I wake my laptop (Arch, ags 1.8.0) from systemctl suspend, the bluetooth service does not work properly, and I have to restart ags.

Steps to reproduce:

  • Use ags with the config.js below
  • Run systemctl suspend then wake up the computer
  • Connect / disconnect a Bluetooth device

Expected behavior:
The value of the label is updated

Actual behavior:
The value of the label is not updated (it looks like the widget does not receive a signal)

config.js:

const bluetooth = await Service.import('bluetooth')

const bluetooth_hook = Widget.Label().hook(bluetooth, self => {
    // print(Utils.exec('date'))
    // print(JSON.stringify(bluetooth.connected_devices))
    // print("\n")
    self.label = `${bluetooth.connected_devices.length}`
})

App.config({
    windows: [
        Widget.Window({
            name: "test",
            anchor: ['top'],
            exclusivity: 'exclusive',
            child: bluetooth_hook,
        }),
    ]
})
@genericCandy
Copy link
Author

Even replacing the label by a button (and getting the connected devices on click) doesn't work, and since bluetooth.getDevice(...)._device also says that the device isn't connected (it is), i think it may be a GJS issue (not quite sure so i'm leaving this open)

Though it surprises me that i could not find any occurrence of this issue online, so it may be only on my machine

@genericCandy
Copy link
Author

After reinstalling Arch, the issue still persists (i hoped that something messed with gjs / a dependency and that reinstalling could fix it, but nope).

At this point, there's not much i think i can do (I tried reproducing with only gjs, but i don't know it much (nor do i know much javascript)), so i will leave this open :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant