Sven's {b}logbuch

Themen rund um die Informationstechnik

  • Home
  • Kategorien
    • DIY
    • Hardware
      • Laptop
      • Monitor
      • PC
      • Server
      • Tablet
      • Other
    • Linux
      • Application
      • Bash
      • Gnome Shell Extension
      • Python
      • Other
    • Windows
      • Application
      • Powershell
      • Other
  • Über Mich
  • Kontakt
  • Impressum

EC-Control – Script

Bash
10. Januar 2022

EC-Control ist ein Bash Script welches es erlaubt, Werte in bestimmten OffSets des EC’s zu lesen und zu schreiben. Es wird als Unterbau für die EC-Control Gnome Shell Extension verwendet, kann aber auch Standalone genutzt werden. EC-Control ermöglicht es Lüfter, Bluetooth, Touchpad, Tastaturbeleuchtung, Webcam etc. eines Laptops unter Linux zu steuern. Voraussetzung ist ein aktiviertes DebugFS im Kernel sowie dem aktiven ec_sys Kernelmodul, alternativ ein aktives acpi_ec Kernelmodul.

Für Windows werden von den jeweiligen Herstellern Tools zum einstellen von Laptop Eigenschaften wie Bluetooth, Lüfter etc., mitgeliefert. Für mein Gigabyte P57W beispielsweise, war es mir anfangs nicht möglich, unter Linux die Lüfter im Automatik Modus zu betreiben, stattdessen liefen diese stets im Performance Modus – was akustisch einem Fön gleicht. Aus der Not heraus und mit ein wenig Reverse-Engineering, habe ich die wichtigsten möglichen Werte des Laptops in einer Datenbank zusammengetragen.

Voraussetzungen

  • Kernel mit DebugFS Support und aktiven EC_SYS Kernelmodul oder aktiven ACPI_EC Kernel Modul
  • xxd um Werte aus dem EC zu lesen
  • dd um Werte im EC zu schreiben
  • pkexec um EC-Control das schreiben im EC zu ermöglichen

Installation

ec-control herunterladen und im folgenden Verzeichnis kopieren: sudo cp ec-control /usr/bin/ec-control ausführbar machen:sudo chmod +x /usr/bin/ec-control

Beschreibung

EC-Control ist auch ohne Gnome Extension nutzbar. Wenn der Offset des Registers und die entsprechenden Werte bekannt sind, lassen sich diese wie folgt steuern:

Einen Wert in einem Offset ermitteln:

sudo /usr/bin/ec-control get offset ec_path

Einen Wert in einem Offset schreiben:

sudo /usr/bin/ec-control set value offset ec_path

Beispiel: Gigabyte P57 – Lüftersteuerung Automatik

sudo /usr/bin/ec-control set 20 6 /dev/ec

Beispiel: Gigabyte P57 – Tastaturbeleuchtung 100%

sudo /usr/bin/ec-control set 02 215 /dev/ec

Beispiel: Gigabyte P57 – Touchpad Abschalten

sudo /usr/bin/ec-control set 80 3 /dev/ec

Auf diesem Wege kann auch der EC mittels Starter im KDE oder Gnome gesteuert werden. Die Werte sind der entsprechenden Datenbank zu entnehmen.

Frage & Antwort

Was ist nun der Unterschied zu NBFC?
NBFC ist ein klasse Projekt, verfolgt allerdings ein anderes Ziel. Unter NBFC ist es möglich die Lüfter – und nur die Lüfter – je nach Hersteller und sofern Unterstützt, stufenlos zu regeln. Ich möchte jedoch gerne Dinge wie Tastaturbeleuchtung, Webcam, oder das Touchpad steuern können.

Download & Changelog

Icon

EC-Control 1.0.0   1.89 KB   6. Februar 2022  

  • Initial Release
Download
Icon

Gigabyte P57 Datenbank 1.1   1.01 KB   6. Februar 2022  

  • Add cooling state (70)
  • Add keyboard light state (5C)
  • Add touchpad states (20, 00) in battery mode
Download

Schreibe einen Kommentar Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Sven’s {b}logbuch by S. Kramer

Diese Website verwendet Cookies um Dienste anzubieten und Zugriffe zu analysieren. Deine IP-Adresse und dein User-Agent werden zusammen mit Messwerten zur Leistung und Sicherheit freigegeben. So können Nutzungsstatistiken generiert, Missbrauchsfälle erkannt und behoben und die Qualität des Dienstes gewährleistet werden.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
immer aktiv
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDauerBeschreibung
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SPEICHERN & AKZEPTIEREN