Carlos Fenollosa

Carlos Fenollosa

Engineer, developer, entrepreneur

Carlos Fenollosa — Blog

Thoughts on science and tips for researchers who use computers

Fed up with the Mac, I spent six months with a Linux laptop. The grass is not greener on the other side

April 02, 2021 — Carlos Fenollosa

This article is part of a series:

  1. Seven years later, I bought a new Macbook. For the first time, I don't love it
  2. How I moved my setup from a Mac to a Linux laptop
  3. This article
  4. (TBD) My review of the M1 Macbook Air

Due to very bad decisions by Apple's product marketing teams, Mac hardware and software had been in steady decline since 2016.

Therefore, there has been a trickle of articles on the Geekosphere about people switching from Macs to Linux or Windows.

This is the contrarian view. Don't do it.

The TL;DR is right there in the title: migrating to Linux is fine, but don't expect a better experience than the Mac.

My experience with the Dell XPS 13" Developer Edition was positive in general, including a self-hosted Cloud setup, but not good enough to convince me to stay with it.

We will cover:

  1. A comparison of generic productivity software: email, calendar, image manipulation, etc.
  2. Available power tools to customize your keyboard, trackpad, and more.
  3. A quick jab at decades-old issues which still haven't been solved.
  4. Misc stuff that Linux does better than the Mac.
~~~~~

I feel like I need to clarify that this is an article aimed at Mac users who are considering a migration to Linux in hope of a more polished system. As usual, personal experiences and requirements are subjective. I know that Ubuntu ≠ Gnome ≠ Linux. I also know that I'm not entitled to anything, everybody is welcome to send patches. Just let me say that if you try to cherry-pick any single issue, you're missing the forest for the trees.

~~~~~

Linux productivity software is fine, but there are rough edges for the power user

The typical disclaimer when recommending Linux to a Mac/Windows user is that some proprietary software may not be available, like MS Office, Photoshop, games, etc.

Nobody says, "the main problem you will find with Linux is that email and calendar clients fall apart when you scratch under the surface."

It is truly ironic because I ran MS Office with Wine and it worked well but I was unhappy with my email workflow.

Yes, the apps I missed the most from the Mac were Mail.app, Calendar.app, and Preview.app.

I am an extreme power user, to the point that many of the keys on my keyboard don't do what the keycap says. I want my apps to let me do easy things fast while allowing me to do complex tasks with a bit of extra work.

I send and receive maybe 100 emails per day. Most of them are HTML, with attachments, video conference invitations, and such. I don't live in a vacuum. I can't ask my clients to send me plaintext email only. I need to send long emails with pictures, I want my zoom invites to appear automatically in my calendar.

For some reason Mail.app gets a lot of criticism, but it does almost everything well. It has conversation view, search is fast and helpful, multiple accounts are combined seamlessly including autodetection of the "From" field based on the recipient, and smart folders (search folders) are updated when you need them.

On Linux, the only email client with a native "conversation view" is Geary, which is in early development and still very buggy. Evolution is fine and well-integrated with the rest of the desktop apps, but the lack of conversation view was a deal-breaker for me. Thunderbird is an excellent email client, but conversation view is provided by a plugin that is also buggy. Other options like Claws, Sylpheed, Kmail, and terminal clients are more limited in terms of features and don't work for me.

I ended up using Thunderbird, but I felt like I was doing my email with handcuffs. Suffice to say, I had both Thunderbird and Gmail open and used either one depending on the task I needed to complete.

The situation of calendar and contacts clients is similar, with the same contenders. I also ended up using Thunderbird along with Google Calendar.

About PDF and basic image management, anybody who has used Preview.app will realize that it's much more than just a viewer. There is simply no replacement on Linux. You'll need to open either the Gimp or Xournal for any basic editing. I am an advanced Gimp user, but for most operations, Preview.app is faster and more convenient.

Desktop notifications are something we don't think a lot about, but a bad system can be very annoying. Gnome has a system-wide framework, which is not well thought in terms of dealing with the actual notifications.

Most apps have their own notifications system which runs in parallel, especially Thunderbird and Evolution. You end up with different types of notifications on different parts of the screen, and a non-consistent UI to deal with them.

Finally, on the Mac, you can find an ecosystem of alternative paid PIM apps, like Spark, Fantastical, Things, and others. There is no equivalent ecosystem on Linux, probably because they would be difficult to monetize.

Power tools are more limited and more difficult to use

The previous section could be summarized as "Linux PIM software is fine in general, but gets in the way of power users."

That is counterintuitive, right? Linux is a much nerdier OS than the Mac and everything is customizable.

But when you jump from theory to practice, at some point you just want a tool to help you set up your config, without the need to edit your trackpad driver source file.

Any advanced Mac user knows about Karabiner, BetterTouchTool, Choosy, Alfred, Automator, and more.

With Linux, you can achieve almost the same feature set, but it is harder and more limited.

For example. To customize your keyboard, you will need a combination of xdotool, xbindkeys, xcape, xmodmap and setxkbmap to capture some event and then run a shell script. There is a Gnome Shell plugin that allows you to tweak your keyboard, but it's nowhere near Karabiner.

If you want to achieve some specific action you need to read four or five manpages, search online, and figure out how you are going to put the pieces together. That made me appreciate Karabiner and BTT much more.

Furthermore, I couldn't find a real alternative to BTT to customize trackpad multi-touch gestures. I tried a few approaches with libinput-gestures but none worked.

In the end, I was able to replicate most of my macOS power tools setup via input hooks and shell scripts, but it took much longer than it should have. I found it surprising that, given the number of nerds using Linux every day, there are no specific tools equivalent to those mentioned above.

"I Can't believe we're still protesting this crap"

Please allow me to make a bit of fun of issues that existed back in 1999 when I started using Linux and still exist today.

  • Screen tearing with the intel driver. Come on. This was solved on xorg and now with Wayland it's back. I fiddled multiple times with the settings but couldn't fix it. Even with OpenBSD it was easier to fix. The default settings should be better. I don't care if the video driver will use an extra buffer or whatever.
  • Resolving new hosts is slow, with a delay of about 2-3 seconds. I tried to disable IPv6 and other tricks from Stackoverflow threads, but none solved the issue completely. Again, an issue with the default settings. macOS does some DNS magic or something and the network feels much faster.
  • Resuming after suspend seems to work at first. As soon as you start to trust it and not save your work before closing the lid, it betrays you and you lose your work. Later, you upgrade the kernel and it works all the time for weeks until you upgrade the kernel again and it goes back to working 80% of the time. What a mess.

We've come a long way with Linux on the desktop but I think it's funny that some things never change.

Linux also hides some gems

I want to end this review on a positive note.

During those six months, I also took notes on apps and workflows that are still better on Linux.

  • Tracker/search is better and faster than Spotlight. It's a shame that not all apps take advantage of it, especially Thunderbird.
  • Firefox is amazing. On the Mac, Safari is a better choice, but I was very happy using Firefox full-time on Linux. I am going to miss some great plugins, like Multi-account containers, Instagram-guest, Reddit Enhancement Suite, and of course NoScript and uBlock Origin
  • Nautilus is better than the Finder. It's not even close.
  • The Gnome Shell Extension Gallery has many hidden gems, like Nothing to say which mutes the microphone system-wide with a shortcut, the Emoji selector, Caffeine to keep your computer awake, a Clipboard manager, and Unite to tweak basic UI settings. I am now using macOS equivalents to those, and I discovered their existence thanks to the Linux counterparts.
  • Insync for Linux is better than the official Google Drive File Stream for the Mac. In fact, I am now using the Mac version of Insync.
  • Gimp and Inkscape are excellent apps, and it's a pity that the macOS ports are mediocre. I'd rather use them than Pixelmator/Affinity Designer. Hopefully, someday either GTK or these apps will get decent macOS versions.
  • apt-get was a revolution when it was released in 1998 and it is still the best way to manage software today. brew is a mediocre replacement.
  • I paid for Crossover which allowed me to use MS Office and other Windows apps I needed. Kudos to the Wine developers for almost 30 years of continuous effort.
  • Xournal is an obscure app that allows you to annotate PDF documents as well as draw with a Wacom tablet. I used it constantly as a whiteboard for online presentations. The macOS port is very buggy, unfortunately, so I use OneNote which is not that good.

Hopefully, the success of paid tools like Insync or Crossover can encourage the developer ecosystem to continue developing quality apps, even if they are non-free, or supported by donations.

What's next?

Watching the ARM Macs keynote

On November 10th Apple showed us the future of the Mac and released again laptops worth buying. So I bought the 2020 M1 Macbook Air. You will read a review of it soon.

The hardware is much better than the Dell's and, I guess, every other PC laptop. The software ecosystem is a big improvement over my Linux setup, and Big Sur course corrects the absolute mess that Catalina was. With every passing year, the iCloud offering keeps getting better, especially if you have other Apple devices.

I am somewhat sad that I couldn't join the Linux Resistance. After all, I've been an annoying proselytizer heavy free software advocate in the past, and I still am, though I nowadays admit there are many nuances.

The experience of using Linux as a daily driver has been very positive for me, but I do need my productivity. I can work much faster with macOS and iCloud than I was with Linux and my self-hosted cloud setup.

If there ever was a period where the Mac experience was worse than Linux, it is now over. The Mac ecosystem wins again. Don't switch to Linux expecting it to have fewer papercuts than the Mac. It's quite the opposite.

There is definitely grass on the other side of the fence, but it is not greener.

Tags: apple, linux

Comments? Tweet  

Whatever Clubhouse is, they are onto something

February 21, 2021 — Carlos Fenollosa

I've been following Clubhouse for a few weeks. As a podcaster, it piqued my interest. So it's like podcasts, but live?

The official slogan is drop-in audio chat. But that's not good. It only makes sense once you've used the app, and it doesn't describe the whole thing.

For me, the perfect definition is: it's Twitch for audio. But then, you need to know what Twitch is.

Yesterday I received an invitation and finally got to try it first hand. And I think that Clubhouse is onto something.

Radio vs Podcasts

