git clone https://github.com/nextcode4u/LG-Soundbar-Linux.git
cd LG-Soundbar-Linux
sudo apt install python3-tk
bash install.shTo update, Quit the running app, then run git pull --ff-only and bash install.sh from this folder. Presets are preserved.
On first launch the GUI asks for the paired soundbar Bluetooth address and saves it locally. Find the address with bluetoothctl devices. You can also set LG_SOUNDBAR_MAC; terminal mode accepts --mac and --channel. No general model compatibility is claimed.
See HARDWARE-STATUS.md for observed results. In particular, the eight advanced queries received no replies on the tested SKM5Y. Firmware dumping and the Portable-input auto-shutoff override remain unresolved.
First pair/trust your soundbar in Ubuntu and launch the GUI once to save its address. Then run from this repository:
sudo apt install bluez pulseaudio-utils
bash install-autoconnect.shThis replaces the earlier lg-soundbar.service and lg-soundbar.timer under your user account and enables the timer. It retries every 25 seconds after each run finishes while your user service manager is running, reconnects when needed, and selects the soundbar as the default audio output when its sink is available. It works with PulseAudio or PipeWire's PulseAudio compatibility service. It does not pair devices, force an input switch, or move streams explicitly pinned to another output. While enabled it will reselect the soundbar if you choose another default output.
Disable it with:
systemctl --user disable --now lg-soundbar.timer
systemctl --user stop lg-soundbar.serviceView status/logs with:
systemctl --user list-timers lg-soundbar.timer --no-pager
journalctl --user -u lg-soundbar.service -n 30 --no-pagerThe desktop installer does not enable this timer; run the optional installer separately. This uses the saved device-address.txt, so no device address is embedded in the repository.
Close the old app window. Replace the previous ZIP in Downloads with this updated LG-Soundbar-Linux.zip and run:
sudo apt install python3-tk
unzip -o ~/Downloads/LG-Soundbar-Linux.zip -d ~/Downloads
bash ~/Downloads/LG-Soundbar-Linux/install.shOnly package installation uses sudo. The installer runs as your normal desktop user. It overwrites the existing Python scripts in ~/.local/share/lg-soundbar-linux and both existing launchers, keeps presets, and does not enable auto-start or alter the earlier audio-routing service.
Double-click LG Soundbar Remote on the desktop. If needed, right-click and choose Allow Launching. The application menu has the same launcher. Choose Connect / refresh in the window to read the soundbar.
- Sound: volume, bass, treble, woofer and rear levels; mute, Night mode and surround switches; input/effect dropdowns.
- Click a level slider and use Up/Right to increase or Down/Left to decrease one step. Tab moves keyboard focus. You can also drag sliders or click the +/− buttons.
- Changes apply after a 450 ms pause. Volume/mute use a feature-status read for verification; EQ/tone use matching setting reports; utility controls use their read requests. Controls briefly disable while Bluetooth work runs, keeping commands sequential. The window remains responsive.
- More controls: additional features only when supported and readable, including experimental APD when advertised.
- Presets: save current settings under a name, apply a saved preset, or delete it. Old terminal-version presets use the same file and remain available. APD and sleep timers are not saved in presets.
- Connection log: shows recent packet traffic after operations for troubleshooting.
- A dash or disabled control means there is no usable current response. The app does not invent a value.
- Volume, mute, Night and EQ/tone reports update the UI as they arrive. Refresh after changing inputs or other settings elsewhere.
No settings change merely by opening the window or connecting. The X button minimizes the window and keeps the control socket and receiver running. Restore it from the dock; do not open a second copy. The separate Quit button exits and closes serial control. It does not explicitly disconnect Bluetooth audio. Quitting the app discards any adjustment still waiting for its debounce timer; wait for readback confirmation if you want it applied. Quit is deferred while an operation is running so writes are not interrupted. Input switching can disconnect the Bluetooth session; use Connect / refresh afterward.
Click Scan advanced controls to query advertised controls. To investigate this SKM5Y beyond its capability flags, optionally check Also query unadvertised features (experimental) and scan again. This sends only eight specific APK-traced setting/status reads plus the second capability-bank query; it does not sweep unknown command IDs. A missing reply stays unavailable. A syntactically valid response is not proof of full hardware support.
Verified writers are exposed for LED display (Auto/Off/On), Up-mixer, WOW Orchestra, rear left/right swap, and speaker isolation (all speakers/main/woofer/rear left/rear right). A writer requires a valid single-byte current response. Select a value, then Apply. Each write requires matching readback, with no automatic retry. Speaker isolation mutes other channels; select All speakers afterward. These settings are excluded from presets. They are not automatically restored on Quit or disconnect.
Special EQ status (Off/Atmos/DTS:X/TV Sound Share), Soundbar mode status, and Meridian EQ indices are read-only. No verified application setter was found for these paths; their replies must not be confused with selectable effects.
Results are saved to ~/.config/lg-soundbar-linux/advanced-controls.json (respecting XDG_CONFIG_HOME). Support flags and actual responses are recorded separately. An unadvertised feature remains labeled unadvertised even if it responds. No claim is made that this SKM5Y supports these newer-model features until its replies and behavior are checked.
See Advanced-Controls-Trace.md for source mappings and packet values.
More controls now includes an explicit Power off button and read-only Smart Diagnosis status. Power off asks once, sends the APK's general 0A / 00 command, and ends serial control; it does not claim power-on support or confirmed shutdown. Diagnostics query supported items, initial sound-check information, amplifier status, diagnostic volume, Bluetooth audio state, and woofer connectivity where the supported-item reply permits them. No sound-check initialization or reset is sent. Queries without replies are shown as unavailable.
Woofer, rear, surround and advertised extra-setting notifications now update current UI values. DRC, TV remote control and Auto Power are confirmed advertised/readable by the supplied SKM5Y log. Together with input, sound effect, volume, bass, treble, woofer, rear, mute, Night and surround these are the presently established adjustable settings. Other models may advertise additional controls already implemented under More controls. No additional SKM5Y sound parameter has been established by this review.
The power and diagnostic commands are APK-derived and covered by offline tests; they still need live verification. Use Quit before installing an update, because X keeps v0.4 and newer running.
- X minimizes; Quit explicitly exits. This avoids closing the serial connection when dismissing the window. It does not guarantee the soundbar or Bluetooth stack will never disconnect independently.
- More controls lists unadvertised features and features with missing replies.
- Sleep timer dropdown: Off, 10–90 minutes in 10-minute steps, 120, 150, 180. Enabled only with advertised support and a valid current response. This is separate from idle auto-shutoff. Your supplied SKM5Y feature reply does not advertise it.
- Connection log tab: Read firmware information requests type/version metadata only. Saves ~/.config/lg-soundbar-linux/firmware-info.json (or XDG_CONFIG_HOME equivalent). No transfer or flashing command is used.
- See Firmware-Research.md for the APK findings and limits of firmware extraction.
- Removed empty volume/mute queries and selector-only EQ queries. The old empty volume request was followed by a zero-volume report; it must not be used as a read.
- Volume and mute now read feature status (command 03). Initialization retains unsolicited EQ and tone frames, including multiple frames in one receive.
- Your supported-effects report decodes to Bass Blast, ASC and DTS Virtual:X. Your capability report does not advertise APD; no APD switch is enabled on that evidence.
- The Sound and More panels scroll, text is more compact, and errors use a resizable dialog.
- The window title includes v0.3 so you can check the update installed.
The UI imports and compiles, and the 26 offline protocol tests pass, including regression cases from your hardware log. A graphical display was not available in the build environment, so the window has not been visually exercised here. Hardware behavior still needs verification on your soundbar. No live-device compatibility claims are implied by the offline tests.
For troubleshooting launch from a terminal:
python3 ~/.local/share/lg-soundbar-linux/lg_soundbar_gui.pyThe original numbered menu remains available:
python3 ~/.local/share/lg-soundbar-linux/lg_soundbar.pyA terminal menu controller for the LG SKM5Y, using commands extracted from the supplied LG Soundbar 1.6.32 APK. This is a working software prototype; no physical soundbar was available for hardware testing during development.
- Extract the ZIP into Downloads.
- Open a terminal in the extracted
LG-Soundbar-Linuxfolder and runbash install.shwithout sudo. - For the numbered menu, run
python3 lg_soundbar.py. The installed desktop launcher now opens the graphical UI. - Select 1, then Enter, to connect and read settings. Initially allow around 15–35 seconds for feature queries; unanswered queries expire.
Requires Python 3 with Linux Bluetooth socket support, a powered Bluetooth adapter, and the soundbar already paired. No pip packages are required. The address is configured locally; RFCOMM channel defaults to 10, as discovered on the tested device.
The app opens only serial control; it does not change Ubuntu's audio routing. Your previous automatic audio-connection service and launcher remain separate. Stop old Python serial listeners and close the phone's LG app before connecting if they occupy the control channel.
For direct use: python3 lg_soundbar.py. Optional arguments: --mac XX:XX:XX:XX:XX:XX --channel 10.
The menu includes volume, mute, sound effect, bass, treble, woofer level, rear level, surround, Night mode, input selection, extra supported settings, save/apply presets, status, diagnostics, and serial disconnect. Type the option number and press Enter. Input prompts use device-reported bounds; bass/treble can fall back to the −5/+5 limits shown in your SKM5Y screenshots.
A control requires a valid current-value response. Effects and inputs must come from the device's supported lists. Extras require both an advertised capability and a valid current-value response. Unsupported or unresponsive features are not silently treated as OFF.
Extras implemented when advertised: dynamic range control, TV remote control, AV sync, automatic volume, Auto Power, automatic display, center/side/upward speaker levels, Neural:X, dialogue level, sound feedback, and experimental APD on/off.
This version intentionally does not expose firmware transfer, factory reset, arbitrary raw command writes, or controls whose value encoding has not been sufficiently traced. Wi-Fi integrations, room calibration, WOW features, LED mode selection and three-band EQ are documented in the inventory but are not implemented in this first controller. It is not full parity with every model supported by the Android app.
Adjust the settings, then choose 14 and name the preset (for example Movies, Music or Night). Saving refreshes values from the device first. You may include the current input; default is not to include it.
Choose 15 to apply. Presets are device-specific, and all stored values are checked against currently available controls before writes begin. Volume is applied near the end, and input last because changing inputs can disconnect Bluetooth. Each command requires a matching device report; EQ/tone responses are not independent readback verification. A mismatch or missing response stops the preset and reports partial completion; it does not silently retry or claim all settings applied.
APD and sleep timer are excluded from presets. APD can be changed manually under 13 only if advertised and readable. Its effect on the Portable-input timer is unverified. A matching protocol readback is not proof that the soundbar stays on indefinitely.
The terminal status display is a snapshot. The graphical UI also consumes incoming volume and EQ/tone reports. A background receiver remains open while the menu waits and responds to watchdog requests. Choose 1 again after external changes to fully refresh.
Presets: ~/.config/lg-soundbar-linux/presets.json
Packet log: ~/.config/lg-soundbar-linux/protocol.log
These respect XDG_CONFIG_HOME when set. For troubleshooting, share the connection/action output and the recent log, after checking for device-identifying metadata. The app makes no cloud/network calls; communication is local Bluetooth. Log files are append-only and can be removed when the app is closed.
If input changes disconnect the socket, choose 1 to reconnect. The controller does not guarantee that serial control remains available in Portable mode. Exit closes only its serial socket; it does not explicitly disconnect all Bluetooth profiles.
Offline tests cover captured-packet serialization, fragmented/combined frames, checksum failures, capability states, signed speaker levels, invalid settings, preservation of the other tone band and input validation. Actual hardware behavior, app initialization compatibility, APD behavior and preset application must still be tested on your SKM5Y. The code does not claim that packet echo alone proves a setting changed.
Run tests: python3 -m unittest -v test_protocol.py from this folder.
See LG-Soundbar-Settings-Inventory.md for the broader APK catalog and LG-SKM5Y-Protocol-Findings.md for protocol evidence and source references.
Delete ~/.local/share/lg-soundbar-linux, ~/.local/share/applications/lg-soundbar-remote.desktop and the desktop's LG-Soundbar-Remote.desktop. Delete ~/.config/lg-soundbar-linux only if you also want to remove saved presets and logs. This does not remove or modify your earlier automatic audio-connection service.