Tuxedo Control Center and SysVInit  [Solved]

Message
Author
xamio
Posts: 6
Joined: Wed Jan 06, 2021 8:13 am

Tuxedo Control Center and SysVInit  [Solved]

#1 Post by xamio »

Hi all,

I download the Tuxedo Control Center, mainly for controlling the fan speed. It works fine when I launch MX with systemd but under SysVinit it gives me the following error:
Communication with tccd service unavailable, please restart service and try again.

So I tried to launch the service using the following command:

Code: Select all

service /opt/tuxedo-control-center/resources/dist/tuxedo-control-center/data/service/tccd start
Now I get the following error:
tccd: unrecognized service

Does anyone have success running tuxedo control center with sysvinit? The pacakge is from tuxedo computers.

Kind regards,
xamio.
Last edited by xamio on Thu Jan 07, 2021 5:41 am, edited 1 time in total.

User avatar
dolphin_oracle
Developer
Posts: 22366
Joined: Sun Dec 16, 2007 12:17 pm

Re: Tuxedo Control Center and SysVInit

#2 Post by dolphin_oracle »

can you provide a link for the download?
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
fehlix
Developer
Posts: 12740
Joined: Wed Apr 11, 2018 5:09 pm

Re: Tuxedo Control Center and SysVInit

#3 Post by fehlix »

I guess, those two service files tccd-sleep.service and tccd.service
from here:
https://github.com/tuxedocomputers/tuxe ... /dist-data
needs to get converted to a sysVinit service and a /etc/pm/sleep.d config-file.

User avatar
dolphin_oracle
Developer
Posts: 22366
Joined: Sun Dec 16, 2007 12:17 pm

Re: Tuxedo Control Center and SysVInit

#4 Post by dolphin_oracle »

running the thing manually with this :

Code: Select all

sudo /opt/tuxedo-control-center/resources/dist/tuxedo-control-center/data/service/tccd --start
perhaps.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

xamio
Posts: 6
Joined: Wed Jan 06, 2021 8:13 am

Re: Tuxedo Control Center and SysVInit

#5 Post by xamio »

thanks for the quick replies, i got it working!

i found a conversion script for the systemd service to sysvinit here:
viewtopic.php?f=6&t=54151
http://www.trek.eu.org/devel/sysd2v/

then i created a shell script and it's working like a charm.

User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Re: Tuxedo Control Center and SysVInit

#6 Post by JayM »

If this is solved to your satisfaction, could you please edit your original post #1 at the very top of the topic by clicking the pencil tip icon, the one circled in red in my screenshot image below (yours won't have the red circle)
Image
and add [SOLVED] at the front of the subject? This will make it easier for others when they search the forum looking for a solution to the same problem. Thanks.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

SwampRabbit
Posts: 3602
Joined: Tue Jun 14, 2016 2:02 pm

Re: Tuxedo Control Center and SysVInit

#7 Post by SwampRabbit »

xamio wrote: Thu Jan 07, 2021 2:10 am thanks for the quick replies, i got it working!

i found a conversion script for the systemd service to sysvinit here:
viewtopic.php?f=6&t=54151
http://www.trek.eu.org/devel/sysd2v/

then i created a shell script and it's working like a charm.
Did you have to do anything extra to the init script after using sysd2v?

I'd be interested in packaging this for our repo for all MX users, it'd save a bit of time if I knew how things went for you.
By chance did you create a /etc/pm/sleep.d config-file like fehlix mentioned as well?
NEW USERS START HERE FAQS, MX Manual, and How to Break Your System - Don't use Ubuntu PPAs! Always post your Quick System Info (QSI) when asking for help.

xamio
Posts: 6
Joined: Wed Jan 06, 2021 8:13 am

Re: [SOLVED] Tuxedo Control Center and SysVInit

#8 Post by xamio »

hi swamprabbit,

no i didn't change the init script as generated by the sysd2v script.

i tried to convert the tccd sleep service as well but in the resulting script it looked like it still called systemd so i just ignored it.

br,
xamio.

SwampRabbit
Posts: 3602
Joined: Tue Jun 14, 2016 2:02 pm

Re: [SOLVED] Tuxedo Control Center and SysVInit

#9 Post by SwampRabbit »

xamio wrote: Fri Jan 08, 2021 6:57 am hi swamprabbit,

no i didn't change the init script as generated by the sysd2v script.

i tried to convert the tccd sleep service as well but in the resulting script it looked like it still called systemd so i just ignored it.
Thank you for that info, will save a little bit of time.

Do you have a Tuxedo computer that you are running MX on?
NEW USERS START HERE FAQS, MX Manual, and How to Break Your System - Don't use Ubuntu PPAs! Always post your Quick System Info (QSI) when asking for help.

User avatar
fehlix
Developer
Posts: 12740
Joined: Wed Apr 11, 2018 5:09 pm

Re: Tuxedo Control Center and SysVInit

#10 Post by fehlix »

xamio wrote: Thu Jan 07, 2021 2:10 am thanks for the quick replies, i got it working!

i found a conversion script for the systemd service to sysvinit here:
viewtopic.php?f=6&t=54151
http://www.trek.eu.org/devel/sysd2v/

then i created a shell script and it's working like a charm.
OK, thanks for lettings us know that SysVinit script works.
For the record and example:
We take this service files:

tccd.service

Code: Select all

[Unit]
Description=TUXEDO Control Center Service

[Service]
Type=simple
ExecStart=/opt/tuxedo-control-center/resources/dist/tuxedo-control-center/data/service/tccd --start
ExecStop=/opt/tuxedo-control-center/resources/dist/tuxedo-control-center/data/service/tccd --stop

[Install]
WantedBy=multi-user.target
and convert it to an SysVinit script as /etc/init.d/tccd using sysd2v:
e.g like this
./sysd2v-0.3.sh tccd.service | sudo tee /etc/init.d/tccd

Code: Select all

#!/bin/sh
# Generated by sysd2v v0.3  --  http://www.trek.eu.org/devel/sysd2v
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
    set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides:       tccd
# Required-Start: $remote_fs
# Required-Stop:  $remote_fs
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    TUXEDO Control Center Service
### END INIT INFO
DAEMON=/opt/tuxedo-control-center/resources/dist/tuxedo-control-center/data/service/tccd
DAEMON_ARGS="--start"
PIDFILE=/var/run/tccd-sysd2v.pid
START_ARGS="--background --make-pidfile"

do_stop_cmd_override ()
{
  /opt/tuxedo-control-center/resources/dist/tuxedo-control-center/data/service/tccd --stop || return 2
  do_stop_cmd
  true
}

and
make it executable

Code: Select all

sudo chmod +x /etc/init.d/tccd
and install SysVinit script links:

Code: Select all

sudo update-rc.d tccd defaults
and start tccd sysvinit service with

Code: Select all

sudo service tccd start
Next to convert the sleep/resume systemd service,
to an pm-hook this way:
The provide systemd.service
tccd-sleep.service

Code: Select all

[Unit]
Description=TUXEDO Control Center Service (sleep/resume)
Before=sleep.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c "systemctl stop tccd"
ExecStop=/bin/bash -c "systemctl start tccd"

[Install]
get manually converted based on this pm hook here:
/usr/lib/pm-utils/sleep.d/49tlp

We create a similar pm-hook at
/etc/pm/sleep.d/49tccd

Code: Select all

#!/bin/sh
# copy to /etc/pm/sleep.d/49tccd
#
# tccd - handle suspend/hibernate/resume tasks
# TUXEDO Control Center Service
# adjusted by fehlix at mxlinux dot org

# based on:
# /usr/lib/pm-utils/sleep.d/49tlp
# Copyright (c) 2018 Thomas Koch <linrunner at gmx.net>
# This software is licensed under the GPL v2 or later.

. "${PM_FUNCTIONS}"

case $1 in
    hibernate|suspend)
        service tccd stop
        ;;

    thaw|resume)
        service tccd start
        ;;

    *) exit $NA
        ;;
esac

exit 0
and make it executable

Code: Select all

sudo chmod +x /etc/pm/sleep.d/49tccd
Perhaps would be nice, if someone could checkout whether this sleep/resume pm-hook
would work with tccd.
Thanks

Post Reply

Return to “Software / Configuration”