# Home entertainment centre

These notes are for software, services, and general setup related to a home entertainment centre: a computer for TV, movies, and games. Computer hardware notes are written down separately.

## General issues

Common practices of legal use of entertainment-related software and media can be very appalling after a long-term avoidance of those: I went into it expecting to pay for restricted (legally and technically) software and such, but was still surprised to find how (and to what extent) it is restricted and abuses users by 2020: DRM, data harvesting, severe restrictions, and rather scammy tactics are included most of the time.

## Operating system

Much of the common entertainment software (major computer games in particular) is developed for MS Windows only. It's very restrictive, but at least Windows 10's standard (i.e., not pirated) distribution can be used without paying about $140 to Microsoft, though it would demonstrate an "Activate Windows" watermark in a corner, on top of games and videos. I think it's okay to live with that for Windows-only games and software (if one plans to stick to legally obtained software only), but rebooting into a GNU/Linux system for activities that are not tied to MS Windows.

I had to use an old Windows machine to prepare an USB stick with an installer using the MS media creation tool, since I wasn't able to find or pick a combination of formatting parameters that would make Windows happy. In some cases I tried to follow instructions exactly, but they've usually involved awful tools such as GNOME Disks, which are similar to Windows's built-in tools: unless a stick was nicely formatted with those tools in the first place, they'd fail with non-informative errors on future attempts to work with those (although MS Windows in some cases wouldn't even show them, not sure how one is supposed to format them from Windows then; I had to format it with MBR and FAT32 in fdisk for Disks and Windows to be able to even reformat it). Those instructions didn't work anyway. Here is how it should look like, as created with the MS media creation tool and shown in fdisk:

    Disk /dev/sde: 31.0 GB, 30992891904 bytes, 60532992 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0x00000000

       Device Boot      Start         End      Blocks   Id  System
    /dev/sde1   *        2048    60532735    30265344    c  W95 FAT32 (LBA)

Apparently just copying files from an MS Windows 10 ISO image should work then.

Then there are drivers: RX 5700 XT's seem to lead to VIDEO SCHEDULER INTERNAL ERROR on Windows occasionally, especially on AMD-only systems (possibly was fixed at some point). Apparently after some update in January of 2021 mouse drivers ceased to work (mentioning "driver error" and code 19, mice and touchpads not working), Windows Recovery with rolling back to the 7th of January helped (though the Thunderbird executable disappeared after that, and I had to reinstall it). Generally it's not as reliable and polished as one may imagine while dealing with similar issues on GNU/Linux (those are usually attributed to lack of support by hardware manufacturers, which shouldn't be the case with Windows on a gaming computer with common hardware and no customisations).

While font size can be increased in Windows settings (to make it legible from a sofa), even built-in software doesn't always respect it, and when it does, texts don't fit into boxes.

## Other software

Pretty much everything on Windows, excluding explicit malware, seems to be paid and proprietary, adware and proprietary, broken, or a combination of those. Cross-platform software usually falls into the "broken" bucket. Apparently it's a good idea to just avoid setting any new software there whenever possible.

## Secondary operating system

I decided to go with Debian 10, but the usual expected pain points (Wi-Fi and graphics) are still there in the beginning of 2020. Unofficial Debian images contain non-free firmware, which allows to work with Wi-Fi (with Intel Wireless-AC 9260 in my case; see also: the Intel's "Linux* Support for Intel® Wireless Adapters" page), so I've installed it (with partitioning an empty SSD as follows: ESP, 400 MB for /boot, 200 GB for encrypted ext4 root partition, the rest left for NTFS; this is supposed to be just a small system, which I probably won't use much), and after installation it was only slightly painful to configure Wi-Fi (with `wpa_supplicant`, via `/etc/network/interfaces`). Then I tried to get a graphical desktop environment, `xfce4` this time, but `lightdm` kept writing strange errors into logs; so did `slim`, and even `xdm`. At that point I decided to check X log, which complained about `/dev/dri/card0` not existing, and a brief search suggested that the RX 5700 XT graphics card is not supported in Debian stable (not sure about "testing") yet.

About a year later I've upgraded it to "testing" (bullseye), which had the needed AMD drivers in the kernel, though as it turned out, not all the packages were upgraded (Xorg log messages pointed at mismatching ABI versions), and even `apt full-upgrade` complained about unmet dependencies. At that point I decided to install aptitude, the installation upgraded some packages, then `apt upgrade` upgraded more packages, and Xorg server finally worked. As the AMDGPU ArchWiki article suggests, screen tearing can be fixed by adding the following `/etc/X11/xorg.conf.d/20-amdgpu.conf`:

    Section "Device"
         Identifier "AMD"
         Driver "amdgpu"
         Option "TearFree" "true"
    EndSection

## Videos

Analog television used to be broadcast and to require a TV tuner; digital television (DVB-T and related standards) replaced it, complete with DRM, and still requiring specialised hardware (a TV tuner); over-the-top media services (such as Netflix, Hulu, YouTube TV: subscriptions to access online video archives) are much more convenient and make more sense to use with Internet availability, and seem to be replacing regular programmed television. It is even more suitable for a setup with a gaming computer.

As a side note, I tried the Geniatech T230C2 (T230C v2) USB TV tuner on Debian: while the drivers are present in kernel 6.x, they do not seem to work without firmware (`dvb-tuner-si2141-a10-01.fw` and `dvb-demod-si2168-d60-01.fw`), whith I grabbed from dvb-firmware-osmc and placed into `/lib/firmware/`; then managed to watch channels with VLC, and to scan those with `w_scan_cpp`, after finding an appropriate place for the antenna, even though it still complained about missing `dvb_driver_si2141_rom61.fw`. Would be even better if there were any decent channels around here.

There are software projects such as Kodi to provide an unified and suitable for a "TV" interface to various video sources, but apparently it's not quite usable with a legal subscription to, say, Netflix: I hear that there are plugins working with services with pirated content that make Netflix shows available over standard protocols, but Netflix itself seems to make it rather hard. OTT service providers tend to provide small computers loaded with their software/malware and DRM instead, and to support playback in web browsers as an alternative (well, apparently only Google Chrome or Microsoft Edge with their specific DRMs for a relatively high quality). Amusingly, there's even "cloud DVR", to mimic obsolete systems even closer.

Another issue with OTT is fragmentation: there's more and more services like that, and multiple subscriptions can get quite expensive. Getting an unified UI is further complicated by that as well. See also: an HN discussion on OTT services. And even with multiple subscriptions it's often impossible to find a certain film you are interested in.

Generally a subscription to access a video archive seems to be the nicest option (again, assuming legally obtained and commercial content), but just as "smart TVs", they also try to shove some malware (and even unnecessary hardware) along with it, while the quality, the choice, and the ease of use are considerably worse than with pirated content.

Freemium and adware shows also exist, with Geek & Sundry ones being a nice example.

## Music

While not specific to an entertainment centre, it fits the overall topic of this note. The situation is generally similar to that with video, but bandcamp.com is a seemingly decent music store, and a directory of Icecast-powered Internet radios is available at dir.xiph.org.

## Computer games

Many computer games are proprietary and require MS Windows. On the bright side, video cards are likely to work with it. There are gog.com (with DRM-free games), steampowered.com (though some games from it, GTA V for instance, would still require registering on additional services, solving additional captchas, and agreeing to additional licenses in order to play after a purchase, and a connection to those services to run even in a single-player mode; using pirated proprietary software may be more convenient, but I'm trying to avoid it for now), EA/Origin, and a few other stores. It may be inconvenient to use multiple ones (once again, no unified UI, custom clients, different payment methods, launchers of launchers), but games are often available exclusively in certain stores. Payments are generally per-game (though there are subscription models too, particularly for access to older games, and now there's that thing where games milk kids for in-game purchases, including in-game casinos and such). Another thing to keep in mind is that even though Steam itself has "family sharing" functionality (allowing others to play games when you're not playing them), the game licenses and DRMs themselves would require buying a game for each user separately.

Despite all the unpleasant bits, it is fun to explore games after a long break. A couple of things I didn't consider were that games grew much larger (GTA V takes 80+ GiB), so one should aim a lot of disk space, and it's better to begin with exploring games that don't focus on acquiring a useless skill (which can be enjoyable, but I didn't quite like the idea of it even before the long break from games, and it's not much of an exploration if you play the same 30 seconds of a game over and over for hours, then kill a boss, then play another 30 seconds of it over and over, as it happened to me with Dark Souls 3).

After a few months, I found myself mostly avoiding Steam and sticking with GOG, which is generally quite nice (at least as a proprietary software store can be). While Steam/Valve, in addition to selling DRMed games, appears to be careless with software vulnerabilities (at least according to vice.com, which in turn seems to be careless about fact checking and reporting, though the corresponding HN thread includes links to supposedly a bunch of other RCE vulnerabilities in the same game).

The libre and GNU/Linux games are available as well, as they always are, and there is a choice of nice and enjoyable ones available directly from Debian repositories, see Debian Games Packages. But they are also available (and usually run fine) on a regular workstation or laptops, not necessarily on a dedicated gaming computer. Some of the games worth looking into are SuperTuxKart, SuperTux, Wesnoth, Hedgewars, 0ad, Flare, Lincity-ng, Widelands, Freeciv, OpenTTD, OpenMW. Plenty of smaller ones, like pacman, moon lander, pinball. And all sorts of board, card games, textual interactive fiction, puzzles.