You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a more modern Linux such as Fedora, a default power saving config option prevents newer Jade units from being able to communicate with the Green app, causing it to crash. Older Jades are unaffected because they have a different serial chip.
We should query if the power saving feature is enabled or not and provide an alert to the user that points them to instructions (I'm thinking here is a good home) for how to install appropriate udev rules that disable this feature every time the Jade is plugged into the host machine.
To check if a Jade is plugged in we can look to see if /dev/ttyACM0 exists and then proceed to determining if power saving is enabled.
It's possible for a non-root user to query the state of the power saving feature, even when inside a Flatpak sandbox:
$ cat /sys/bus/usb/devices/1-2/power/control
auto
Note this path is dependent on the user's machine and is very likely to be different across different sets of hardware. But, we can (again, as non-root user) look in each device subdirectory for the idProduct and idVendor files which contain the product and vendor IDs and see if we can find Jade's:
$ pwd
/sys/bus/usb/devices
$ ls -la */idProduct*
-r--r--r--. 1 root root 4096 May 30 07:36 1-10/idProduct
-r--r--r--. 1 root root 4096 May 30 07:36 1-7/idProduct
-r--r--r--. 1 root root 4096 May 30 07:36 1-8/idProduct
-r--r--r--. 1 root root 4096 May 30 07:36 3-1/idProduct
-r--r--r--. 1 root root 4096 May 30 07:36 usb1/idProduct
-r--r--r--. 1 root root 4096 May 30 07:36 usb2/idProduct
-r--r--r--. 1 root root 4096 May 30 07:36 usb3/idProduct
-r--r--r--. 1 root root 4096 May 30 07:36 usb4/idProduct
$ cat 1-10/idProduct
01a2
This particular device is not Jade :(. On to the next one...
I've tested the udev rule below (placed in /etc/udev/rules.d/21-jade.rules) on a couple different Fedora machines successfully.
This will turn off the power saving automatically any time a Jade is plugged in.
Older Linux distros like Ubuntu 22.04 do not enable the power saving OOTB and are unaffected by this, but future versions might. It's unclear if it's a difference between Linux kernel versions or their configs or if Ubuntu is intentionally turning this off and Fedora leaves it untouched, so it's a good idea to tackle this ahead of time.
The text was updated successfully, but these errors were encountered:
On a more modern Linux such as Fedora, a default power saving config option prevents newer Jade units from being able to communicate with the Green app, causing it to crash. Older Jades are unaffected because they have a different serial chip.
We should query if the power saving feature is enabled or not and provide an alert to the user that points them to instructions (I'm thinking here is a good home) for how to install appropriate udev rules that disable this feature every time the Jade is plugged into the host machine.
To check if a Jade is plugged in we can look to see if
/dev/ttyACM0
exists and then proceed to determining if power saving is enabled.It's possible for a non-root user to query the state of the power saving feature, even when inside a Flatpak sandbox:
Note this path is dependent on the user's machine and is very likely to be different across different sets of hardware. But, we can (again, as non-root user) look in each device subdirectory for the
idProduct
andidVendor
files which contain the product and vendor IDs and see if we can find Jade's:I've tested the udev rule below (placed in
/etc/udev/rules.d/21-jade.rules
) on a couple different Fedora machines successfully.This will turn off the power saving automatically any time a Jade is plugged in.
Older Linux distros like Ubuntu 22.04 do not enable the power saving OOTB and are unaffected by this, but future versions might. It's unclear if it's a difference between Linux kernel versions or their configs or if Ubuntu is intentionally turning this off and Fedora leaves it untouched, so it's a good idea to tackle this ahead of time.
The text was updated successfully, but these errors were encountered: