<ERROR> Lock/unlock handler- Session bus is not connected

  • Hi, I'm trying to build a diy ambilight system for my monitor. I'm using a Arduino nano and ws2812B 60LEDs/m 5V, powered with a 5V 8A ps.
    First I installed hyperion, then flashed the arduino with this sketch and tried to start Hyperion with: sudo systemctl start hyperiond@root (Looks like hyperion needs to get root permissions access the serial port where my arduino is connected, I read on this forum it'scommon with arduino and ws2812B). Anyway, I set up everything (I'm able to access and use the web interface), but nothing will happen on the LED side, even if I try to use "Identify" to make the LEDs blink. Log says:

    2023-02-01T18:56:56.457Z [DAEMON] (ERROR) Lock/unlock handler- Session bus is not connected
    2023-02-01T19:19:44.262Z [LEDDEVICE] (INFO) Identify adalight, device: ttyACM0
    2023-02-01T19:19:44.262Z [LEDDEVICE] (INFO) Opening UART: ttyACM0
    2023-02-01T19:19:44.294Z [LEDDEVICE] (ERROR) Device disabled, device 'adalight' signals error: 'Permission error while locking the device'

    And sudo systemctl status hyperiond@root shows:

    Do you have any idea why this is happening? Am I missing something, or maybe it's some permission conflict?
    Additional info: I'm working on arch linux, Kernel is mainline updated today (1st feb) to v6.1.8.
    uname -sro

    Linux 6.1.8-arch1-1 GNU/Linux

    When I connect the arduino to the usb port of the pc the RX led starts blinkig pretty fast, so I guess the board and the PC are exchanging data, I really have no idea on what to do.

  • Lord-Grey

    Approved the thread.
  • [UPDATE]

    Meanwhile I've been trying to fix this, but couldn't. Anyway something's changed. I tried with a UNO board, controlled by USB-A (I forgot to specify that I'm using a TYPE-C to TYPE-C cable for the nano (it's a cheap cinese clone) which is recognized as /dev/ttyUSB0 if that changes anything. I now get another error in the log when I try to "Identify" the LED hardware from web ui. Still no result tho.

    2023-02-01T23:01:48.258Z [LEDDEVICE|First LED Hardware instance] (ERROR) Device disabled, device 'adalight' signals error: 'Rs232 SerialPortError: No such file or directory'
    2023-02-01T23:02:02.838Z [LEDDEVICE] (INFO) Identify adalight, device: ttyACM0
    2023-02-01T23:02:02.838Z [LEDDEVICE] (INFO) Opening UART: ttyACM0

    List of some things I tried (didn't work tho):

    • add root to uucp group (same error)
    • chown the serial port, got the same error (because root was owner, and hyperion had root priviledgdes);
    • chmod 755 the serial port (same error)
    • enabling/disabling hyperiond@root
    • stopping hyperiond@root and starting sudo hyperiond -v
  • I tried some tests, nothing worked. I found something that might be useful in dmesg after trying to "Identify" my LEDs through the NANO board (Connected with type-C to type-C cable). I'll check if this still happen with the UNO.
    I tried to set a lower baud rate (was 115200, now it's 76800) bc I thought that might be an issue with the cheap NANO board. Still no

    [11764.091655] usb 1-1: new full-speed USB device number 12 using xhci_hcd
    [11764.241151] usb 1-1: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.54
    [11764.241165] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
    [11764.241169] usb 1-1: Product: USB2.0-Ser!
    [11764.301773] ch341 1-1:1.0: ch341-uart converter detected
    [11764.308278] ch341-uart ttyUSB0: break control not supported, using simulated break
    [11764.308587] usb 1-1: ch341-uart converter now attached to ttyUSB0
    [11768.125885] usb 1-2: USB disconnect, device number 11
    [11937.570579] audit: type=1334 audit(1675353622.661:416): prog-id=52 op=LOAD

    Now here's the full log from hyperion (debug mode on), I'm using the NANO here, but the UNO's log looks identical (the device name is different obv).
    I'm still thinking it's some weird permission error.
    ls -lah /dev/ttyUSB0 gives:
    crw-rw---- 1 root uucp 188, 0 Feb 2 17:11 /dev/ttyUSB0

    Let me know if you need more infos on the system or the configuration/hardware I have, I'll be happy to provide it.
    I'm going to test this on a Windows machine any soon too.

    • Official Post

    Maybe you check, if the following is of help:

    QSerialPort cannot open tty after application has previously been run by `root`
    I have an application (using QSerialPort) that reads and writes from a serial port. When I run this application as the root user, then run it again as a…

    Note, there is no need to run Hyperion under root for this scenario and it is not recommended.

    You need to add the user (non root) to the "uucp" group under Arch Linux,

  • That says it was a bug in Qt (which was fixed a long time ago), I obv rebooted my machine many times but nothing changed, I'm still getting the same error

    log file

    As I already said im in uucp group with both root and my user, I also saw that post on Stack Overflow but I don't get how that could be useful, I might be missing something tho. Can you help me if that's the case?

  • Okay so, new updates. I was able to fix the error. As far as I understood QT creates a lock file in /var/lock but that directory was accessible only to root group and owned by root user. I had to chgrp lock /var/lock and chgroup lock /run/lock and then I added my user to the lock group usermod -aG lock <username>. This allowed me to Identify the LEDs.

    Now there's another issue, probably due to some errors in my configuration: when I identify my LEDs only the top and 3 or 4 LEDs of the right strip (following correct direction) will turn on white.
    I don't think it's an hardware issue, in fact if I run some dumb test on the LEDs they will all turn on correctly at max brightness:

    So if you have any suggestion I'll appreciate it :)

  • I've got some updates, I'm writitng here so if any other user will face these problems he won't go through the "hell" I've gone through. Here's a checklist to make things (kinda) work.

    1. Add your user to uucp group
    2. Add your user to lock group
    3. Change the group ownership of /run/lock directory from root to lock group (a.k.a. sudo chgroup lock /run/lock && sudo chmod 775 /run/lock [NOTE] /var/lock and /var/run/lock are symlinks to /run/lock
    4. Sometimes a lock file will be created and never removed, resulting in this error: Device disabled, device 'adalight' signals error: 'Permission error while locking the device'. You'll need to manually delete that file (should be located in /run/lock/LCK..<yourSerialDevice>) (it's been pretty random since now, I have to check what's exactly going on under the surface).

    Hope this can be useful for somebody else.
    But as I said things "kinda" work. I'm still not able to use ambilight even tough LED output and Screen capture are enbled and properly configured (at least, I think so). If somebody can help me I'd be really grateful. Cheers

    • Official Post

    The standard if to have the /var/lock directory permissions as following

    drwxrwxrwt 4 root root 100 Jan 15 19:29 lock

    There is not need to add the user to the lock group.

    In addition, the sticky-flag must be on.

    Therefore, if you do a chmod, the correct one is

    chmod 1777 /run/lock

    If there are still lock files related to the serial device, i would suggest you explore from which process they were created.

  • I have the same issue. I am facing that hyperion status Stopped when i open the prompt and login by putty

    And Log shows me:

    [DAEMON] (ERROR) Lock/unlock handler- Session bus is not connected

    Can anyone help me about it?

  • I am getting the same error and can't seem to figure out what the issue is. Please help me out

    [DAEMON] (ERROR) Lock/unlock handler- Session bus is not connected

  • Hi, sorry if I'm bothering you again, but I could never get my system to work properly in the end and then I didn't have time to dedicate to it, i still get that very same error and i don't really know what to do. Do you have any idea? I also tried with an Elegoo Uno, so the board is not the problem because I'm getting the same error. Also, the Arduino IDE can correctly access both the devices, so I reallty don't know what else can be done.

    2023-09-16T16:03:15.776Z [LEDDEVICE|Ambilight] (INFO) Start LedDevice 'adalight'.
    2023-09-16T16:03:15.776Z [LEDDEVICE|Ambilight] (INFO) Opening UART: ttyUSB0
    2023-09-16T16:03:15.828Z [LEDDEVICE|Ambilight] (INFO) Switching device adalight ON
    2023-09-16T16:03:15.829Z [LEDDEVICE|Ambilight] (INFO) Device adalight is ON
    2023-09-16T16:03:15.829Z [LEDDEVICE|Ambilight] (INFO) LedDevice 'adalight' enabled
    2023-09-16T16:03:17.520Z [LEDDEVICE] (INFO) Identify adalight, device: ttyUSB0
    2023-09-16T16:03:17.520Z [LEDDEVICE] (INFO) Opening UART: ttyUSB0
    2023-09-16T16:03:17.547Z [LEDDEVICE] (ERROR) Device disabled, device 'adalight' signals error: 'Permission error while locking the device'

    Fun fact: resetting the Arduino by the reset button enables the 'identify' effect (flashing 2 times, all leds white). But after that I can do nothing and the error message is still the same.

    Edited 2 times, last by aleemont: Merged a post created by aleemont into this post. ().

  • Is there a resolution to this issue?

    I had a working setup (~1 yo hyperion installation), but decided to reinstall the latest version on a fresh Raspbian (lite) OS on my RPi 4 (same wiring + same adalight code on my arduino and all).

    After installation and basic setup of USB capture + adalight output, I cannot get it to work. The LEDs don't turn on "Identify" occasionally works (2 white blinks), but not even the effects work.

    The only errors I have in my logs are the same as in the previous comments:

    1) 2023-12-04T12:35:03.189Z [DAEMON] (ERROR) Lock/unlock handler- Session bus is not connected

    2) 2023-12-04T12:43:00.920Z [LEDDEVICE] (ERROR) Device disabled, device 'adalight' signals error: 'Permission error while locking the device'

    Could anyone please advise why this could be?

  • Additional info / correction: I can only get it flash twice, when Arduino starts up. "Identify" does not work, but that triggers the ERROR #2 from my previous comment to appear in the logs.

  • Hello

    I have also this message with my hyperion.ng. I am trying of reactivating a lightberry.

    Device disabled, device 'adalight' signals error: 'Permission error while locking the device'


  • sudo usermod -a -G dialout $USER

    regards pclin

    Dreambox ONE / TWO

    dreamOS OE2.6

    Amlogic S922X - 53.000 DMIPS - 2 GB RAM - 16 GB Flash - Twin-DVB-S2X Tuner - HDR10 - HLG
    AudioDSP: miniDSP 2x4HD - Amp: Pentagon - Lautsprecher ELAC / ARENDAL
    LG OLED65BX9LB (PicCap, hyperion.NG webOS)

    FireTV 4K max

    hyperion (classic) & Plugin HyperionControl | hyperion-ng 2.0.16-beta.1 (dreamOS)
    Hyperion-ng (Debian bullseye)
    6 x ESP32/Wemos D1 mini - WLED - SK6812 RGBW-NW 60 LEDs/m
    FeinTech VSP01201 - Grabber Macrosilicon

    LG TV Hyperion webOS & PicCap


    Ambilight for ever

  • For those who are still struggling with this: these errors may not be the source of your problems.

    In my case it turned out to be adalight that had to be updated for my setup to start working (although not perfectly due to delay issues).

  • I have the same issue… My OS is Ubuntu Server 22.04 LTS.

    Tried testing with Arduino CH340 uploaded Adalight code of Hyperion.

    My leds is not lighted and look into logs have the same error…

    My hyperion run as root. Anyone have the solution?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!