Everybody knows radio. Even during this Internet revolution, it still has survived. Why? Because it's convenient. You tune in to some station and listen to music or people talking. It requires zero effort.

Radio has two problems: the fact that it's live, and the selection of topics.

Nowadays it's easy to download aired shows, so if you really like some program but you missed it when it was live, just go to their website and download the mp3 file.

However, the selection of topics still is an issue. Due to the fact that a station is a business, and that its model is airing ads, it requires volume. Therefore most radio stations produce mainstram content.

With the coming of the internet, a few nerds started using a new technology called Podcasts. You could record any audio content with a 1€ microphone and publish it on the internet.

Even though podcasts are naturally asynchronous, many shows air live too. Some listeners can listen to the stream, but most of them just download the audio file later.

Publicly searchable podcast directories aggregate both amateur and professional audios. Thanks to that, we have reached this point where anybody in the world has access to an ocean of audio content about any topic, either mainstream or niche.

Enter Clubhouse

What Twitch did to Youtube, Clubhouse has done to podcasts. For the sake of this explanation, let's ignore that podcasts are an open ecosystem and Youtube is proprietary.

Youtube is a video discovery platform. It has some tools to livestream, but it's not their main focus. Twitch has a much better product (and ToS) for livestreamers and their audience.

Want to watch somebody playing Minecraft? Open Twitch, search for Minecraft, and boom! hundreds of streams right there. Join one, chat with the community, and if you're lucky the streamer may shout out to you.

You can't do that with podcasts.

First of all, there can be some interactivity by combining an Icecast stream with an IRC channel, but it is not a good system.

Second, live podcasts are not aggregated anywhere. It is just impossible to search for "strategies to control your stress during covid-19" and find live shows.

So, if only as a directory of live audio content, Clubhouse has future.

But it is not only that. The product is very well thought and lets the audience participate, with audio.

A naive approach would have been to include a text chat on top of the audio stream. That would replicate the current solution on an integrated app. Okay, not bad.

However, the Clubhouse team spent some time thinking about the use case for audio streaming, which is not the same as for video streaming, nor public chat rooms.

Most of us listen to audio while we are doing other tasks and most of the times our hands are busy. This is why people jokingly call it the Airpods social network. You can participate while being away from a phone or computer.

In Clubhouse, you can tap a button to "raise your hand", and the moderators may "unmute" you. Then you can talk to the rest of the audience. Of course, not all show formats allow for that, but the option is there.

Being able to talk to your idols or even talk to the community of fans is very powerful. My first experience with Clubhouse was moving. I was listening to a concert and after the show all the listeners gathered up to talk about their experience and to have a chat with the band. Everybody agreed that with Clubhouse you can feel that there's people at the other end. Not only the speakers, but also the audience.

You don't get that with podcasts, even with live ones with a chat room.

A new category

Clubhouse has definitely invented a new category which combines the best of radio and the best of podcasts.

The product implements a selection of novel features which, when brought together, create an exciting and very addictive experience:

  • Directory of live audio streams ("rooms") about any imaginable topic
  • You can quickly drop in any room, listen for a few minutes, and jump to another one
  • The audience can participate via audio, which creates a great sense of community
  • Basic tools to follow people and interests, and get notified when they live stream
  • Of course, streamers may record the audio and publish it afterwards, so it's trivial to use Clubhouse in combination with the current podcasting ecosystem.

If you're in the podcasting community you should try to find an invitation. It is the real deal.

Tags: internet, podcasting

Comments? Tweet  

How I moved my setup from a Mac to a Linux laptop

February 11, 2021 — Carlos Fenollosa

This article is part of a series:

  1. Seven years later, I bought a new Macbook. For the first time, I don't love it
  2. This article
  3. Fed up with the Mac, I spent six months with a Linux laptop. The grass is not greener on the other side
  4. (TBD) My review of the M1 Macbook Air

Returning the Macbook Pro

In the previous installment of this series I explained how I had been disenchanted with recent Macs.

The fact is that shortly after writing that review I returned the 2020 Macbook Pro.

I tried to love it, honest to God, but it was mediocre.

Let me share with you the list of issues I found while using it for two weeks:

  • USB2 keyboard and mouse randomly disconnecting. I tried 3 different USB/Thunderbolt adapters, including Apple's, to no avail.
  • Abnormal rattling sound when fans start spinning, as if they were not properly seated.
  • Not detecting the internal keyboard sometimes after resuming sleep.
  • Only 5 hours of battery life when streaming video with the screen off, connected to a TV.
  • Battery drained from 70% to 15% after sleeping overnight.
  • The touchbar. I spent time trying to make it useful with BetterTouchTool. Then I discovered that the keypresses don't register correctly most of the times, and I had to tap twice or three times, which defeats the purpose of having a dedicated shortcut.
  • Trackpad registers too many spurious taps and the cursor jumps around the screen while typing.
  • Airpods Pro have ~400ms of audio lag when watching videos. Solved with a reboot but it appears again after a few minutes.
2020 MBP does not detect its internal keyboard

The fact that it had issues with the internal keyboard and the USB subsystem made me think that the unit may have a faulty logic board. I discovered later, through a Reddit thread, that the USB2 issue was not specific to my unit, but it didn't matter much.

I was feeling really ripped off with a machine I had spent 2.000€ on and which, speed aside, was worse than my 2013 Air in every way I cared.

In the end, my gut told my brain, "Stop rationalizing it, this laptop makes you unhappy", and I came to terms with it.

Now what?

I had been dreading this moment since 2016, when I realized that Apple didn't care about my demographic anymore.

Migrating platforms is a big hassle, so after I made the decision to return the Macbook Pro, I thought carefully what the next steps would be.

In order to transition from the Mac to Linux I had to prepare a plan for for new hardware, new software, and a new cloud ecosystem.

At that point there were strong rumors about ARM Macs. I thought I'd use Linux for an indeterminate amount of time, until Apple hopefully released a good Mac again. Which may have been "never", though I was optimistic.

I have used Linux extensively in my life, since 1999, but mostly as a developer. Nowadays my requirements are more "mainstream" and I need apps like Microsoft Office and Adobe Reader to do my job. This is an important point to make. This computer is my main work tool, and it needs to accommodate my own needs as well as my job's. I spent some time making sure that I could run all the software I needed. As a last resort, there is always the option of using a VM.

As a final step, I had to move all the iCloud stuff out of there, because it is not interoperable with standard clients. I decided I would self-host it and see how difficult it is to leave the walled garden.

Therefore, I needed to fulfil the following requirements:

  1. Good laptop hardware with Linux support
  2. Ability to run work-related software
  3. Self-hosted (or almost) cloud services

1. Choosing a new laptop: The 2018 Dell XPS 13"

Before buying—and potentially returning—a new machine I drove to the office and grabbed two old laptops to see if they would fit: a Thinkpad 420 and a 2018 Dell XPS 13".

I decided to test drive the five of them: the 2020 MBP, my 2013 MBA, the Thinkpad, the Dell, and my tinkering laptop, a Thinkpad x230 with OpenBSD.

Benchmarking laptops

I then spent a couple days trying to make some sense of the situation. You can see them running a group video chat and some benchmarks.

Fortunately, a clear winner emerged: the 2018 Dell XPS with Ubuntu-Dell installed.

How good is the 2018 XPS? Excellent. 9.5/10 would recommend. I got in love with that machine. Very good hardware, with just a few minor issues.

Pros:

  • Good screen quality
  • Small bezels. It makes a difference and I still miss them today.
  • Light, nice in my lap. The Macbook Pros have air vents that "cut" into your legs when you're wearing shorts.
  • All I/O worked fine. I used the official Dell Thunderbolt Dock.
  • Excellent keyboard. I liked the pgup/pgdn keys on the arrow cluster and welcomed back the function keys.
  • Good battery life (6h of streaming video) even though the laptop had been used daily for almost 3 years.

Cons:

  • The speakers are of laughable quality. Not just bad, but why-would-Dell-do-that bad. Extremely quiet and terrible quality.
  • The webcam is on a bad location. Not really a big deal, but I'm glad they fixed it in recent revisions.
  • The trackpad is kinda like the 2013 Air's, but a bit worse.
  • Coil whine. I tried to be positive and used it as an "activity indicator" like in the old days of spinning hard drives, but I'd rather not have it.

That really is it. The Dell XPS is probably the best go-to PC laptop. Excellent set of compromises, good price, good support. If you want to use Linux on a laptop, you can't go wrong with the XPS.

2. Doing my job with Linux

I knew beforehand that hardware support was not going to be an issue. Linux drivers in general are pretty good nowadays, and that XPS specifically was designed to work well with Linux, that is why we bought it for the office.

On first boot everything works. Ubuntu is pretty good. Gnome 3 tries to be like a Mac, which I liked, and the basic software is fine for most of the people.

I then installed my work software. Most of it is either standard (email, calendar...) or multi-platform via Electron or webapps. For Windows-specific software I purchased a license of Crossover and also installed a Windows 10 VM on Virtualbox. It was not super convenient and sometimes things crashed with Crossover, but I could manage.

Overall, the desktop environment and base apps are not as polished as macOS, which I will discuss later, but it worked.

I am happy to realize that I can continue recommending Linux to "regular people" who want a computer that just works, doesn't get viruses, and is very low maintenance.

3. My self-hosted cloud setup

This is a topic that is on everybody's mind right now. We went from the original, decentralized internet, to a network centralized in a few vendors like Facebook, Google, Cloudflare and Amazon, and I think that is a bad idea.

The walled garden is comfortable, but what happens when you want to make the switch? How easy it really is to migrate your online infrastructure to another vendor?

Well, I was going to discover that soon. I like the iCloud ecosystem, and in general am fine with Apple's privacy policies, but I just couldn't continue using it. Apart from email, all other services (pictures, calendars, files, notes, etc.) cannot be used in Linux, and the browser client is extremely bad.

I am a geek, and have been a sysadmin since college, so I took it as a personal challenge to create my own personal cloud infrastructure.

First I tried Nextcloud. It mostly works and I recommend it in general, but the server components are too heavy and the file syncing is slow and unreliable.

I decided to self-host every individual piece of the puzzle:

  • My mail has been managed by postfix/dovecot for a few years now. I don't recommend anybody self-hosting email due to deliverability issues, but I'm that stubborn.
  • I set up radicale for contacts, calendars and tasks. It had issues connecting to some clients due to, I believe, SSL negotiation. If I had to set it up again I'd try another alternative.
  • All my files got synced over my laptops and the server thanks to Syncthing. I can't stress enough how great of a software is Syncthing. Really, if you're looking for an alternative to Dropbox, try it out. It will amaze you.
  • Syncthing does not expose files publicly, so I span up the Apache Webdav server to share files.
  • Joplin is a good alternative to take rich text notes and sync them over the internet. The clients are not very polished, but it works.
  • For passwords I've been using Lastpass for some time.
  • I kept using iCloud for pictures, because it's the best solution if you have an iPhone. It is fine because I don't need to work with pictures on my daily workflow.

It took some time of researching and deploying all the pieces, and I'm quite happy with the result. It feels really great to manage your online infrastructure, even though it requires technical knowledge and regular maintenance to keep everything up to date.

So how did it all work out?

Well, I have been repeating this term all over the article: it works. I could do my job, and it was a very gratifying learning experience. Overall, I do encourage geeks to spin up their own cloud infra and work with Linux or BSD boxes. I do have some self-hosted cloud services and I also keep a laptop with OpenBSD which I use regularly.

It is possible to get out of the walled garden. Of course, it's not within reach of the general public yet, even though Nextcloud is very close, and some third party vendors are starting to offer an integrated cloud experience outside the world of the Big Cloud.

But I'm writing this in the past tense because I went back to the Mac. Unfortunately, after six months of using this setup full-time I started noticing very rough edges, which I will explain on the next article.

Stay tuned!

Tags: apple, linux, hardware

Comments? Tweet  

Linux vs GNU/Linux

February 07, 2021 — Carlos Fenollosa

Why I do call the system Linux

I personally use the term Linux for simplicity. I know that it's the kernel name, but that's how naming works, sometimes it's convenient to use a synecdoche.

Linux is useful to identify the platform as a whole and it is recognizable to the general public. No-one is using it as demeaning, and when technical people need to be more specific they can include any complements to that term.

Why I don't call it GNU/Linux anymore

Some time ago I was an advocate for the term GNU/Linux, following the rationale of the FSF.

I still do recognize the importance of the FSF and the GNU project into making Linux what it is today. However, I think that nowadays this controversy does more harm than good to the FSF, and I encourage people to be careful when discussing it.

The FSF arguments boil down to:

  1. Many years ago, a big percentage of the codebase of GNU/Linux systems was sourced from the GNU project.
  2. The GNU project is not just a series of tools, but rather an integrated system, which was missing only the kernel. It existed before Linux.

The thing is, with every passing year Linux systems have less and less GNU components. Some vendors are even preferring software with alternative licenses such as BSD or Apache.

Should we then, using the same arguments, advocate for a name which reflects the more recent critical components, as GNU/FreeDesktop/Apache/OSI/BSD/.../Linux?

I am not trying to ridicule the FSF argument. To the contrary, my point is that, while they have been a very important contributor to the project, those specific arguments carry less weight as the project progresses. Therefore, even if this discussion could have been productive in 2001, nowadays it is either moot, or worse, plays against the GNU project's interests.

I am sure that the FSF will continue calling the system GNU/Linux and I believe they are entitled to it. But I don't think anybody should continue to proselytize about this anymore. And I also don't think that calling the system Linux in 2021 is neither morally nor technically wrong.

Tags: linux

Comments? Tweet  

Damn Small Linux on a Libretto 50CT

November 24, 2020 — Carlos Fenollosa

In about 2004 a friend from college got into his hands a series of Toshiba Libretto 50CT. They all came with Windows 95 pre installed, and we wiped them out and installed Debian with a 2.2 kernel from floppies, with much pain because of the unsupported disk drive. I remember it being so difficult that I don't even want to write about it. But it booted and was able to run Vim, Links, and connect to the internet. Enough for a network-enabled typewriter.

I got Richard Stallman to sign mine while it was running GNU/Linux, but when I bought a regular laptop I stopped using it because, well, it is too old, and its keyboard is too tiny to type comfortably with it.

The Libretto, closed

The Libretto, closed. It is a tiny machine, a wonderful piece of engineering.

Around 2012 I found it inside a box at home, working perfectly, with a battery life of a bit less than an hour—which is incredible for a 12+ year old machine— and DR-DOS installed. I can't remember why I did that, but Golden Axe was also installed, so there's a hint.

I decided to install a modern Linux and, at least, store it on a working condition to give some justice to Stallman's signature.

There are some tutorials available on the net, but none of them covered 100% of the hardware support for my machine. Most of them are also outdated, and refer to distributions that don't exist, don't have any support or are about unusable nowadays. However, I took many hints from those tutorials, and I will reference them accordingly.

Hardware

