changeblog/1608028434

9front on Lenovo Thinkpad Twist

Tue, 15 Dec 20 11:33:54 CET

A few weeks ago I removed archlinux from my remaining machine. I noticed how the new lenovo keyboards aren't good and the trackpoint is crap. That's why I still prefer the Thinkpad T61, even without battery.

Anyways, I'll try to describe the process of the installation. The installation itself went according to the FQA, I'll just add some notes.

Process

First I had to disable UEFI completely and switch to legacy BIOS. I know 9front can handle UEFI somehow, but I never got it working on any machine. To make 9front work with legacy BIOS I had to change the SSD layout from GPT to MBR. This was possible, just remove all partitions and use the command line to create DOS partitions. Then the SSD was detected as MBR/non-GPT and I could proceed with default installation.

After installation I needed to get WIFI working. Thanks to 9front developers I was able to use BSD drivers as documented in the FQA. In my case I just grabbed the iwn-2030 drivers, placed them in /lib/firmware and built the kernel from scratch.

Enabling ACPI in the plan9.ini and starting aux/acpi went without errors, only bad opcode warnings showed up. Still, everything works as expected, so I didn't investigate further.

Issues and Troubleshooting

I had exactly two issues. The first is the bad opcode as described earlier.

The second is a big surprise. Backlight controls work out of the box! I know older machines handle this directly without using the operating system, but this was a modern machine. Still it worked with only one tradeoff:

It always prints lapicerrors on the console. I didn't find a good way to disable them, so I just added a hidden window in my riostart that just cat /dev/kprint so the errors don't fill the screen.

Bonus: conntosrv

As a bonus I have a small script that saves me lots of installation time. I have a server with my $home directory, including some configuration in my lib/profile. On my terminals (laptops) I just work in my $home like it was right there on my machine.

To make this happen I placed the little script in my terminal's /cfg/$sysname/conntosrv and called in the /cfg/$sysname/termrc.

The script contains:

#!/bin/rc

echo -n 'connect to server: '
server=`{read}

if(~ $#server 0){
	echo not connecting to services >[1=2]
	exit
}

if(! test -e /net/dns)
	ndb/dns -r

auth/factotum
for(i in $server){
	rimport -Cc $i /n/$i
}
bind -c '/n/'^$server(1)^'/usr/'^$user /usr/$user

As you can see, the scrips connects to all servers you input at the prompt. It takes the first to be your $home, all others are imported to /n.