How To Fix MacBook Air Keyboard on openSUSE Leap (or Systemd Linux)

One of the problems if you install Linux on your MacBook Air is your Tilde/Backtick keys are not recognized with the output. it will be appearing different symbols. As a Zimbra Administrator, i need backtick symbol for specifying email server host (`zmhostname`).

I have openSUSE Leap 42.3 on my MacBook Air, now i usually use openSUSE rather than My MacOS Sierra. But this problem comes to me and still bothering my jobs.

It turns out …

The problem is very simple. This because https://bugzilla.kernel.org/show_bug.cgi?id=60181#c43

To fix it, Just run this command :

echo 0 > /sys/module/hid_apple/parameters/iso_layout

Very simple right?

It’s Solved, but …

The problem will come to you again if you restart your MacBook Air. So if you use systemV or init. you can place those command on rc.local or boot.after.

But, how if your operating system using Systemd?

I have openSUSE Leap 42.3 on my MacBook Air, now i usually use openSUSE rather than My MacOS Sierra. But this problem comes to me and still bothering my jobs.

Simple, you just need to create a service with that command. create a .service file. For example, i use openSUSE Leap, i create it on /etc/systemd/system/mba-keyboard-fix.service with the following script:

[Unit]
Description=Fix MacBook Air Keyboard

[Service]
Type=oneshot
ExecStart=/bin/bash -c '/usr/bin/echo 0 > /sys/module/hid_apple/parameters/iso_layout'

[Install]
WantedBy=multi-user.target

Or, to simplify it. Just download that file using wget:

cd /etc/systemd/system/
wget -c https://dhenandi.com/repo/mba-keyboard-fix.service

Then start the service and enable it.

systemctl enable mba-keyboard-fix.service
systemctl start mba-keyboard-fix.service

Try to reboot your MacBook Air, if it doesn’t work for you. Just sell your MacBook Air and buy an openSUSE Tuxedo Infinity instead :-P.

 

Leave a Reply