This laptop has a 75 MHz —actually, mine reports 74 MHz— with 24 MB of RAM, which is an upgrade from the original 16 MB which are usually bundled. The screen is 640x480, and if you choose a higher resolution, instead of scaling the image, it only displays the upper-leftmost 640x480 pixels, leaving the bottom and rightmost part of the area out of sight.

The mouse device is emulated as a PS/2, and physically is a "clitoris"-like pointing device. You know what I mean. Working with the X windows is a pain in the neck because the location of the mouse and buttons isn't very ergonomic, and clicking on a button makes the whole screen move on its hinges.

Next to the mouse there is a speaker which is similar in quality to those of a modern smartphone.

This device doesn't have any extension port other than a dock connector for a dock I don't have, and a 16-bit PCMCIA slot, which you will need for the network card. It doesn't have a COM port or anything like that, which is understandable, given the size of the case.

It does have an Infrared device, which is quite slow and useless, but for its time it was as good as wireless could get. The other holes correspond to the power adapter and the reset button next to the PCMCIA, big enough to be able to reset the laptop with a regular pen.

For the full specifications, please refer to the official leaflet.

The Libretto

The setup I will be using: the Libretto, and a 3Com 16-bit PCMCIA Ethernet card

Choosing a Linux distribution

I wanted to find some modern, low-demanding software, not unsupported versions of Debian or RedHat. As you might have expected by this page's title, I chose Damn Small Linux (DSL).

I was very lucky to find that my machine had been upgraded to 24 MB of RAM. Apparently, even low-end distros have difficulties booting a regular kernel with 16 MB. I didn't want to tune or recompile the kernel on a 75-MHz machine, so I had to do some tricks.

