OLIMEX / DIY-LAPTOP

Do It Yourself Open Source Hardware and Software Modular Hacker's Friendly Laptop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

teres1-ledctrl consumes 100% cpu

khumarahn opened this issue · comments

I have another issue to submit.

Occasionally, teres1-ledctrl starts to consume 100% of the cpu (one core), and the leds do not work. I observed it on both the original ubuntu, and on my gentoo, where I compiled it myself.

This happens rarely, I have no idea what triggers it.

A screenshot:
screenshot-20171108 001606

upd: turning the keyboard on and off as in #8 does trigger this. However, I do not remember how it happened with the stock ubuntu - I wasn't experimenting with anything this low level.

This service is temporary workaround that will fix the issue for now:

[Unit]
Description=teres1-ledctrl service stop before sleep
Before=sleep.target

[Service]
Type=oneshot
ExecStart=-/usr/bin/pkill -9 teres1-ledctrl

[Install]
WantedBy=sleep.target

create it with

sudo nano /etc/systemd/system/teres1-ledctrlkill.service
sudo systemctl enable teres1-ledctrlkill.service
sudo systemctl start teres1-ledctrlkill.service

I think this is a workaround , not fix. @d3v1c3nv11 take a look
here
This will die in horrible pain, if file descriptor is missing or already opened. Simple file check will do the trick. But it needs additional debug

Yeap, it is not the right fix. I have a script (in #8) which unbinds the keyboard device when the lid is closed. There I also had to add a restart of the led control service.

Also, I do not use systemd. I would happily use it, but it requires a recent kernel. Our 3.10 is just too old, while older versions of systemd require to many patches to compile. Luckily for me, gentoo comes with openrc. It is a very good init system, but it does not manage suspend.

Merged.

ok, thank you. It seems, this is done.