Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't make Logiops working using OpenRC.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
aleksandar.angelov
n00b
n00b


Joined: 23 Apr 2021
Posts: 5
Location: Canada

PostPosted: Fri Apr 23, 2021 2:10 pm    Post subject: Can't make Logiops working using OpenRC. Reply with quote

Hi, I raised a bug for Logiops on their Guthub page, but I didn't get any help from there.
That's why I'll try my luck here. BTW this is my first try to create a service in OpenRC.
Here is the bug I reported:

I'm trying to run logiops using OpenRC, but loading the system gets stuck when starting the service (keyboard is working but loading doesn't continue).
I'm using Gentoo, kernel 5.11.9 (now I'm on 5.11.15) with uinput enabled (Logiops was getting an error before re-building the kernel with this option enabled).
Looks like it just doesn't run on the background as a service.
I created a file in /etc/init.d with name logid
In the file I put:

Code:
#!/sbin/openrc-run
description="Logiops service"
command="/usr/local/bin/logid"
command_arg="-c /etc/logid.cfg"
command_user="root"

depend() {
  use clock logger
  need localmount
}


I commented out the depend part and tried to run it with rc-service logid start. The service starts but it never gets to command prompt until I kill it with ctrl-c.

When I tested it with -v option, everything is working fine. But again I have to kill it in order to get back to the prompt.
I tried running it on the background in .xinitrc, but this was a bad idea, I only got a black screen.

I have Logiops working on the same computer running Pop OS just fine.
I'm using the same mouse MX Master 3.

Here is my config file:

Code:
devices: (
{
    name: "Wireless Mouse MX Master 3";
    smartshift:
    {
        on: false;
        threshold: 10; # 7 is ideal for work
    };
    hiresscroll:
    {
        hires: true;
        invert: false;
        target: false;
    };
    dpi: 1500;# <- you may change this number. 4000 is the maximum.

    buttons: (
        {
            cid: 0xc3;
            action =
            {
                type: "Keypress";
                keys: ["KEY_F5"];
            };
        },
        {
            cid: 0xc4;
            action =
            {
                type = "ToggleSmartshift";
            };
        },
        {
            cid: 0x56;
            action =
            {
                type: "Keypress";
                keys: ["KEY_LEFTCTRL", "KEY_C"];
            };
        },
        {
            cid: 0x53;
            action =
            {
                type: "Keypress";
                keys: ["KEY_LEFTCTRL", "KEY_V"];
            };
        }
    );
}
);
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Fri Apr 23, 2021 2:22 pm    Post subject: Reply with quote

Hi
Welcome to Gentoo forums!

It starts fine in my box
Code:

cat /etc/init.d/logid
#!/sbin/openrc-run
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

logid_config="/etc/logid.cfg"
name="Logitech Configuration Daemon"
pidfile="${RC_PREFIX}/run/logid.pid"

command="${RC_PREFIX}/usr/bin/logid"
command_background="true"
command_args="-c ${logid_config}"

start_pre() {
   if [ ! -f "${logid_config}" ]; then
      eerror "The file '${logid_config}' could not be found!"
      eerror "Please create one before you start the daemon."
      exit 1
   fi
}
lake ~ # /etc/init.d/logid start
 * Caching service dependencies ...                                                                             [ ok ]
 * Starting Logitech Configuration Daemon ...
lake ~ #

Among many other things this was missing in your logid init file

command_background="true"


Just emerge it with USE="-systemd"
Default iuse is with "systemd"
_________________
:)
Back to top
View user's profile Send private message
aleksandar.angelov
n00b
n00b


Joined: 23 Apr 2021
Posts: 5
Location: Canada

PostPosted: Fri Apr 23, 2021 5:57 pm    Post subject: Reply with quote

Thank you very much, this worked just perfect.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum