Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding documentation to fix USI Stylus rotation. #173

Merged
merged 5 commits into from
Oct 10, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 95 additions & 1 deletion src/docs/installing/post-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,101 @@ If you experience issues in applications such as Parsec, or encounter disruptive
3. Type `grub-mkconfig -o /boot/grub/grub.cfg` or `update-grub` into a terminal and press Enter. Use sudo, su, or doas if necessary.
4. Reboot

## macOS
### Fixing stylus orientation in Gnome

Some Chromebooks come with USI styluses. They work fine in the newest versions of KDE Plasma, but they have a rotation issue in GNOME. The issue is that the stylus does not rotate with the screen, so it is only usable in one orientation. To fix this, we have to add an libinput override.

1. Get the device ID of your stylus
This information can either be read from cbmem or libwacom.
To get the ID from libwacom run this script https://github.com/linuxwacom/libwacom/blob/master/tools/show-stylus.py.
``` bash
tux@fedora:~/Downloads/libwacom/tools$ sudo python ./show-stylus.py
Using "GDIX0000:00 27C6:0E0C Stylus": /dev/input/event5
Using stylus file(s): /usr/share/libwacom/libwacom.stylus
Tool id 0x1 serial 0x0 in-proximity: False
^CTerminating
Suggested line for .tablet file:
Styli=isdv4-aes
```
In this case, the device ID is `GDIX0000:00 27C6:0E0C Stylus`.

3. Create a .tablet file for libwacom
Xelef2000 marked this conversation as resolved.
Show resolved Hide resolved
``` bash
sudo mkdir -p /etc/libwacom/
sudo nano /etc/libwacom/google-{your board name}.tablet
```
Add the following content to the file:
``` bash
[Device]
Name={your device id}
ModelName=
DeviceMatch=i2c:{the hardware id of your stylus lowercased (in this case 27c6:0e0c)}
Class=ISDV4
Width=9
Height=5
IntegratedIn=Display;System
#Styli=isdv4-aes
Styli=@generic-no-eraser

[Features]
Stylus=true
Touch=false
```
4. Create the libinput override
``` bash
sudo mkdir -p /etc/libinput/
sudo nano /etc/libinput/local-overrides.quirks
```
Add the following content to the file:
``` bash
[Google Chromebook {your board name} Stylus Digitizer]
MatchUdevType=tablet
MatchDeviceTree=*{your board name}*
MatchBus=i2c
ModelChromebook=1
AttrPressureRange=1100:1000
```
5. Update the libwacom database and restart the system
``` bash
sudo libwacom-update-db
reboot
```

#### Example Files for Jinlon
Here are the example files for the Jinlon Chromebook. The device ID is `GDIX0000:00 27C6:0E0C Stylus`.

`/etc/libwacom/google-jinlon.tablet`
``` bash
[Device]
Name=GDIX0000:00 27C6:0E0C Stylus
ModelName=
DeviceMatch=i2c:27c6:0e0c
Class=ISDV4
Width=9
Height=5
IntegratedIn=Display;System
#Styli=isdv4-aes
Styli=@generic-no-eraser

[Features]
Stylus=true
Touch=false
```

`/etc/libinput/local-overrides.quirks`
``` bash
[Google Chromebook Jinlon Stylus Digitizer]
MatchUdevType=tablet
MatchDeviceTree=*jinlon*
MatchBus=i2c
ModelChromebook=1
AttrPressureRange=1100:1000
```
#### Consider Upstreaming Your Changes to libwacom
Please consider upstreaming your changes to [libwacom](https://github.com/linuxwacom/libwacom) and [wacom-hid-descriptors](https://github.com/linuxwacom/wacom-hid-descriptors). This will help other users with the same device as you.


## macOS

- [Remove Verbose](https://dortania.github.io/OpenCore-Post-Install/cosmetic/verbose.html#macos-decluttering)
- [OpenCore GUI Setup](https://dortania.github.io/OpenCore-Post-Install/cosmetic/gui.html#setting-up-opencore-s-gui)
Expand Down