For GOG on Linux, use Minigalaxy

For other Linux gamers wishing GOG Galaxy had a client for Linux, there’s an open source project that provides most of the critical features, namely easy download install and updating. It’s called Minigalaxy and available for most distros.

It even allows you to install Windows-only games via Wine, and assuming you have DXVK configured for your Wine instance, I’ve found many games play reasonably well out of the box.

To install it on Fedora, simply enter: sudo dnf install minigalaxy
Then launch it, enter your account credentials, and you’re ready to go.

Find it on GitHub here: https://github.com/sharkwouter/minigalaxy

Enabling amdgpu on Fedora 31 for using Vulkan with R7 and R9 Radeon cards

For the AMD Radeon R9 390, Fedora will, by default, use the open source driver ‘radeon’ – which is generally sufficient for average workloads, but if you want to game, or want to use Vulkan, you probably want the AMD-written open source driver ‘amdgpu’. It is not just a matter of installing the driver, and some extra configuration will be required to utilize this driver for graphics cards in the Southern Islands and Sea Islands family of AMD cards, since support for these models is considered experimental.

The solution also varies depending on whether your card is Southern Islands or Sea Islands.

Card FamilyModelsModule Parameter
Southern IslandsHD7750-HD7970, R9 270, R9 280, R9 370X, R7 240, R7 250amdgpu.si_support=1
Sea IslandsHD7790, R7 260, R9 290, R7 360, R9 390amdgpu.cik_support=1

First, determine which kernel driver is currently in use: lspci -k | grep -EA3 'VGA|3D|Display'

If your Kernel driver in use result says amdgpu you’re working, there’s nothing for you to do except install Vulkan (if that’s your goal). If your result says radeon, read on.

  1. Install the amdgpu driver, along with Vulkan (both x64 and x86): sudo dnf install xorg-x11-drv-amdgpu mesa-vulkan-drivers.x86_64 mesa-vulkan-drivers.i686 vulkan-loader.x86_64 vulkan-loader.i686 vulkan-tools
  2. If you plan to use Vulkan with Wine: sudo dnf install wine-dvxk.x86_64 wine-dvxk.i686
  3. The GRUB Bootloader needs to be modified to (a) disable the ‘radeon’ driver for your card and (b) enable the module parameter for amdgpu. Edit /etc/default/grub append one of the following inside the quotes on the GRUB_CMDLINE_LINUX line:
    • For Southern Island cards: radeon.si_support=0 amdgpu.si_support=1
    • For Sea Island cards: radeon.cik_support=0 amdgpu.cik_support=1
  4. Build the GRUB config:
    • For EFI systems: sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
    • For BIOS systems: sudo grub2-mkconfig -o /boot/grub2/grub.cfg
  5. Reboot.

If everything went according to plan, after reboot you should be able to login and run vulkaninfo without errors. Now you can install Lutris, use Proton on Steam, or do any of the other things that Vulkan allows.
If your GUI doesn’t load after reboot, you can restore your machine back to the previous configuration by pressing CTRL+ALT+F2, logging in, editing /etc/default/grub to remove the added text, and running grub2-mkconfig like before.

These instructions are intended for Fedora Linux, but with some minor modification to the grub2-mkconfig command, and substituting your package manager for dnf, you can probably adapt them to other Linux distributions.

For additional information, refer to the Arch or Gentoo wikis.

How to block a DNF package update on Fedora

You know the new version of a package is a buggy mess and you don’t want to update, or you manually install an rpm that exists in the repos but you really want to keep the version you installed. There’s an easy way to do that!

Edit (as root) /etc/dnf/dnf.conf and add this line:

exclude = packagename1
exclude = packagename2

Save it. The next time DNF updates, your package won’t be updated! This will work with any distribution that uses DNF (Mageia, future versions of CentOS).

Neverwinter Nights Enhanced Edition produces black screen on Linux

I decided I wanted to start playing the new release of the classic game Neverwinter Nights, on my Chromebook using my Ubuntu Linux chroot. My download comes from GOG. While my install worked great on my Windows desktop and Fedora laptop, the game isn’t starting on my Chromebook. It just produces a black screen instead of the game’s main menu.

Another Beamdog re-release, Baldur’s Gate, works great on here. The solution for NWN should be pretty simple: turn off full screen mode. But how can you do that without entering the game?!

Easy:

  • Navigate to /home/<your user>/.local/share/Neverwinter Nights
  • Edit nwn.ini
  • Change the following:
FullScreen=0
FullScreenDesktopMode=1
Borderless=1

You’re done! The game won’t run in true full screen, but it will be a full-screen borderless window.

Possible missing firmware for module tg3

When recently updating my Debian 9 Stretch’s boot image, it produced the following warning:

W: Possible missing firmware /lib/firmware/tigon/tg3_tso5.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3_tso.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3.bin for module tg3

That doesn’t look good! Without this module, I suspect my network card will not work after reboot. What’s needed is the package firmware-linux-nonfree but it’s not available in the standard Debian free repos – you need the nonfree repo.

Edit your /etc/apt/sources.list and add the following:

deb http://ftp.de.debian.org/debian stretch main non-free

You can install firmware-linux-nonfree with apt-get, which will allow your adapter requiring the tg3 module to continue working.

Have root send as a different address using postfix

If you have scripts or other services that run as root that need to send to outside email addresses, via postfix, without being root@hostname, this is what you need to do:

    1.  sudo vi /etc/postfix/generic

      root name@tld.com

    2. sudo vi /etc/postfix/main.cf

      smtp_generic_maps = hash:/etc/postfix/generic

    3. sudo postmap /etc/postfix/generic
    4. sudo systemctl restart postfix

Done! Now root will send as name@tld.com instead. Substitute whatever you want for name@tld.com

Error Upgrading Fedora 27 to Fedora 28 with Cinnamon desktop

When attempting to upgrade my Fedora 27 to Fedora 28 running the Cinnamon desktop, I received the following error:

dnf system-upgrade download --releasever=28
Before you continue ensure that your system is fully upgraded by running "dnf --refresh upgrade". Do you want to continue [y/N]: y
Last metadata expiration check: 0:00:00 ago on Wed 02 May 2018 11:19:35 PM CDT.
Error:
Problem: package gstreamer1-plugins-bad-1:1.12.4-3.fc27.x86_64 requires libchromaprint.so.0()(64bit), but none of the providers can be installed
- libchromaprint-1.2-8.fc27.x86_64 does not belong to a distupgrade repository
- problem with installed package gstreamer1-plugins-bad-1:1.12.4-3.fc27.x86_64

It turns out the name for this gstreamer plugins package has changed names, and it’s goofing up the dependencies path for libchromaprint. Minor issue, but it stops my upgrade cold.

I came up with this workaround: upgrade libchromaprint and gstreamer1-plugins-bad-free before trying to update the entire distro. So:

sudo dnf install libchromaprint-1.4.2-2.fc28.x86_64 gstreamer1-plugins-bad-free --releasever=28 --allowerasing

You can now proceed with your regular upgrade process.

VLC missing title bar and window decorations on Fedora 27

Recently, VLC Media Player on my Fedora 27 installation running the Cinnamon desktop has been missing the title bar and window decorations, resulting in VLC not being a proper window and only a full-screen application. For me, this behavior is undesirable.

VLC without title bar

To restore normal functionality it’s easiest to simply delete the VLC configuration:

rm -r ~/.config/vlc

Now, VLC will function normally. Preferences will have to be recreated, but if you’re like me, you don’t need much more than the ability to play media.

x11vnc – stack smashing detected

My x11vnc on Fedora has recently started crashing with the following error:

*** stack smashing detected ***: terminated

This issue seems to come and go for a lot of people with x11vnc. Bugs have been reported, but nobody seems to be able to pin it down. One workaround is to recompile it from source with some memory protections disabled, but that is a lot of work .

This workaround takes care of it: launch x11vnc with  -noxrecord on the end. That’s it!

Crouton and Steam on a Chromebook Setup Guide

Update: I recently updated this walkthrough for Ubuntu Xenial instead of Trusty because that’s what I’m using now.

Update #2: A Chrome security update necessitates running a command on the Crouton script before running it the first time.

You might think that ChromeOS cannot run games that aren’t browser-based, and by itself you would not be wrong. But, with Developer Mode, a script called Crouton developed by a Google employee in his off-time, and a bit of effort, you can have a low-end laptop that runs both ChromeOS and an Ubuntu Linux desktop at the same time – without dual-booting. The way this works is that your device is always using ChromeOS’s Linux kernel, but you’re running a chroot (essentially a fake root file system) that contains everything needed to run software from Ubuntu.

This should be possible on any Intel-based Chromebook. On my Acer R11 CB5-132T-C1LK with an Intel Celeron N3150, 4GB RAM, 32GB Flash storage, I can smoothly play:

  •  Crusader Kings II
  •  Gemini Rue
  •  Papers, Please
  •  Pillars of Eternity
  •  Tyranny
    I haven’t tried anything twitchy, but I would assume only older titles will perform well. The newer (and cheaper) model of the Acer R11 has an Intel Celeron N3160 with Intel HD Graphics 400, making for a cheap, fast, long battery, netbook-like device that can still play games on the lower end of the spectrum.

Getting Started: Developer Mode

Note that Developer Mode completely wipes your Chromebook, so back up any files to Google Drive or elsewhere before getting started.

  1. Power your Chromebook off. Then press and hold ESC+Refresh+Power until you get a screen that says ChromeOS is missing.
  2. Press CTRL+D. Then press Enter. This turns OS verification off.
  3. The next screen will say that OS verification is off. You will see this screen every time you boot your Chromebook in Developer Mode. If you are concerned that another person will press the Spacebar and then Enter and destroy your little experiment, press the left arrow key a few times to change the language on this screen to something like Korean – this change will be saved for future boot-ups. Now only you will know how to boot your Chromebook and there won’t be instructions on the screen. To restore your Chromebook, all you need to do is press Spacebar then Enter on this screen.

Setting up Crouton

  1. Install the Crouton chrome extension. This lets you share a clipboard between ChromeOS/Linux and open URLs in Chrome.
  2. Go to this page and click the goo.gl link toward the top to download Crouton. Do not ever delete this file from your Chromebook’s Downloads directory and do not overwrite it. I’ll show you how to update it below.
  3. Press CTRL+ALT+T to open a terminal window. Type shell and press Enter.
  4. Type this command to bypass ChromeOS’s security lockdown on the Crouton file:

    sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton

  5. Type in the following command to install Ubuntu Xenial with some Crouton targets (sort of like parameters):

    sudo crouton -r xenial -t xfce,keyboard,touch,extension

This will install the XFCE desktop environment, which is very lightweight. The ‘touch’ target is for if your Chromebook has a touchscreen – if yours doesn’t, omit this target. The ‘extension’ targets allows Ubuntu to talk to that Chrome extension you installed in step 1. The ‘keyboard’ target lets you use the Chromebook’s function keys – you will have to press the Search key before pressing VolUp/VolDown/BrightUp/BrightDown keys. I had some trouble getting audio while in the chroot, so I added the ‘audio’ target after the fact in my setup.

If you have a beefier Chromebook, you could use Gnome or Unity instead of XFCE, but because you’re wanting to game, the desktop environment with the lowest memory overhead would be best, and that’s XFCE.

Here is a Cheat Sheet of Crouton commands, which includes adding targets to existing chroots, backing up your chroot, and updating Crouton. Bookmark this!

Linux aficionados might ask why I recommend Ubuntu – because it’s the most commonly used and widely supported in the Crouton community, and because game developers primarily seem to target Ubuntu for Linux game development. Personally, I prefer Fedora on my Thinkpad, but I use Ubuntu on my Chromebook. You might also wonder why I don’t recommend xiwi (X in a Window) instead of having the full overhead of a XFCE environment: game performance in xiwi is absolute crap. Only Papers, Please and Gemini Rue were playable in xiwi.

The Ubuntu installation can take a long time, depending on your Internet connection.

Starting Crouton and installing Steam

  1. Once your chroot is set up, from the terminal tab type in: sudo startxfce4
    You will need to type this into a terminal tab each time you want to enter Ubuntu!!!!
  2. Congratulations, you’re in Ubuntu! To switch back to ChromeOS, press CTRL+ALT+Forward on your keyboard. You can use this to switch back and forth from Ubuntu to ChromeOS.
  3. Disable the screensaver in XFCE. It can cause graphical glitches and resume problems.
  4. Download TrueType fonts by entering into Xterm: sudo apt-get install ttf-ubuntu-font-family
  5. Update Ubuntu’s software: sudo apt-get update && sudo apt-get upgrade
  6. Install some basic tools (text editor, archive manager): sudo apt-get install file-roller gedit
  7. (Optional) Install VLC media player: sudo apt-get install vlc browser-plugin-vlc
  8. And Finally, install Steam:

 wget http://media.steampowered.com/client/installer/steam.deb

sudo apt-get install gdebi-core

sudo gdebi steam.deb

If you’re a Linux regular, you can also install games from .deb files, compile from source, or install Wine and run Windows executables, but I won’t cover that here because other guides on how to do this in Linux will cover it better.

Updating Crouton

You should update Crouton after each ChromeOS update. Since I’ve been using it, I’ve never had a ChromeOS update actually cause a problem with running Crouton, but it might and it’s best to keep it up to date. Because the developer essentially builds this on his free time, it might take a couple of days for an update to come out after a ChromeOS update with major changes. To update both Crouton and your chroot:

 sudo crouton -u -n chrootname

Adding Additional Storage

Most other guides don’t cover this, but I find it critical to running Steam games on a Chromebook. Your chroot environment is taking up a fair amount of space on your Chromebook’s internal storage, so you’re probably going to want to install your Steam games to an SD card. I’m using a 64GB SDXC UHS Speed Class-1 card and it performs fairly well, and was only about $25. Before you can add the SD card as a Library Folder in Steam, however, there are some hoops to jump through because ChromeOS does not mount SD cards in executable mode – so you can’t run games off of them.

  1. Insert your SD card and make sure it’s a format that ChromeOS can write files to. Format it if necessary.
    2. Eject the SD card from ChromeOS, but leave it in the slot. Enter Crouton.
    3. On the desktop, find the see-through icon for your SD card (they should be listed by size), double-click it to mount it. Open the SD card and make note of the mount location in the address bar. It should be something like: /media/[linuxusername]/[letters and numbers]
    4. Open an Xterm window and type: mount
    5. Find your SD card in the listing there by looking for the Device ID and where it mounts. The line looks like something like this:
    “/dev/mmcblk1p1 on /media/[your username]/[sequence of letters-and-numbers]”
    You want both the /dev/ information and the /media text!
    6. Back on the desktop, right-click it and Dismount
    7. Back in the Xterm window, type: vi mountsdcard
    8. Press the letter ‘i’ on your keyboard, modify the following to match your variables from above, and write it into the file:

sudo mkdir /media/[linuxusername]/[letters and numbers]

sudo mount -o rw,nosuid,nodev,relatime,seclabel,data=ordered,uhelper=udisks2 /dev/[deviceid] /media/[linuxusername]/[letters and numbers]

  1. Press Esc. Press : and enter: wq
  2. Enter into the terminal window: chmod +x mountsdcard
  3. To mount your SD card, enter: sudo ./mountsdcard

So, to recap, the process you need to follow every time –  before launching Steam needs to be:

  • Dismount the SD card from ChromeOS
  • Press CTRL+ALT+T to open a terminal tab.
  • Enter: shell
  • Enter: sudo startxfce4
  • Open Xterm and enter: sudo ./mountsdcard
  • Open Steam.

From this point, you can create a Steam Library Folder on the SD card and install your games. Once you’re done playing your game, log out of Crouton and physically eject and re-insert your SD card to see it again in ChromeOS. If your Chromebook goes to sleep, it will dismount your card, so do not allow your Chromebook to go to sleep while Steam is running or otherwise you will have to close Steam, Dismount, run mountsdcard, and possibly re-add your Library Folders.

Please refer to the Crouton Command Cheat Sheet to learn how to backup your chroot. Backing up from time to time can save you if an update breaks something, but I’ve been running my chroot since December without a backup and haven’t had any trouble.

If you want help with your specific situation and setup, you can ask me here and I can try to help you, or you can ask the collective minds at the Crouton subreddit – they will probably be able to help with more complex questions than just me.