In order to decide on a distro, I tried to set some goals up:

  1. Discard modern distributions which require at least 256 MB of RAM. In fact, discard anything that doesn't work with 24 MB of RAM
  2. Try to avoid old versions of current distros (i.e. Debian Woody) because the ISOs and the packages might not be mirrored anymore and are difficult to be found.
  3. Use a distro which self-configures kernel modules on boot, because I will be installing from a Virtual Machine and the hardware will change between reboots. Recompiling the kernel is totally out of the picture.
  4. Kernel 2.4 if possible, to make both the audio and the Ethernet work
  5. As easy to configure as possible. I want to finish this in a few hours... [Narrator: he didn't]

I found myself with these contenders, Damn Small Linux, Puppy Linux and Tiny Core Linux.

DSL v4 was the chosen one for many reasons. First, the default software choice is a good compromise and finely tuned for low performing machines. The installation seemed the easiest of the three, and—very important—worked flawlessly inside VirtualBox. The documentation is very extensive and, as a slightly old distro, there are lots of manuals and forum posts with solutions to common problems.

There is also the fact that DSL is based on Knoppix, so it detected my hardware perfectly, didn't have to tweak the PCMCIA, and only had to configure the audio manually because the I/O ports were not the standard ones. This was a huge aid for me. PCMCIA Internet working out of the box is something I hadn't even imagined to have.

However, the decision also came with a few drawbacks. DSL has its own "package manager", which only works from X and can't uninstall packages.

apt-get can be enabled, but it might break packages already installed with MyDSL. Furthermore, those packages tend to disappear on a reboot for some reason. I'm still unsure on whether to use apt-get with MyDSL. We will not be using it.

The ACPI doesn't work, but I don't know whether it's the kernel or the Libretto's fault.

My biggest fear, however, is that most of the packages are old and might have security issues. However, as this will not be my main machine, and it won't run a browser with JavaScript enabled, I'm not very worried.

Why didn't I choose Tiny Core? because it didn't boot on a VirtualBox machine with 24 MB of RAM. It would have been my first choice, because it is better maintained than DSL. A real pity.

And what about Puppy? The LiveCD is great but the installation instructions were too complicated for me. I really didn't want to spend that much time configuring everything. It is maybe too modern (based on Slackware 13.37 with Kernel 3.1.10) and I doubt the Libretto could have handled its kernel.

Installation

Please note: I will assume that you have some experience with Linux, partitioning, and installing stuff from a console.

Strategy

There are two alternatives: use floppy disks or physically remove the drive and set up a VM. Years ago, I went the first path, because I had the floppy disk drive. Since I don't have it anymore, I found an awesome tutorial which suggested to physically remove the drive from the Libretto, attach it to a 2.5" IDE to USB adaptor, and install the system from another computer. Check out his pictures for details on how to remove the drive. My machine is in a bad condition (broken hinges, cracks all over the case, stuck screws) and I had to break some plastics and metal parts to access the drive.

So, we will use another Linux computer, which you probably already have, and set up a virtual machine inside VirtualBox. Then, we will remove the Libretto's physical HDD and attach it via USB to your computer, using an adapter. The DSL CD image and the new /dev/sd will be mapped inside the VM.

This way we can boot and install from a CD, instead of doing netinsts with the Debian Woody diskettes, as you will read on many other websites. It is the fastest and painless way, and if you don't have the floppy drive, it is the only way.

If you have the floppy drive and are wondering if it is worth to buy the adapter, go ahead! Walk the difficult path, install DOS, start a Linux setup from DOS, try to make the floppy disk work, then install from diskettes with a crappy kernel, fight with the PCMCIA driver until you are able to use the network, and install from the net. And, should the installation fail, start OVER AGAIN! When this happens, please send me an email so that I can pretend that I sympathize with you but actually laugh at your misery.

Talking seriously, I am just trying to warn you. I tried that, I failed, then I succeeded, and not even in my success I want even the worst of my enemies going that path. Buy it, then come back and follow these instructions.

Removing the hard drive

You already have the adapter? Great! I bought this one which worked great and allowed me to manipulate the drive from my main computer.

The 2.5inch IDE to USB adapter

This is the adapter in its box. It comes with an enclosure that I didn't use to avoid overheating, and a handy screwdriver.

The 2.5inch IDE to USB adapter, close up

A close up of the IDE adapter. Don't buy a SATA one by mistake!

Using the drive in VirtualBox

As stated before, we will use VirtualBox to make DSL think it is running on a real machine, and that the—now USB— hard drive is the main drive of the VM. Turns out that using a physical disk from /dev on VirtualBox isn't easy to find, but the actual command is simmple.

Please make sure that your Linux has detected the USB drive as /dev/sdb before proceeding or you might lose data on the wrong disk! If in case, use Disk Utility or check dmesg.

VBoxManage internalcommands createrawvmdk -filename disk.vmdk -rawdisk /dev/sdb
                                                                       ^^^^^^^^  <-- check this

The command above will create a file named disk.vmdk, which is a short plaintext file which references to /dev/sdb. You can now add it to your VM using the normal VirtualBox Appliance Manager

Partitioning

Use your main Linux box to partition the hard drive. Disk Utility works well, but I used cfdisk.

The tutorial then notes that the last 32MB of the disk space are used for the Libretto's hardware Hibernate feature. I followed his partition table suggestions completely. Just in case his page is down, do this:

  • /dev/hda1 738.0 MB, ext2 (ext3 is slower, but more secure), mounted as /
  • /dev/hda2 40.3 MB, swap
  • A remaining free space of 37.2 MB. Don't worry if the figure is slightly higher or lower due to rounding.

Installing DSL

Now go ahead, and download the ISO image. I used the Release Candidate 4.11.rc1 and it didn't give me any problems

Set up a new VM with 24 MB of RAM, use the ISO as the CD drive, and the disk.vmdk as the hard drive. Then boot.

If everything goes well, you will be shown the desktop. Now, in order to install, I have adapted the official instructions

sudo -s
swapoff -a
mkswap /dev/hda2 ## Considering that you followed the partition scheme in the tutorial
swapon /dev/hda2
dsl-hdinstall

Follow the setup assistant from there. I chose Grub instead of LILO for the bootloader, and it worked. The network also works out of the box, so I didn't need to apply any modifications in /etc/default/pcmcia as stated in David's tutorial.

Now disconnect the USB adapter, remove the disk, put it back in the Libretto, and boot. You should be prompted with either the console login or a X desktop, depending on your setup.

Network

I have a PCMCIA 16-bit 5V 3Com Ethernet adapter and just recently acquired a wireless Orinoco Gold card, 16b 5V too, one of the few known to work with this Libretto model, albeit only in WEP-mode.

This Libretto only accepts Type II PCMCIA, so it is very difficult to find a Linux 2.4 compatible, WPA-capable wifi card. Please let me know if you managed to get WPA wifi working!

Here are some pictures, as a reference.

The 3Com card

The 3Com card, front

The 3Com card

The 3Com card, back. Note the "PC card" icon with the technical specs.

The Knoppix core of DSL detected my Ethernet card, configured it with DHCP, and it talked instantly to my home router. Woohoo, it's on the Internet! I actually didn't need to do anything, compared to the hell I suffered with the Debian setup some years ago.

Wireless

The Orinoco card

The Orinoco card

Again, thanks to the Knoppix core, the Libretto automatically detected the PCMCIA card, loaded the orinoco kernel module, and the card was ready to use.

First, prepare your wireless router to work with WEP. It is highly discouraged to do so, because it is a big security hole. Fortunately I had a spare router that I can use only for the Libretto and will turn it off after playing with it.

My recommended setup for the router is:

  • Hide the ESSID
  • Filter by MAC address
  • Use 802.11b with auto channel
  • Use a 128-bit ASCII WEP key

I tuned /opt/eth0.sh to run the iwconfig commands. Add this just below the #!/bin/bash line:

iwconfig eth0 essid ESSID_NAME
iwconfig eth0 key open s:WEPKEY
iwconfig eth0 mode managed
sleep 1

If you WEP key is hex and not ASCII, omit the s: part before it.

Wait for a few seconds, and when iwconfig reports a correct Access Point, you're on the internet. Congratulations!

Since the 50CT has very low specs, Firefox starts swapping like crazy. The best commandline browser is links2 and I recommend dillo if you run X.

Look ma, no cables!

Look ma, no cables!

Sound

This other tutorial points out some tricks to use all of the Libretto's capabilities. I didn't try most of them, but since I couldn't play any music, I went ahead and probed the opl3sa2 driver. At first, it didn't work, because the I/O parameters on my card weren't the same than on that page.

The BIOS of the Libretto

This is my main BIOS configuration

The BIOS of the Libretto, audio section

A detail of the audio section. From top to bottom, the values correspond to the following module parameters

  • mss_io
  • not used
  • not used
  • irq
  • dma
  • dma2
  • io
  • mpu_io

This means that we will load the module with the following parameters. Remember to check your BIOS and use the correct ones, or modprobe will fail

modprobe opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=7 dma=1 dma2=0

Note: to access the Libretto BIOS, reboot or reset it, and press <ESC> during or just after the memory check

Finally, the Pentium 75 CPU is able to play most mp3 files, but you will need to compile your own mpg123. DSL comes with mpg321, but the audio isn't fluid and for some reason only mpg123 is able to decode mp3 in realtime. Running it from a console instead of an X session also helps, though the main bottleneck is the CPU, not the RAM

ACPI/APM/Battery

I only managed to get APM working. Playing with the Grub boot options there is no way to enable ACPI.

This blog post has some pointers on how to install the Toshiba experimental ACPI driver, but as I didn't want to recompile the kernel, I couldn't use it. If you feel strong enough, use the same Virtual Machine that you used for the DSL install and recompile it there, with the power of a current computer.

The toshiba kernel module loads correctly (/proc/toshiba), but not toshiba_acpi (/dev/toshiba). Not a big deal for me, but if you managed to get it working without recompiling the Knoppix kernel, please let me know.

The Libretto does some power management by hardware (screen blanking, hibernation), and this is enough for me. However, to get the system to actually power off after a shutdown, edit the /boot/grub/menu.lst and change the parameter noapm to apm=on apm=power-off

torsmo, DSL's dashboard, usually manages to get my battery status, but I didn't investigate further.

Performance tricks

Here are some generic tips on how to save some RAM and CPU cycles

  • Enable DMA - For some reason, DSL disables DMA by default. To enable it, edit the Grub config file /boot/grub/menu.lst and change the boot parameter nodma for dma. You will then see a boot message saying that DMA has been enabled for /dev/hda
  • Disable ttys - Edit /etc/inittab and disable all consoles but one. Instead, run a GNU screen session to get terminal multiplexing.
  • No X - Disable the automatic X session that is launched on login. You might need to edit the .bashrc or the .bash_profile files. Comment out the startx command.
  • GNU tools - With those bytes we saved, use the DSL menu option "Upgrade to GNU tools" to replace the very basic BusyBox shell with the regular GNU tools.
  • Fix the date - Use MyDSL to install ntpdate and run it when coming back from hibernation, since the date will probably be incorrect: ntpdate ntp.apple.com

Currently my setup takes the following resources:

  • Used memory with X running: 10 MB
  • Used memory without X running: 3 MB
  • Used disk space: 290 MB

Not bad, right? 3 MB of RAM on boot and a full functioning X taking only 7 MB more. That leaves a whooping 14 MB for applications!

As the pointing device is not that great, I usually run a single tty with a screen session for terminal multiplexing, and do most of my work on the terminal. X is only needed for viewing PDFs or images, and that's a perfectly suitable task for that computer.

Final words

I find it amazing that a laptop from early 2001 can still hold about an hour of battery, its drive is still spinning, and that it overall works. DSL gave it a new life, and though it is tedious to use a cable or WEP to connect to the internet, it is a functioning UNIX system, with audio and a decent mobile typewriter. Yes, the keyboard is small and uncomfortable, but this thing fits in any bag. Why, by 1990s standards, it would "fit in your pocket"!

There is plenty of information out there on installing Linux on a Libretto, but at the time of writing this article, most of articles are about 7-10 years old. I hope that it can be useful for somebody who, like me, found this machine at the bottom of a drawer and might want to play with it a little, install a current Linux and maybe give it to your kids or use it as a second laptop.

I wouldn't use it as a server, since it has little memory to run a server daemon, the disk and fan are noisy, and keeping it on 24/7 would burn the machine. If you want a cheap server, go for an old Mac Mini and install the latest Debian there. The Libretto is a ultra portable laptop and, if yours still holds some battery charge, is a nice toy to write stuff on or browse the simple internet.

DSL is highly customizable, and there is plenty of documentation out there. The default software is great, and searching the net you will find current software which is suitable for low memory devices. You will find yourself with a machine capable of reading and writing emails, displaying images, playing music, and more.

The only sites it can't browse are those which use Flash or are heavy on JavaScript. Well, the modern web, Gmail, Facebook, Twitter... but if you try to use the mobile versions you might get a nice surprise. You can try to use the Firefox version bundled in DSL but I wouldn't recommend that, it's too slow.

Feel free to contact me if there is any mistake on the tutorial or if you have some contribution, for example, a command to make it run with WPA, or if you managed to make the ACPI work.

The Libretto running X

The Libretto running an X session

Originally published on Github in 2013

Tags: retro, hardware, unix

Comments? Tweet