Luxafor for Linux

Hey, guys. Thank you in advance.

A family member got me a really thoughtful gift called Luxafor (the Flag model specifically). It is a USB device that has a colored LED light on it that can be changed to indicate how approachable you are at the moment (Red, under no circumstances, Yellow, if it’s really important, Green, I’m available, and there’s other colors, too).

Unfortunately they did not realize that it’s not exactly supported on Linux. The gift is thoughtful and I will actually get a lot of benefit out of using it if I can get it working.

I’m, however, not a very strong Linux user. I’m quite weak with understanding many command line things and am most functional utilizing a user interface/GUI of some sort. Regardless, at this point, I’m completely open to anything so long as it works in a straight forward manner.

I did find on the company’s website that some users have managed to make it work for linux. I’ve looked through the list, though, and many are not applicable (changes the light based off of status on Slack (which I don’t use) or Spotify (which I don’t care to link to it, etc). This site link is here if you wish to see it yourself:

From the list, I assumed as a CLI option, this one might be the most straight forward to use:

This one uses pyusb, which seems to be available in the Manjaro repository. However, these instructions are targeted at an Ubuntu user, and I don’t really understand how to make it work on Manjaro.

I’m open to other solutions as well. If I’m not being clear, I apologize:

  • Best case, I would love to find or use something with a GUI to manage the colors on the device. I’ve seen people have somehow leveraged using their system notifications to change it’s color some how? If that could be done with a GUI even, that would be fine.
  • Completely open to a CLI solution if that’s all that’s available. I’d def need something I could just copy/paste to make work, otherwise I feel the likelihood of me messing something up would be really high.

Anyways, again, I thank you for your time. Something as simple as helping me get going with this pyusb walkthrough would already be a huge step in the right direction and would be greatly appreciated. (I see that the guide mentions disabling Sudo permissions on it. That’d def be a helpful feature. Needing to key a password every time to change its state could be a bit disruptive in an ideal world). Thanks again. <3

Edit: If it matters, the version of pyusb I’m trying to use is:

And I am using Manjaro Gnome

Edit 2: I’ve discovered there’s an OpenRGB Flatpak program. I’m not sure if something like that would work in this case, but if so, that would probably be ideal and easiest since it seems to maybe have the functionality required and all the GUI I could ever need?

I’ve installed the version from the official repositories instead. It seems to detect my logitech keyboard and mouse, for example, but Luxafor isn’t listed as a supported device outright. I’m not sure if custom USB devices can be added to it or not. I’m going to keep researching it. I’m assuming someone knows if it’s a viable solution or not, though.

openrgb is in the repos, so no need for a flatpak. If it works then you’ll be able to change the colour, but if there are other features you probably won’t be able to use them.

sudo pacman -S openrgb

Well it’s designed for python 2.7, but it looks ok for python 3 (I only had a quick skim though).

Save the file in ~/.local/bin, then make it excutable.

chmod +x ~/.local/bin/

Add your user to the uucp group…Not sure if the device is the right type for this to work, but if it does then it will give you access to the device without sudo.

sudo gpasswd -a $USER uucp

Log out and back in again for the group to take effect, then test it out: color -l 255 -r 255 -g 0 -b 0

# or perhaps fade -l 255 -x "#73D216"

Thanks for the reply, bud! I wanted to wait a bit to reply until I’d fully tried what you’d asked. I’ve not managed to get the terminal stuff to work, but it’s probably more a shortcoming on my part and not a failure of your directions, so I can’t confirm/deny them outright. I appreciate your effort to try, though.

After/during your post, I decided to seek out OpenRGB since it seemed this is exactly the kinda stuff that project undertakes and the infrastructure is just already in place to do it.

If anyone else has an LED powered device that they need to get working and happens to find this thread, OpenRGB seems more than willing to offer support if you go through a few steps on your part. Mainly creating an issue on their Github using the “new device” template provided, as well as uploading screenshots of the OEM software that would normally be used to control it, as well as capture data via Wireshark.

In my case, I needed to get on a Windows machine where the factory software worked to go capture all the data. They also provide a video on youtube titled something along the lines of capturing wireshark data for OpenRGB or something to that effect. About a 2 minute video.

Anyways, if you meet all the criteria they ask for and make sure your ticket is buttoned up, they seem very willing to try and support the device. They do have a discord server, as well, and they’re fairly prompt to reply it seems (within a few hours I’d say). But the whole process may take a few days depending on things. I’m still not through that process myself as I type this message, but it’s seeming like it will be done today (about 24 hours after typing this original post).

So this reply is targeted at dmt, but also just a general reply to save future people time if they have an issue. dmt is correct in saying there’s abundant, but limited support for a very large selection of RGB LED devices, and if you’re willing to jump through some hurdles, your devices can be added, too.

Thanks again, dmt!

I would guess you need a udev rule for it before it will be seen as a usb device.

I would have tested it and made sure it was working, but I don’t have a Luxafor. The filename in the chmod command was incomplete, and I forgot to tell you to log out and back in again after adding yourself to the uucp group. Also we don’t know if the script is in a working state.

OpenRGB seems like the better option, especially if you want a GUI.

Very nice, future generations can go straight to OpenRGB. :smiley:

You may need one to access it without root. For serial devices (ttyACM and ttyUSB), it’s enough to add your user to the uucp group (and log out and back in), but that may or may not work for Luxafor.

I don’t know what the Luxafor enumerates as, or exactly which devices uucp applies to by default. It may need something like this rule (from luxafor-python):

 # Allow Luxafor USB control
 ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", MODE="660", GROUP="plugdev"

It uses plugdev, which doesn’t exist on arch based systems, we have uucp instead. Or we could use the uaccess tag, which uses PAM to allow locally logged in users to access the device. If you only want certain users to access the device, then the uucp group is probably the way to go.

So, with a bit of luck, one of these slightly modified versions should do the trick. :crossed_fingers:


# Allow Luxafor USB control through uucp
# only gives access to users in the uucp group
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", MODE="660", GROUP="uucp"
# Allow Luxafor USB control through uaccess
# AFAIK gives access to all locally logged in users
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", TAG+="uaccess"

After saving the file run these commands, or reboot.

sudo udevadm control --reload
sudo udevadm trigger

Just in case your Vendor ID or more likely Product ID are different…you can check using lsusb. You should see something akin to the mock-up below.

Bus 005 Device 001: ID 04d8:f372 Luxafor

04d9 is the VID (Vendor ID) and f272 is the PID (Product ID). In the udev rule you choose, replace the IDs with your VID and PID.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.