YoyPa / isw

Ice-Sealed Wyvern
GNU General Public License v3.0
385 stars 78 forks source link
embedded-controller gs40-6qe isw msi-laptop python

ISW / Ice-Sealed Wyvern

Warning

How to install

Package or not package ?

Builtin or not builtin ?

How to use it ?

Current --help output

usage: isw [-h] [-b B] [-c] [-f FILE] [-p P] [-r [R]] [-s S S] [-t T] [-u USB] [-w W]

optional arguments:
  -h, --help            show this help message and exit
  -b B                  ┬ enable or disable CoolerBoost
                        └ replace B with off OR on

  -c                    ─ show an EC dump

  -f FILE, --file FILE  ┬ show profile in EC update file
                        └ replace FILE with FILE_NAME

  -p P                  ┬ show current profile in EC
                        └ replace P with SECTION_NAME

  -r [R]                ┬ show realtime CPU+GPU temp and fan speed from EC
                        ├ replace [R] with any [NUMBER] to perform a [NUMBER] of time(s)
                        └ Assume [0] if given nothing = infinite loop

  -s S S                ┬ set a single value into EC
                        ├ replace 1st S with ADDRESS in hexadecimal (0x00)
                        └ replace 2nd S with VALUE   in decimal     (00)

  -t T                  ┬ set the battery charging treshold
                        └ replace T with a NUMBER between 20 and 100 (٪)

  -u USB, --usb USB     ┬ set usb backlight level
                        └ replace USB with off, half OR full

  -w W                  ┬ write into EC
                        └ replace W with SECTION_NAME

┌─ TIPS ──────────────────────────────────────────────────────────────────┐
│ Set your config in '/etc/isw.conf'.                                     │
│ Arguments order is relevant, -c and -p can be used twice. Example:      │
│ isw -cw SECTION_NAME -c will show you EC dump before and after change.  │
├─ SUPPORT ───────────────────────────────────────────────────────────────┤
│ Help me support your laptop by providing following command output:      │
│ isw -cp MSI_ADDRESS_DEFAULT                                             │
│ via https://github.com/YoyPa/isw (open an issue).                       │
│ Make sure your dump is made before altering EC with isw, you can reset  │
│ your EC with a reboot or by changing power source.                      │
├─ NAME ──────────────────────────────────────────────────────────────────┤
│ ISW is MSI at 180°                                                      │
│ It means Ice-Sealed Wyvern in opposition to MSI's 'unleash the dragon'  │
└─────────────────────────────────────────────────────────────────────────┘

NB: all option exept -h and -f need priviledges.

An example

SECTION_NAME refer to the motherboard name inside isw.conf, if for example you have a GS40_6QE your SECTION_NAME would be 14A1EMS1.

If you want to change temperature treshold and/or fan speed for cpu and/or gpu, you have to edit the corresponding section in isw.conf to set the wanted values and use isw -w 14A1EMS1 to apply.

If you want to check the current temperature and fan speed you will have to type isw -r.

Don't forget to read the comment at the beginning of isw.conf, it contain some helpfull info.

Launch at startup/resume

You can launch isw -w [SECTION_NAME] at startup/resume via systemd with isw@.service (need priviledges):

systemctl enable isw@[SECTION_NAME].service

TODO

- Daemonisation
    - Launch at startup                            done
    - launch after resume (hibernation/suspend)    done
    - Launch at event(power source change)