Notes about setting up Ubuntu on Surface Go
Device: Surface Go (gen 1; LTE version)
Install Ubuntu on Surface Go:
- Download Ubuntu image file from https://ubuntu.com/#download
- Download 'balenaEtcher' from https://www.balena.io/etcher/
- Insert USB stick
- Launch 'balenaEtcher', select the image iso file downloaded in step 1, select the USB stick inserted in step 3, and run
- Go to the Windows Settings App and search "Recovery Options"
- Select Advanced start-up > USB device > Linpus Lite
- After re-boot, install Ubuntu, select 'install third-party softwares' as well (orient the surface go in portrait mode so that the 'continue' button is clickable)
- Unplug the USB stick after Ubuntu is installed
- Restart and launch Ubuntu
- To set-up wifi, download https://www.medo64.com/download/surface-go-wifi_0.0.2_amd64.deb [with a computer which can go online], copy to Surface Go and run:
sudo apt install ./surface-go-wifi_0.0.3_amd64.deb'
- Restart, go to settings, select wifi network
- Launch Terminal and run:
sudo apt update && sudo apt dist-upgrade
type 'Y' and press 'Enter'
- Restart computer
- Install Surface Kernel:
wget -qO - https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc \
| gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/linux-surface.gpg
echo "deb [arch=amd64] https://pkg.surfacelinux.com/debian release main" \
| sudo tee /etc/apt/sources.list.d/linux-surface.list
sudo apt update
sudo apt install linux-image-surface linux-headers-surface iptsd libwacom-surface
sudo systemctl enable iptsd
sudo apt install linux-surface-secureboot-mok
Read details at https://github.com/linux-surface/linux-surface/wiki/Installation-and-Setup#debian--ubuntu
-
Reboot
-
Select 'Enroll Mok' > OK / Yes
-
Enter 'surface' as password
-
Reboot and run:
sudo update-grub
- Reboot and run, to check if kernel information has '-surface' suffix:
uname -a
Or install, run 'neofetch':
sudo apt install -y neofetch
neofetch
- Download Linux Zoom App from https://zoom.us/download?os=linux , install Zoom App and dependencies:
sudo apt install -y libglib2.0-0 libgstreamer-plugins-base1.0-0 libxcb-shape0 libxcb-shm0 libxcb-xfixes0 libxcb-randr0 libxcb-image0 libfontconfig1 libgl1-mesa-glx libxi6 libsm6 libxrender1 libpulse0 libxcomposite1 libxslt1.1 libsqlite3-0 libxcb-keysyms1 libxcb-xtest0 ibus
sudo apt install ./zoom_amd64.deb
- Set up camera driver
sudo apt install -y git build-essential meson ninja-build pkg-config libgnutls28-dev openssl python3-pip python3-yaml python3-ply python3-jinja2 qtbase5-dev libqt5core5a libqt5gui5 libqt5widgets5 qttools5-dev-tools libtiff-dev libevent-dev libyaml-dev gstreamer1.0-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
cd libcamera/
meson build -Dpipelines=uvcvideo,vimc,ipu3 -Dipas=vimc,ipu3 -Dprefix=/usr -Dgstreamer=enabled
ninja -C build
sudo ninja -C build install
- Set Up Python
sudo apt install -y make build-essential python3 python-setuptools python3-pip python3-dev python3-venv libssl-dev libffi-dev libnss3 zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
- Set Up Qt
sudo apt-get --no-install-recommends install libqt*5-dev qt*5-dev qml-module-qtquick-* qt*5-doc-html libqt5xml5 libqt5x11extras5 libqt5x11extras5-dev
cd $HOME
mkdir playqt6
cd playqt6
python3 -m venv venv
source venv/bin/activate
pip3 install PySide6
echo 'alias qt6examples="source $HOME/playqt6/venv/bin/activate && cd $HOME/playqt6/venv/lib/python3.10/site-packages/PySide6/examples"' >> $HOME/.bashrc
- Install Common Fonts
sudo apt install fonts-dejavu* fonts-liberation* ttf-mscorefonts-installer fonts-crosextra-* fonts-takao-gothic fonts-opensymbol
Install Google Fonts
wget https://github.com/google/fonts/archive/master.tar.gz -O gf.tar.gz
sudo tar -xf gf.tar.gz --directory /usr/share
sudo chown -R :users /usr/share/fonts-main
sudo mkdir -p /usr/share/fonts/truetype/google-fonts
sudo find /usr/share/fonts-main/ -name "*.ttf" -exec install -m644 {} /usr/share/fonts/truetype/google-fonts/ \; || return 1
rm -f gf.tar.gz
sudo fc-cache -f && sudo rm -rf /var/cache/*
[Optional] Chinese Fonts
sudo apt install xfonts-wqy ttf-wqy-zenhei ttf-wqy-microhei fonts-arphic-bkai00mp fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp fonts-arphic-gkai00mp xfonts-intl-chinese xfonts-intl-chinese-big
- Set Up UniqueBible
cd
cd UniqueBible
python3 uba.py
Open menu 'UniqueBible > Config Flag Window', search for and check 'enableSystemTrayOnLinux', restart UBA
- Connect Android phone
Android phone:
Install and run 'KDE Connect'; select a folder and grant permission for file sharing
On Ubuntu, run either:
sudo apt install gnome-shell-extension-gsconnect gnome-shell-extension-manager
Related packages: kdeconnect nautilus-kdeconnect
Launch Gnome Shell Extension Manager to enable 'GSConnect'
Pair Android phone with Ubuntu via 'KDE Connect' on Android phone.
- Support MP4 playback
sudo apt install -y ubuntu-restricted-addons ubuntu-restricted-extras gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
- Set up ibus
Settings > Language and Region > Manage Installed Languages > Install / Remove Languages > "Chinese (Simplified)" and "Chinese (Traditional)"
sudo locale-gen
sudo apt install ibus-pinyin
ibus restart
ibus-setup
Settings > Keyboard > Input Sources > Add > Chinese (Intelligent Pinyin) > Preferences > General > Chinese > Traditional
nano ~/.bashrc
export LC_CTYPE=zh_CN.UTF-8
export XIM=ibus
export XIM_PROGRAM=/usr/bin/ibus
export QT_IM_MODULE=ibus
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export DefaultIMModule=ibus
Ubuntu 22.04 uses wayland by default, switch to Xorg Session to improve application compatablility.
sudo nano /etc/gdm3/custom.conf
Uncomment the line "#WaylandEnable=false" by removing the "#" sign.
Note: moving window programmatically in Qt applications do not work on wayland, read https://forum.qt.io/topic/142043/pyside6-qmainwindow-move-not-working-on-ubuntu-22-04 Switch to Xorg session to work around the issue.
Do not use the touchegg package provided by Ubuntu. It does not work with X11 gestures.
Instaall X11 gestures:
sudo add-apt-repository ppa:touchegg/stable
enter sudo password
press "Enter"
sudo apt update
sudo apt install touchegg
To verify,
systemctl status touchegg.service
Launch gnome shell extension manager > Browser > "X11 gestures"
Click "Install"
Read more about hand gestures on X11 at https://ubuntuhandbook.org/index.php/2022/06/touchpad-gestures-ubuntu-22-04-xorg/
- GSConnect
- Clipboard Indicator
- Vitals
- Caffeine
- Apps Menu
- Places Status Indicator
- Removable Drive Menu
- Replace Activities Text
- Improved Workspace Indicator
- Impatience
- Just perfection
- CPU Power Manager
- Sound input & output device chooser
- X11 gestures
sudo apt update && sudo apt dist-upgrade
sudo apt install -y evolution evolution-ews
evolution
-
New > Mail Account, enter "Full Name" and "Email Address"
-
uncheck "Look up mail server details based on the entered email address" and click "Next"
-
Server Type > Exchange Web Services > Host URL, enter:
-
Authentication > Click "Check for Supported Types" and Keep "OAuth2 (Office365)"
-
Click "Fetch URL"
-
Enter username and password for authentication
-
Next > Next > Next > Apply
sudo apt -s clean
sudo apt --purge autoremove
journalctl --disk-usage
sudo journalctl --vacuum-time=3d
sudo apt install stacer
stacer
Copy favourite shortcuts files
from:
/usr/share/applications/
/var/lib/snapd/desktop/applications/
to:
~/Desktop/
Right-click each shortcut file, select "Allow Launching"
Run in terminal:
gsettings set org.gnome.desktop.background color-shading-type 'solid'
gsettings set org.gnome.desktop.background picture-uri none
gsettings set org.gnome.desktop.background picture-uri-dark none
gsettings set org.gnome.desktop.background primary-color '#0D1117'
Alternately, use run gui app 'dconf-editor'
sudo apt install dconf-editor
sudo apt install curl ca-certificates linux-headers-generic
curl https://repo.waydro.id | sudo bash
sudo apt install waydroid dkms
https://docs.waydro.id/usage/install-and-run-android-applications
sudo nano /etc/pulse/default.pa
comment out 'load-module module-suspend-on-idle'
#load-module module-suspend-on-idle
systemctl --user restart pulseaudio
Read more about trouble-shooting pulseaudio at https://wiki.archlinux.org/title/PulseAudio/Troubleshooting
The fix for PulseAudio, mentioned above, is not a satisfactory one. Therefore, we find it better to replace PulseAudio with Pipewire on Ubuntu 22.04.
Check current status:
systemctl --user status pipewire pipewire-session-manager
Set up:
sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
sudo add-apt-repository ppa:pipewire-debian/wireplumber-upstream
sudo apt update && sudo apt dist-upgrade
systemctl --user daemon-reload
sudo apt install pipewire-audio-client-libraries libspa-0.2-bluetooth libspa-0.2-jack
sudo apt install wireplumber pipewire-media-session-
NOTE: there’s a ‘-‘ in the end of the command indicates to remove the package. The command will also install the required pipewire-pulse automatically.
systemctl --user --now enable wireplumber.service
Configure ALSA:
sudo cp /usr/share/doc/pipewire/examples/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/
Configure Jack:
sudo cp /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-*.conf /etc/ld.so.conf.d/
sudo ldconfig
Configure Bluetooth:
sudo apt remove pulseaudio-module-bluetooth
Reboot to make all changes effective
reboot
To verify, run:
pactl info
Source:
https://ubuntuhandbook.org/index.php/2022/04/pipewire-replace-pulseaudio-ubuntu-2204/
https://www.how2shout.com/linux/enable-pipewire-for-audio-and-bluetooth-in-ubuntu-22-04-or-20-04/
https://github.com/eliranwong/ubuntu_on_surface_go/blob/main/setup_remote_destkop_on_ubuntu.md
First, install libcanberra-gtk-module
sudo apt install libcanberra-gtk-module
Then, download hplip software and install printer driver:
https://developers.hp.com/hp-linux-imaging-and-printing/
Download: https://developers.hp.com/hp-linux-imaging-and-printing/gethplip
Installation instructions: https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index
Run 'hp-setup' after restart:
hp-setup
Remarks: Enter IP address manually if printer is not found.
https://ubuntu.com/tutorials/how-to-install-a-windows-11-vm-using-lxd#1-overview
https://fostips.com/install-incus-container-ubuntu-debian/
https://discussion.scottibyte.com/t/windows-11-incus-virtual-machine/362
https://blog.simos.info/how-to-run-a-windows-virtual-machine-on-incus-on-linux/
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/
https://github.com/linux-surface/linux-surface/wiki/Installation-and-Setup
https://www.zdnet.com/article/how-i-put-linux-on-a-microsoft-surface-go-in-just-an-hour/
https://www.medo64.com/2020/03/surface-go-wifi-driver-package/
https://9to5linux.com/you-can-now-install-linux-kernel-6-1-on-ubuntu-heres-how
https://updf.com/edit-pdf/ubuntu-pdf-editor/
https://vitux.com/how-to-edit-pdf-files-in-ubuntu/
https://superuser.com/questions/1705684/does-the-apple-magic-trackpad-2-work-on-linux
https://medium.com/@kaikoenig/apple-hardware-and-linux-964a4310bd4