Disable secure boot: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/disabling-secure-boot

As easy as booting from alternative drive. Write OS to Rufus, resize partitions using the Windows hard disk tool, then boot from USB and install (F12 to enter boot menu).

Installed packages: - `minicom` - `git`

## OpenSUSE

### Why OpenSUSE over Ubuntu?

https://itsfoss.com/why-use-opensuse/ https://www.lifewire.com/ubuntu-gnome-vs-opensuse-fedora-2201178 https://www.reddit.com/r/openSUSE/comments/eizbli/my_personal_opensuse_opinion_of_why_its_not_as/ https://www.reddit.com/r/openSUSE/comments/fe8zpl/how_is_opensuse_leap_for_desktop_use_compared_to/

Check file hash: `Get-FileHash -Path c:\Users\JDoe\Desktop\abc.exe -Algorithm SHA512`

https://www.reddit.com/r/linux4noobs/comments/9sbq9m/when_making_a_bootable_usb_drive_using_rufus/

## WSL

Windows Subsystem for Linux (WSL) runs Linux environments on Windows, currently has two versions as of 2021-05-26. WSL 2 is more updated, but is unable to bridge communications to USB ports. WSL 1 will work (https://www.hanselman.com/blog/connect-to-a-device-over-serial-com-port-on-windows-10-with-wsl1-tty-devices-with-windows-terminal-and-minicom). Direct access to Windows filesystem.

Turns out using WSL 2 is a bad idea, cannot interface with USB device directly. Will need to partition some space for an OpenSUSE environment.

Good thing is it's straightforward to partition hard drive space and install the OpenSUSE OS. Refer to this [unofficial guide](https://opensuse-guide.org/installation.php). If facing issues with bootloader, consider reading this [forum thread](https://forums.opensuse.org/showthread.php/546226-Dual-boot-windows-10-and-Leap-15-2). Similar instructions for Ubuntu on a different [article](https://itsfoss.com/dual-boot-ubuntu-windows-bitlocker/).

## Fresh installation

Just in case I need to actually install Windows 10 from scratch. Some key application instructions to take care of.

The classic article I have always used: [forum post](https://answers.microsoft.com/en-us/windows/forum/windows_10-windows_install/clean-install-windows-10/1c426bdf-79b1-4d42-be93-17378d93e587).

## Configuration

Power management in KDE does not have brightness control. `/sys/class/backlight` does not contain any files. Solutions online always reference `intel_backlight` or `acpi0_backlight`, which does not turn up with a search in the `/sys` directory. Followed this [thread](https://askubuntu.com/questions/715306/xbacklight-no-outputs-have-backlight-property-no-sys-class-backlight-folder) to search for the brightness control interface:

``` s-fifteen@localhost:/sys/class/backlight> sudo find /sys/ -type f -iname '*brightness*' /sys/devices/platform/thinkpad_acpi/leds/platform::mute/brightness /sys/devices/platform/thinkpad_acpi/leds/platform::mute/max_brightness /sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinklight/brightness /sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinklight/max_brightness /sys/devices/platform/thinkpad_acpi/leds/tpacpi::power/brightness /sys/devices/platform/thinkpad_acpi/leds/tpacpi::power/max_brightness /sys/devices/platform/thinkpad_acpi/leds/tpacpi::standby/brightness /sys/devices/platform/thinkpad_acpi/leds/tpacpi::standby/max_brightness /sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinkvantage/brightness /sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinkvantage/max_brightness /sys/devices/platform/thinkpad_acpi/leds/tpacpi::kbd_backlight/brightness /sys/devices/platform/thinkpad_acpi/leds/tpacpi::kbd_backlight/brightness_hw_changed /sys/devices/platform/thinkpad_acpi/leds/tpacpi::kbd_backlight/max_brightness /sys/devices/platform/thinkpad_acpi/leds/platform::micmute/brightness /sys/devices/platform/thinkpad_acpi/leds/platform::micmute/max_brightness /sys/devices/platform/i8042/serio0/input/input0/input0::scrolllock/brightness /sys/devices/platform/i8042/serio0/input/input0/input0::scrolllock/max_brightness /sys/devices/platform/i8042/serio0/input/input0/input0::capslock/brightness /sys/devices/platform/i8042/serio0/input/input0/input0::capslock/max_brightness /sys/devices/platform/i8042/serio0/input/input0/input0::numlock/brightness /sys/devices/platform/i8042/serio0/input/input0/input0::numlock/max_brightness /sys/devices/pci0000:00/0000:00:14.3/leds/phy0-led/brightness /sys/devices/pci0000:00/0000:00:14.3/leds/phy0-led/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0005/input/input44/input44::scrolllock/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0005/input/input44/input44::scrolllock/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0005/input/input44/input44::numlock/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0005/input/input44/input44::numlock/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0005/input/input44/input44::compose/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0005/input/input44/input44::compose/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0005/input/input44/input44::kana/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0005/input/input44/input44::kana/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0005/input/input44/input44::capslock/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0005/input/input44/input44::capslock/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:408A.0004/input/input43/input43::numlock/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:408A.0004/input/input43/input43::numlock/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:408A.0004/input/input43/input43::capslock/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:408A.0004/input/input43/input43::capslock/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:408A.0004/input/input43/input43::kana/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:408A.0004/input/input43/input43::kana/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:408A.0004/input/input43/input43::compose/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:408A.0004/input/input43/input43::compose/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:408A.0004/input/input43/input43::scrolllock/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:408A.0004/input/input43/input43::scrolllock/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0006/input/input45/input45::compose/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0006/input/input45/input45::compose/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0006/input/input45/input45::kana/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0006/input/input45/input45::kana/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0006/input/input45/input45::capslock/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0006/input/input45/input45::capslock/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0006/input/input45/input45::numlock/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0006/input/input45/input45::numlock/max_brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0006/input/input45/input45::scrolllock/brightness /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:406B.0006/input/input45/input45::scrolllock/max_brightness /sys/module/video/parameters/hw_changes_brightness /sys/module/video/parameters/brightness_switch_enabled /sys/module/thinkpad_acpi/parameters/brightness_enable /sys/module/thinkpad_acpi/parameters/brightness_mode /sys/module/i915/parameters/invert_brightness ```

No such interface `/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness` can be found, except this notable `thinkpad_acpi`.

No idea what "deleting the Nvidia driver and [installing the open source Linux driver](https://stackoverflow.com/questions/58317968/nixos-kde-powermanagement-does-not-have-brightness-control)" mean, but it could be a graphic card driver incompatibility. [Pulling out](https://forums.opensuse.org/showthread.php/507324-Intel-integrated-Graphic-Card-Problem-exists-13-2KDE-but-not-on-13-1KDE) the graphics card information:

``` s-fifteen@localhost:/sys/class/backlight> sudo hwinfo --gfx 23: PCI 02.0: 0300 VGA compatible controller (VGA)

[Created at pci.386]
Unique ID: _Znp.IdVZncE5RU6
SysFS ID: /devices/pci0000:00/0000:00:02.0
SysFS BusID: 0000:00:02.0
Hardware Class: graphics card
Model: "Intel UHD Graphics"
Vendor: pci 0x8086 "Intel Corporation"
Device: pci 0x9a49 "UHD Graphics"
SubVendor: pci 0x17aa "Lenovo"
SubDevice: pci 0x5088 
Revision: 0x01
Memory Range: 0x601c000000-0x601cffffff (rw,non-prefetchable)
Memory Range: 0x4000000000-0x400fffffff (ro,non-prefetchable)
I/O Ports: 0x4000-0x403f (rw,disabled)
Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)
IRQ: 255 (no events)
Module Alias: "pci:v00008086d00009A49sv000017AAsd00005088bc03sc00i00"
Driver Info #0:
  Driver Status: i915 is active
  Driver Activation Cmd: "modprobe i915"
Config Status: cfg=no, avail=yes, need=no, active=unknown

Primary display adapter: #23 ```

[Some](https://superuser.com/questions/1531050/no-brightness-control-in-kde) [sources](https://forum.kde.org/viewtopic.php?t=12527) suggest the use of `powerdevil`, but this is only for the case when the "Power Management" tab does not even appear in KDE. This [thread](https://bbs.archlinux.org/viewtopic.php?id=190817) suggests to add the following to the kernel if no interfaces in `/sys/class/backlight` are found: `video.use_native_backlight=0`. This is for Arch Linux.

Further probing suggests the thinkpad driver might not be enabled:

``` s-fifteen@localhost:/sys/class/backlight> lsmod | grep thinkpad_acpi thinkpad_acpi 110592 0 battery 24576 1 thinkpad_acpi ledtrig_audio 16384 3 snd_hda_codec_generic,snd_hda_codec_realtek,thinkpad_acpi rfkill 28672 10 bluetooth,thinkpad_acpi,cfg80211 snd 106496 13 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,thinkpad_acpi,snd_pcm video 53248 2 thinkpad_acpi,i915 ```

Using this [article](https://mzanfardino.wordpress.com/2015/02/10/linux-enabling-brightness-control-for-thinkpad-w520/) and modifying `/etc/default/grub` to include this line `GRUB_CMDLINE_LINUX_DEFAULT="splash=silent resume=/dev/disk/by-id/nvme-SAMSUNG_MZALQ512HALU-000L1_S4YCNF2NA11647-part6 mitigations=auto quiet acpi_backlight=vendor thinkpad-acpi.brightness_enable=1"`:

``` s-fifteen@localhost:/sys/class/backlight> sudo journalctl -b | grep thinkpad May 27 12:48:36 localhost kernel: thinkpad_acpi: ThinkPad ACPI Extras v0.26 May 27 12:48:36 localhost kernel: thinkpad_acpi: http://ibm-acpi.sf.net/ May 27 12:48:36 localhost kernel: thinkpad_acpi: ThinkPad BIOS R1EET32W(1.32 ), EC R1EHT32W May 27 12:48:36 localhost kernel: thinkpad_acpi: Lenovo ThinkPad E14 Gen 2, model 20TA004ESG May 27 12:48:36 localhost kernel: thinkpad_acpi: radio switch found; radios are enabled May 27 12:48:36 localhost kernel: thinkpad_acpi: Unknown/reserved multi mode value 0x0000 for type 4, please report this to ibm-devel@lists.sourceforge.net May 27 12:48:36 localhost kernel: thinkpad_acpi: Tablet mode switch found (type: GMMS), currently in laptop mode May 27 12:48:36 localhost kernel: thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the video driver May 27 12:48:36 localhost kernel: thinkpad_acpi: Disabling thinkpad-acpi brightness events by default... May 27 12:48:36 localhost kernel: thinkpad_acpi: rfkill switch tpacpi_wwan_sw: radio is blocked May 27 12:48:36 localhost kernel: thinkpad_acpi: battery 1 registered (start 95, stop 100) May 27 12:48:36 localhost kernel: input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input7 May 27 12:48:37 localhost NetworkManager[1203]: <info> [1622090917.3406] rfkill0: found WWAN radio killswitch (at /sys/devices/orm/thinkpad_acpi/rfkill/rfkill0) (platform driver thinkpad_acpi) May 27 13:11:26 localhost.localdomain kernel: thinkpad_acpi: unhandled HKEY event 0x1318 May 27 13:11:26 localhost.localdomain kernel: thinkpad_acpi: please report the conditions when this event happened to ibm-acpi-dlists.sourceforge.net May 27 13:11:27 localhost.localdomain kernel: thinkpad_acpi: unhandled HKEY event 0x1319 May 27 13:11:27 localhost.localdomain kernel: thinkpad_acpi: please report the conditions when this event happened to ibm-acpi-dlists.sourceforge.net May 27 13:11:27 localhost.localdomain kernel: thinkpad_acpi: unhandled HKEY event 0x1317 May 27 13:11:27 localhost.localdomain kernel: thinkpad_acpi: please report the conditions when this event happened to ibm-acpi-dlists.sourceforge.net May 27 13:37:40 localhost.localdomain sudo[8518]: s-fifteen : TTY=pts/1 ; PWD=/sys/class/backlight ; USER=root ; COMMAND=/usr/birnalctl -b thinkpad May 27 13:37:45 localhost.localdomain sudo[8524]: s-fifteen : TTY=pts/1 ; PWD=/sys/class/backlight ; USER=root ; COMMAND=/usr/birnalctl -b thinkpad May 27 13:37:51 localhost.localdomain sudo[8529]: s-fifteen : TTY=pts/1 ; PWD=/sys/class/backlight ; USER=root ; COMMAND=/usr/birnalctl thinkpad

s-fifteen@localhost:/sys/class/backlight> sudo grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... Found theme: /boot/grub2/themes/openSUSE/theme.txt Found linux image: /boot/vmlinuz-5.3.18-lp152.75-default Found initrd image: /boot/initrd-5.3.18-lp152.75-default Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi done ```

Rebooting... Not working. But no more warning in log for `thinkpad_acpi`:

``` s-fifteen@localhost:~> sudo journalctl -b | grep thinkpad May 27 14:31:23 localhost kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-5.3.18-lp152.75-default root=UUID=1303b0fd-03a4-4361-9478-baS4YCNF2NA11647-part6 mitigations=auto quiet acpi_backlight=vendor thinkpad-acpi.brightness_enable=1 May 27 14:31:23 localhost kernel: Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.3.18-lp152.75-default root=UUID=1303b0fd-03a4-4361--000L1_S4YCNF2NA11647-part6 mitigations=auto quiet acpi_backlight=vendor thinkpad-acpi.brightness_enable=1 May 27 14:31:23 localhost dracut-cmdline[221]: Using kernel command line parameters: resume=UUID=03934d92-9d4c-4730-958a-1366fae9dce2latime,ssd,space_cache,subvolid=267,subvol=/@/.snapshots/1/snapshot,subvol=@/.snapshots/1/snapshot BOOT_IMAGE=/boot/vmlinuz-5.3.18-lpme=/dev/disk/by-id/nvme-SAMSUNG_MZALQ512HALU-000L1_S4YCNF2NA11647-part6 mitigations=auto quiet acpi_backlight=vendor thinkpad-acpi.br May 27 14:31:26 localhost kernel: thinkpad_acpi: ThinkPad ACPI Extras v0.26 May 27 14:31:26 localhost kernel: thinkpad_acpi: http://ibm-acpi.sf.net/ May 27 14:31:26 localhost kernel: thinkpad_acpi: ThinkPad BIOS R1EET32W(1.32 ), EC R1EHT32W May 27 14:31:26 localhost kernel: thinkpad_acpi: Lenovo ThinkPad E14 Gen 2, model 20TA004ESG May 27 14:31:26 localhost kernel: thinkpad_acpi: radio switch found; radios are enabled May 27 14:31:26 localhost kernel: thinkpad_acpi: Unknown/reserved multi mode value 0x0000 for type 4, please report this to ibm-acpi- May 27 14:31:26 localhost kernel: thinkpad_acpi: Tablet mode switch found (type: GMMS), currently in laptop mode May 27 14:31:26 localhost kernel: thinkpad_acpi: rfkill switch tpacpi_wwan_sw: radio is blocked May 27 14:31:26 localhost kernel: thinkpad_acpi: battery 1 registered (start 95, stop 100) May 27 14:31:26 localhost kernel: input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input33 May 27 14:31:27 localhost NetworkManager[1219]: <info> [1622097087.3132] rfkill0: found WWAN radio killswitch (at /sys/devices/platf ```

Looking through `sudo journalctl -b`, seemed to have found this line by `powerdevil`:

``` May 27 14:31:41 localhost.localdomain org_kde_powerdevil[2063]: powerdevil: No outputs have backlight property ```

I feel like I kept seeing this pop up.

In any case, I need to rewrite the boot parameters according to [these](https://wiki.archlinux.org/title/Intel_graphics#Backlight_is_not_adjustable) [articles](https://bbs.archlinux.org/viewtopic.php?id=183524). Update: These do not work as well...

Attempting to use `acpi_listen` to listen for relevant keystroke events:

``` s-fifteen@localhost:~> cnf acpid

The program 'acpid' can be found in following packages:

Try installing with:

  sudo zypper install acpid

s-fifteen@localhost:~> cnf acpi_listen

The program 'acpi_listen' can be found in following packages:

Try installing with:

  sudo zypper install acpid

s-fifteen@localhost:~> sudo zypper install acpid systemctl start acpid.service

```

The keys are not responding at all... Tried [this](https://wiki.gentoo.org/wiki/ACPI/ThinkPad-special-buttons), but conditioned on the availability of `intel_backlight` itself.

This [article](https://wiki.archlinux.org/title/Backlight) tells me something interesting:

``` s-fifteen@localhost:~> cat /var/lib/systemd/backlight/platform-thinkpad_acpi\:leds\:tpacpi\:\:kbd_backlight 0 ```

Tried this... but it ended up causing the desktop to be unable to load. Deleting it restored desktop functionality.

``` s-fifteen@localhost:/etc/X11/xorg.conf.d> cat 80-backlight.conf Section "Device"

      Identifier "Intel Graphics"
      Driver     "intel"
      Option     "AccelMethod"      "sna"
      Option     "Backlight"        "intel_backlight"
      BusID      "PCI:0:2:0"

EndSection ```

Possible one for `i915`:

``` https://forums.lenovo.com/t5/Ubuntu/X1-Extreme-Backlight-brightness-not-working-with-Linux-in-Hybrid/td-p/4567085 ```

Massively useful resources:

- https://wiki.kubuntu.org/Kernel/Debugging/Backlight - https://wiki.archlinux.org/title/Backlight

Watching the bright screen for so long gave me a headache... but I give up.

---

### 2021-05-27 Thursday

To connect to VPN, might need to install the [OpenVPN client](https://software.opensuse.org/package/NetworkManager-openvpn-gnome). To connect, open the network configuration settings and import the `.ovpn` file.

Installed TeamViewer, need to [add GPG key](https://community.teamviewer.com/English/kb/articles/30708-how-to-install-teamviewer-on-red-hat-and-centos) first to validate the file:

``` wget https://download.teamviewer.com/download/linux/signature/TeamViewer2017.asc sudo rpm --import TeamViewer2017.asc

wget https://download.teamviewer.com/download/linux/teamviewer-suse.x86_64.rpm sudo zypper install teamviewer-suse.x86_64.rpm ```

There will be an error about some `*/*` MIME type, but you can pretty much ignore it. Enable the `teamviewerd` daemon to start at boot time as well:

``` sudo systemctl enable teamviewerd ```