Comments (8)
It shows not connected, but the device is still connected?
I can't seem to recreate this.
If I do systemctl suspend
and wake up everything goes back to normal
from dotfiles.
Yeah, exactly.
Here is the terminal output from bluetooth/label connections:
https://imgur.com/a/v58cX6l
from dotfiles.
Hi @Aylur ,
I have a bit more details, unsure if this is happening to me due to having PC with dongle for Bluetooth 5.0 or just a general issue that doesn't happen to you, but here is what I found:
After a systemctl suspend is trggered and PC is waken up, I'm unable to retrieve a list of connectedDevices, but I still retrieve list of Bluetooth devices just fine.
Connected devices size is 0, but at never point I've disconnected any device.
I have BT keyboard and mouse which both work fine after sleep.
If you have any suggestions of what I can put to the console.log to further guide us into finding a solution, I will drop an output.
Thank you.
from dotfiles.
save this script to a file
const { USER, writeFile } = ags.Utils;
const { instance } = ags.Service.Bluetooth;
let output = '';
const logger = msg => {
const c_ids = [];
for (const [, d] of instance.devices)
c_ids.push(JSON.stringify(d._ids))
output += `
##### ${msg} #####
_getDevices ${instance._getDevices().length}
state ${instance.state}
devices ${instance.devices.size}
connectedDevices ${instance.connectedDevices.size}
c_ids ${JSON.stringify(c_ids, null, 2)}
`;
}
logger('start');
instance._getDevices().forEach(d => {
instance._deviceRemoved(null, d);
});
logger('removed');
instance._getDevices().forEach(d => {
instance._deviceAdded(null, d);
});
logger('added');
print(output)
try {
writeFile(output, `/home/${USER}/ags.log`);
} catch (error) { }
then run
ags &&
ags run-js "$(cat script.js)"
cat ~/ags.log
what is the output?
from dotfiles.
Hi @Aylur ,
OK strange thing happens, when I go back from sleep, bluetooth is still showing Not connected, but as soon as I run the command ags run-js "$(cat script.js)"
it appears again. Both icons for BT devices and in QuickSettings it shows as 2 connected as well. I guess something in the logic is refreshing Bluetooth Service state perhaps?
Here are the differences:
https://imgur.com/a/jVU380c
(on the left side is when everything is working fine, on the right it is after wake from sleep and running of the command)
from dotfiles.
After a bit of script tweaking this is the bare minimum what seems to reset it when I run the command: ags run-js "$(cat script.js)"
const { instance } = ags.Service.Bluetooth;
instance._getDevices().forEach(d => {
instance._deviceRemoved(null, d);
});
instance._getDevices().forEach(d => {
instance._deviceAdded(null, d);
});
This somehow adds back the icons to the topbar and updates the service, though css is not applied this way :)
from dotfiles.
This script essentially forces a reread from GnomeBluetooth.
So it seems your issue is caused either by gnomebluetooth not emitting the signal (which I doubt),
or something specific on your setup that ags doesn't account for (which is more likely).
I will have to read a bit more into gnomebluetooth, in the meantime you can run this script after suspend or restart ags as a temporary fix.
from dotfiles.
I've applied the hack to run every minute or so on a interval to check for the status of Not connected, just as a temporary hotfix.
I'm unsure if I did break anything, but my config is basically your dotfiles, with small modifications and removal of some things I didn't need.
I would assume it is just the difference between using a dongle and integrated chip for Bluetooth.
from dotfiles.
Related Issues (20)
- Distro icon not obtained with the right method
- Ags bar is not showing HOT 1
- Greeter not showing up HOT 7
- Launcher integration with hyprland? HOT 2
- [Feature Request] A lock screen HOT 4
- Log out issue
- Sleep confirm window
- [Feature request] Add clipboard manager HOT 1
- [Feature request] Add symbols and emoji's to the launcher HOT 1
- On Arch installation with nix binary HOT 2
- Steam Icon HOT 1
- add a scrollbar to network and Bluetooth HOT 1
- Missing Icons HOT 5
- requiring girepository but it has 2 version available HOT 1
- Bring back bar with gaps between blocks HOT 1
- Seperate top bar background color HOT 2
- Support non-Hyprland Wayland compositors? HOT 1
- QuickSettings: Network-Settings does not work. HOT 2
- [Bug] Notification view so wide HOT 3
- failed to build matugen because of material-colors HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotfiles.