-
Notifications
You must be signed in to change notification settings - Fork 426
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
How to configure MX Keys on a headless linux distribution? #2736
Comments
Do you really have a system with no bit-mapped display but a connected keyboard? How can you see what you are doing? In any case, have you tried |
Web interface and SSH. This is normal for NAS operation. |
So you have a keyboard directly connected to the computer but you view the system via SSH? That is unusual. If, on the other hand, the keyboard is connected to another system then you just run Solaar on that other system. |
Which part is it you don't understand? I have a console TTY exposed via HDMI and want to use my switchable wireless keyboard on it. The mouse is already working, the keyboard is not. |
I've never seen a setup where a keyboard or mouse is physically connected to a headless computer. Are you sure you are running headless? I've also never heard of a TTY interface that goes through an HDMI port. In any case, Solaar is designed to work in a normal seat setup, where keyboard, mouse, and bitmapped screen are all tied together. |
I hear you are very confused. At the end of the day, whether you use a GUI or CLI to configure Solaar, there has to be a configuration file somewhere. I would like to see one, that has a wireless |
Solaar doesn't work that way. At startup Solaar recognizes devices and creates configuration files for the current state of the device. You can then use the Solaar GUI to change the state of the device, which Solaar remembers and applies each time the device connects to the computer while Solaar is running. |
That's what I said. |
The point of my comment is that there is no initial configuration for devices. Solaar constructs a configuration for each device it sees based on the current state of the device and then uses and modifies that configuration to keep the device in the requested state. But Solaar needs to be running to apply the state to the device. You could, I suppose, use the Solaar CLI to push settings to the device, but the settings need to be pushed each time the device comes back from a power-saving state. You can use |
Apologies if I'm adding to the confusion, but it sounds like the issue here is either misconfiguration or pairing, rather than Solaar itself. First-off, no Logitech keyboard I have ever seen supports WiFi, and the MX Keys certainly do not. Depending on the model, Logitech wireless input devices support either Bluetooth, one of several different generations of proprietary radio interface to a USB receiver dongle, or both. The MX Keys supports both Bluetooth and a slightly outdated proprietary radio interface (superseded by the more secure Logi Bolt interface used by the MX Keys S and some other recent Logitech peripherals). Referring to non-ethernet radio interfaces as "WiFi" just makes your messages more difficult to understand, so I would suggest avoiding it in the future. Please treat "WiFi" as a term exclusively for conventional wireless networking based on the IEEE 802.3 standards family. Second, if you have a keyboard paired with a compatible USB receiver, then you can plug that receiver into pretty-much any system with USB ports and it will "just work", no special software is required. The only things Solaar can add to this is some extra feedback (e.g. battery level), customization, and control over input device to Logitech USB receiver pairing (pairing is important, but very rarely needed because Logitech devices normally ship already paired with a receiver). Bluetooth is technically an option, but it is notoriously flaky and failure-prone in general, especially-so on Linux. If your headless device supports USB peripherals, then USB is absolutely the correct choice. If your keyboard is already paired to a Logitech USB radio receiver, you can just plug the receiver in, you do not need Solaar or any other user-space application. The USB receiver will present the keyboard as a standards-compliant USB human interface device, which has native support in the Linux kernel. If for some reason your keyboard is not properly paired with a Logitech receiver, you can use Solaar to pair it. You do not need to do this on your NAS device. Just plug the receiver into a Linux system with a GUI desktop environment and Solaar, and pair it with the keyboard as-per instructions. Once it's paired and working, un-plug the receiver from your desktop system and connect it to the headless device. The keyboard/receiver paring will remain until you un-pair it, and the MX Keys should show up as a USB HID compatible keyboard (visible with lsusb). If your NAS device has no USB ports, so you must use Bluetooth, then Solaar isn't necessary (or even helpful). Instead, you should switch the keyboard to a Bluetooth profile and pair it with your bluetooth host interface using bluetoothctl (numerous tutorials are available on the web) or whatever console based Bluetooth management software is available on your installation. With the keyboard properly connected, your next problem is going to be making it work with your software. It is not possible, without extensive and irrational customization, to use a keyboard connected directly to your NAS device to interact with a remote SSH or web connection originating from a different machine. In those cases, you absolutely will need to use a keyboard (or equivalent) on the client system (i.e. the machine running the ssh client or web browser). For example if you are connecting using SSH via a smartphone, you would need to connect your keyboard to the phone, not the NAS device, in order to use it. However, you also mention HDMI output. It is worth noting that if a machine has a local keyboard and HDMI video output that's displayed somewhere, then by definition the machine isn't headless: '"Headless" is common jargon for "a system with no monitor or user-input devices connected". That may be a source of some of the confusion here. Even if the HDMI video output is being routed to a capture device that allows the display to be viewed remotely, it still functions as a monitor. As somebody who has used many IB and OOB remote KVM management interfaces, both built-in and retrofitted, I can tell you that it is absolutely not normal for such systems to support remote display, but expect you to use a locally-connected keyboard. It is in fact so abnormal that in almost 40 years of network administration I've never seen such a thing, but it is not impossible, so I'm willing to believe that you've found one that works that way. I still think you should consult the documentation carefully to make sure that's the case, as it's far more likely that either it supports full remote management, or else it supports a local keyboard and monitor. In any event, if you have your MX Keys paired with a suitable receiver, you can simply plug the receiver into a USB port on any system that supports USB human interface devices. You do not need to install Solaar, or any other application software, for this to work. If a system works with a generic wired USB keyboard, then it will work with a properly paired and functional Logitech wireless keyboard and USB receiver. If it does not work with a generic wired USB keyboard, then you need to fix that before complaining about wireless connectivity. Either way, unless I have entirely misunderstood your messages, you do not need Solaar installed for any of what you're trying to do. FWIW here is the portion of my Solaar config.yaml file that relates to my MX Keys S keyboard, the only changes I have made are that I removed my keyboard's serial number and unique ID, and deleted the roughly-half of the file that pertained to my mouse. As you can see, my Solaar config file just contains some cached information about battery level, key-function customization, and backlight settings. This file is not related to, or required for, basic keyboard connectivity. In fact, as I haven't applied any key customization settings, the only thing I would expect to lose if I removed Solaar from my system is the system-tray icon that displays the current keyboard/mouse battery level. Finally: If for some reason you feel that you must run Solaar on your NAS device, without connecting a monitor, the easiest way to do so is to install and run a VNC server (Debian 12 includes both TightVNC and TigerVNC, take your pick), and a desktop environment (XFCE is a fairly good balance of lightweight and functional). With that setup, you can use any VNC client to connect to your new VNC virtual desktop, where the Solaar GUI should be fully functional (please note: In this setup Solaar should be able to read the battery level and control pairing, but by default VNC does not listen for server-side input events, this may prevent it from doing key reassignment, and also you will not be able to use your MX Keys to type in the VNC desktop unless you connect it to the machine on which your VNC client is running, in which case Solaar would no longer be able to see it). |
Hi @cnww-ns
Indeed. Sorry, for the confusion. My bad, I wrote "WiFi" thinking the "Bolt" dongle was using that protocol. It's not as strange as it sounds. I have a SBC with no other network IF other than Ethernet NIC. I have a screen connected to its HDMI output, providing the tty1 console, but there is no GUI installed as it will work as a server, and I do not need the additional GUI overhead, even if small. I added a BT dongle and the "Bolt" dongle, and my Logitech Now, you say it's "better" to pair the keyboard using using the Bolt dongle, than it is using Bluetooth (BT). So I will try to see if I can somehow fire up another linux VM and use its UI for Solaar config. Perhaps trying to load your config file (shown below) before. - 1.1.8+dfsg-2
- _NAME: MX Keys S
_absent: [hi-res-scroll, lowres-scroll-mode, hires-smooth-invert, hires-smooth-resolution, hires-scroll-mode, scroll-ratchet, smart-shift, thumb-scroll-invert,
thumb-scroll-mode, onboard_profiles, report_rate, pointer_speed, dpi, speed-change, backlight-timed, reprogrammable-keys, persistent-remappable-keys,
crown-smooth, divert-crown, divert-gkeys, m-key-leds, mr-key-led, gesture2-gestures, gesture2-divert, gesture2-params, sidetone, equalizer]
_battery: 4100
_modelId: B37800000000
_sensitive: {backlight: false, divert-keys: true, fn-swap: false, multiplatform: true}
_serial: REMOVED
_unitId: REMOVED
_wpid: REMOVED
backlight: true
change-host: null
disable-keyboard-keys: {1: false, 2: false, 4: false, 8: false, 16: false}
divert-keys: {10: 0, 111: 0, 199: 0, 200: 0, 226: 0, 227: 0, 228: 0, 229: 0, 230: 0, 231: 0, 232: 0, 233: 0, 234: 0, 259: 0, 264: 0, 266: 0, 284: 0}
fn-swap: false
multiplatform: 0
It would still be useful to know how you determine the following?
|
All of the values in the file were filled in automatically by Solaar. I have never edited it by hand, except to remove unique identifiers for my particular keyboard when I posted it here. The "modelId" field is exactly as it appears in my config.yaml file. I haven't read the source code to figure out exactly how Solaar obtained this value, but I would assume this is either a value Solaar obtained from either the keyboard itself, or else the model Id is a key value from a list of supported hardware, and was derived from other identifying information obtained from the keyboard. While posting the file, I replaced my keyboard's serial number with the string "REMOVED". I did this on the basis that their might be some negative security implication to publishing my serial number. Also, it seemed highly unlikely that you (or anybody) would have an MX Keys S with the same serial number as mine, and thus my value would be incorrect for your file. I suspect that the only reason this field appears in the file is so that different customization settings can be kept separate for people who own more than one of the same type of input peripheral. I cannot find the serial number printed anywhere on my keyboard. It might appear on the original packaging, but probably the easiest way to find it would be to connect the keyboard to a machine running Solaar with a full GUI, and then copy the information out of the config.yaml file it generates. If you don't have access to a regular Linux desktop machine, you should be able to get the same result if you boot a live distro (e.g. Debian Live) from a USB stick on a machine with at least 2GB of RAM, and install Solaar on that, then copy ~/.config/solaar/config.yaml off of the live system using removable media or network storage of some kind. I did the same for the "unitId" field, as its contents was identical to the serial number, and the "wpid" field because I wasn't sure if the value in it was unique to my keyboard or not. Upon re-examination, I can see that the "wpid" value is just the first few characters of the Model Id, so I doubt it's an issue. I'll edit my original post to include the actual value. |
Information
solaar --version
andgit describe --tags
):Debian 12 (ARM64)
uname -srmo
):6.1.47
solaar show
for the target device (if applicable):Is your feature request related to a problem? Please describe.
The problem is that I have a headless distribution where there is no GUI available.
I cannot find any functioning configuration files or instructions that is actually working to connect the Logitech MX Keys. (I'm using the "EU version" with a small
Left-Shift key
that have an extra key (\|
) between that and theZ
key.)Describe the solution you'd like
(Mouse seem to work.)
Describe alternatives you've considered
logiopts
, but that didn't seem to work either. (Same issue of missing config files.)Additional context
Model:
P/N 820-009140
The text was updated successfully, but these errors were encountered: