xref: /linux/Documentation/admin-guide/laptops/uniwill-laptop.rst (revision 3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d)
1.. SPDX-License-Identifier: GPL-2.0+
2
3Uniwill laptop extra features
4=============================
5
6On laptops manufactured by Uniwill (either directly or as ODM), the ``uniwill-laptop`` driver
7handles various platform-specific features.
8
9Module Loading
10--------------
11
12The ``uniwill-laptop`` driver relies on a DMI table to automatically load on supported devices.
13When using the ``force`` module parameter, this DMI check will be omitted, allowing the driver
14to be loaded on unsupported devices for testing purposes.
15
16Hotkeys
17-------
18
19Usually the FN keys work without a special driver. However as soon as the ``uniwill-laptop`` driver
20is loaded, the FN keys need to be handled manually. This is done automatically by the driver itself.
21
22Keyboard settings
23-----------------
24
25The ``uniwill-laptop`` driver allows the user to enable/disable:
26
27 - the FN lock and super key of the integrated keyboard
28 - the touchpad toggle functionality of the integrated touchpad
29
30See Documentation/ABI/testing/sysfs-driver-uniwill-laptop for details.
31
32Hwmon interface
33---------------
34
35The ``uniwill-laptop`` driver supports reading of the CPU and GPU temperature and supports up to
36two fans. Userspace applications can access sensor readings over the hwmon sysfs interface.
37
38Platform profile
39----------------
40
41Support for changing the platform performance mode is currently not implemented.
42
43Battery Charging Control
44------------------------
45
46.. warning:: Some devices do not properly implement the charging threshold interface. Forcing
47             the driver to enable access to said interface on such devices might damage the
48             battery [1]_. Because of this the driver will not enable said feature even when
49             using the ``force`` module parameter. The charging profile interface will be
50             available instead.
51
52The ``uniwill-laptop`` driver supports controlling the battery charge limit. This either happens
53over the standard ``charge_control_end_threshold`` or ``charge_types`` power supply sysfs attribute,
54depending on the device. When using the ``charge_control_end_threshold`` sysfs attribute, all values
55between 1 and 100 percent are supported. When using the ``charge_types`` sysfs attribute, the driver
56supports switching between the ``Standard``, ``Trickle`` and ``Long Life`` profiles.
57
58Keep in mind that when using the ``charge_types`` sysfs attribute, the EC firmware will hide the
59true charging status of the battery from the operating system, potentially misleading users into
60thinking that the charging profile does not work. Checking the ``current_now`` sysfs attribute
61tells you the true charging status of the battery even when using the ``charge_types`` sysfs
62attribute (0 means that the battery is currently not charging).
63
64Additionally the driver signals the presence of battery charging issues through the standard
65``health`` power supply sysfs attribute.
66
67It also lets you set whether a USB-C power source should prioritise charging the battery or
68delivering immediate power to the cpu. See Documentation/ABI/testing/sysfs-driver-uniwill-laptop for
69details.
70
71Lightbar
72--------
73
74The ``uniwill-laptop`` driver exposes the lightbar found on some models as a standard multicolor
75LED class device. The default name of this LED class device is ``uniwill:multicolor:status``.
76
77See Documentation/ABI/testing/sysfs-driver-uniwill-laptop for details on how to control the various
78animation modes of the lightbar.
79
80Keyboard Backlight
81------------------
82
83The ``uniwill-laptop`` driver supports controlling the keyboard backlight using the standard
84LED class interface. The default name of this LED class device is ``uniwill:white:kbd_backlight``
85when the keyboard backlight supports only a single color, or ``uniwill:multicolor:kbd_backlight``
86when the keyboard backlight supports RGB colors. The maximum intensity for each color channel
87in RGB mode is 50.
88
89Keep in mind that due to hardware design choices, the driver does not support the RGB value
90``0x000000`` (black), instead it will fall back to ``0x010101`` (faint white). In order to
91disable the keyboard backlight, the standard LED brightness setting has to be used instead.
92
93Configurable TGP
94----------------
95
96The ``uniwill-laptop`` driver allows to set the configurable TGP for devices with NVIDIA GPUs that
97allow it.
98
99See Documentation/ABI/testing/sysfs-driver-uniwill-laptop for details.
100
101AC Auto Boot
102------------
103
104The ``uniwill-laptop`` driver allows the user to configure if the system should automatically
105boot when being connected to a power source, see
106Documentation/ABI/testing/sysfs-driver-uniwill-laptop for details.
107
108USB Powershare
109--------------
110
111The ``uniwill-laptop`` driver allows the user to configure if the system should continue to
112provide power via the USB ports when hibernating or powered off, see
113Documentation/ABI/testing/sysfs-driver-uniwill-laptop for details.
114
115References
116==========
117
118.. [1] https://www.reddit.com/r/XMG_gg/comments/ld9yyf/battery_limit_hidden_function_discovered_on/
119