Skip to content

Instantly share code, notes, and snippets.

@Iron-Wolf
Last active September 2, 2023 09:48
Show Gist options
  • Save Iron-Wolf/afc9e5f6bbd1e5bf735781315882cb8e to your computer and use it in GitHub Desktop.
Save Iron-Wolf/afc9e5f6bbd1e5bf735781315882cb8e to your computer and use it in GitHub Desktop.
Ressource used to configure Debian based system on a Intel/AMD build

⛔️ This Gist is no longer maintained ⛔
There is now to much old/mixed stuff, which makes it impractical to read/use.
I keep it for reference, but expect it to be delete at some point.

Table of contents

Part 1 : Debian Sid

⚠️ Warning ⚠️
if you dual boot with Windows, check the EFI configuration.
If Windows is installed in EFI mode, you must install the GNU/Linux distro in EFI mode.
source
Make sure to also disable in your BIOS : Fast Boot / Secure Boot / CSM

This part is outdated (since feb 2018)

1.1 - Configure System

Linux FR

Install with LiveUSB

Download

Switch to unstable (SID)

Change the etc/apt/source.list file with :

deb http://ftp.fr.debian.org/debian/ sid main contrib non-free
deb-src http://ftp.fr.debian.org/debian/ sid main contrib non-free

Then, simply update the system with apt update/upgrade and apt dist-upgrade.

1.2 - AMDGPU drivers

Blog post
Debian Wiki
infos for Ubuntu

Install binary firmware

apt install firmware-linux

Install LLVM

apt install llvm-3.9 clang-3.9 # force the installation of the 3.9 or 4.0 packages

1.3 - Kernel 4.15 (finally in unstable repo)

4.15 News
4.17 News

Build ans install the Kernel

  • needs at least 20Go of free space (consider 25Go to be safe)

French tuto
Blog post

Requirements

Install the tools

apt install git build-essential libncurses5-dev xz-utils libelf-dev bc

Get the Kernel

wget http://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.15.tar.gz

Build and install

Copy the curent kernel config file

cp /boot/config-$(uname -r) .config

Start building

make clean;
make deb-pkg;

Install with

dpkg -i

Configure Grub2

askubuntu

Add amdgpu.dc=1 boot parameter to the /etc/default/grub file, at the end of the GRUB_CMDLINE_LINUX_DEFAULT variable.
Update grub's config with update-grub.
This feature is enabled by default in the 4.17 Kernel.

Part 2 : Look & Customization

Add PPA repo in Debian

See this link.

Example with Numix icons

Edit /etc/apt/source.list :

deb http://ppa.launchpad.net/numix/ppa/ubuntu zesty main
deb-src http://ppa.launchpad.net/numix/ppa/ubuntu zesty main

Add the numix public GPG key :

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0F164EEB

Then, udpate packages with apt update and install numix-icon-theme-circle.

Gnome monitor applet (not working in Shell 3.26)

Equivalent applet to indicator multiload on Ubuntu.
Install required dependencies (see Github repo).
Install the extension from Gnome repo.

Other usefull extensions

Case of Ubuntu

Ubuntu came with preinstalled extensions used as placeholder and supposed to be replaced after the installation of the given extension. But that's not working and it's break Gnome behavior. To fix this, just remove the extensions folders in /usr/share/gnome-shell/extensions/.

Change cursor (link)

Download cursor theme from Gnome Look or other sources (Breeze).
Untar it in /usr/share/icons.
Edit the file /usr/share/icons/default/index.theme :

[Icon Theme]
Inherits=<folder name>

In Gnome Tweak Tool, change the cursor theme.
Then reboot.

Change GTK theme

Download GTK theme and install required dependencies (Vimix).
Untar the theme in /usr/share/themes.
Change theme with Gnome Tweak Tool.

Change Grub theme

Download grub theme from Gnome Look or other sources (Vimix).
Untar the theme in /boot/grub/themes.
Add the grub parameter in /etc/default/grub :
GRUB_THEME="/boot/grub/themes/Vimix/theme.txt"
Update grub's config with update-grub.

Gradient themes & icons

Spice up your desktop with these projects :
Theme : Sweet
Icons : Candy
Folder : OieOxy
Firefox : Gradientus

Special trick with folder icons :
First, select it for your icons settings.
Then, since this pack doesn't contains app icons, you can configure the icon theme you want, by modifying the index.theme file. Simply specify the icon theme at the start of the Inherits variable.

Custom prompt for the Termial

Install Oh-my-Posh :

wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
chmod +x /usr/local/bin/oh-my-posh

Intall themes.
Add this line in your .bashrc :

eval "$(posh-linux-amd64 --init --shell bash --config ~/.poshthemes/agnoster.omp.json)"

Install a Monospace Nerd Font (should be in the ~/.local/share/fonts/).
Rebuild cache if you don't see it : fc-cache -fv

Part 3 : Apps

Firefox for Debian SID

apt install -t sid firefox

Firefox DEB on Ubuntu 22.04+

Source (Fr) : https://www.linuxtricks.fr/wiki/ubuntu-installer-firefox-en-deb-plutot-que-snap

Steam (link)

Download and install steam deb package, witg dpkg -i (Steam will prompt you if you have missing package).
Resolve dependencies with apt-get -f install or apt --fix-broken install.
Steam is a 32-bit app, so we need some 32-bit libraries : dpkg --add-architecture i386; apt-get update; apt-get install libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libc6:i386

Launch Steam.

⚠️ Warning ⚠️
It's really encouraged to install your game on a Linux file system (like Ext4).
Proton/Wine can use some Windows reserved character in the path, and this does not perform well when running the game.

If getting these errors :

libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing 
libGL error: failed to load driver: radeonsi 
libGL error: unable to load driver: radeonsi_dri.so 
libGL error: driver pointer missing 
libGL error: failed to load driver: radeonsi 
libGL error: unable to load driver: swrast_dri.so 
libGL error: failed to load driver: swrast

Try to run this fix : find ~/.steam/steam/ubuntu12_32/steam-runtime \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" -o -name "libgpg-error.so*" \) -print -delete

Remote play config

Save yourself some time and disable a remote play setting, to fix a black screen issue in a game (Heave Ho).
Go to Settings | Remote Play | Advanced Client Options and disable (uncheck) hardware decoding.

Proton debug log

You can track down some info by launching the game with : PROTON_LOG=1 %command%
It will dump a useful debug log to $HOME/steam-$APPID.log
The APPID can be used to delete the Proton environment for a game, located in …steam/steamapps/compatdata (usefull if the game doesn't launch and you have tried everything).

Kill all steam process

When Steam is freezing like hell, you can kill all the process with pkill -9 steam.
This does not remove hanging executables (you still have to kill them with their PID).

Lutris

To fully unlock lutris potential, check the requirement on the wiki.
Don't forget to add 32-bit and 64-bit version of the Vulkan drivers.

Yuzu

Tweaks I had to do to play :

  • error VK_ERROR_OUT_OF_DEVICE_MEMORY :
    • Go to Emulation > Configure... > System > Core > Memory Layout
    • Set it to 8GB
  • error Unhandled SIGSEGV at rip 0x00... :
    • Go to Emulation > Configure... > General > Debug > Advanced and check Enable CPU Debugging
    • In the CPU tab, uncheck the two Host MMU options
  • Leave the GPU Accuracy Level to high

Decoupling VLC and system volume (for PulseAudio)

set flat-volumes = no in /etc/pulse/daemon.conf to enable per-application volume control.

Fix sound in Java (PipeWire)

To see if you run pipewire, use : pactl info.
There is a bug in Java that prevent it from using PipeWire.
Open (or create) the file /etc/openal/alsoft.conf.
Add/change this line : drivers = alsa.

Increase mic volume

  • install pavucontrol
  • run it and go in the input tab
  • Unlock the sliders of the mic and drag the right one to zero (the mic is mono, no stereo)
    The mic should be configured with the left channel.

To increase the maximum limit, check this answer.

Package list

# Base packages
inxi (system info)
checkinstall
virtualbox (on ubuntu : prefer oracle ppa)
vlc
etcher (Live CD)
lftp (segmented download)
pv (progress)
dialog
unar (support RAR archive files)
mesa-vulkan-drivers vulkan-utils
libasound2-plugins:i386 libxrandr2:i386 (if needed for games)
JDownloader (use executable jar file on the editor's website)
antimicro (GUI for gamepad to keyboard) > (https://launchpad.net/~mdeguzis/+archive/ubuntu/libregeek/+files/antimicro_2.23~artful-1_amd64.deb)

# File managers
thunar
nemo

# Others
budgie-desktop
numix-gtk-theme
numix-icon-theme
menulibre
arc-theme
realvnc-vnc-viewer

# Media
PPSSPP (prefer latest automatic build on editor's website)
FightCade (editor's website only)
DeSmuME (can use one in repo)
Dolphin (Build from sources)
VisualBoyAdvance (snap install --edge visualboyadvance-m)

Wifi driver

Check the current wifi card with lspci.
If using a usb device, use lsusb.

Then, search wifi package with (exemple with Intel) : apt-cache search Intel | grep wifi.
Install the firmware-iwlwifi package.

Part 4 : Misc

  • Good old ifconfig with the new IP command : alias ifconfig='ip -4 -o -c addr'.
  • Display current graphical server : echo $XDG_SESSION_TYPE.
  • Info about drivers : lspci -k | grep -EA3 'VGA|3D|Display' then modinfo <driver>.
  • List current broken packages : dpkg-query -f '${status} ${package}\n' -W | awk '$3 != "installed" {print $1 " " $2 " " $3 " " $4}'.
  • Change DNS server in /etc/resolv.conf file.
    • Permanently change DNS with : echo "nameserver 1.1.1.1" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null
  • Partition tools recap : fdisk (MBR - <2To) - gdisk (GPT - >2To) - parted (both) (source).
  • FFMPEG (guide)
    • interpolation : ffmpeg -i input.mkv -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=60'" output.mkv
    • x264 convertion : ffmpeg -i input.mkv -vcodec libx264 output.mvk
      • Use map to convert audio/video/sub sources : ffmpeg -i input.mkv -map 0:a -map 0:v -map 0:s -scodec mov_text output.mp4
    • upscale : ffmpeg -i input.mkv -vf scale=4096:2048 -c:v libx264 -crf 20 -preset slow output.mvk
    • merge audio into another file : ffmpeg -i <file1> -i <file2> -filter_complex "[1]adelay=1000|1000[s1];[s1]amix=1[mixout]" -map 0:v -vcodec copy -map [mixout] <fileOut>
      • one line loop : for i in {01..51}; do ffmpeg -i aFile$i* -i bFile$i* -filter_complex "[1]adelay=1000|1000[s1];[s1]amix=1[mixout]" -map 0:v -vcodec copy -map [mixout] outFile\_$i\_stuff.sample; done
      • [1]adelay=1000|1000[s1] : add a 1s delay to the 2nd input and output it to [s1]
      • [s1]amix=1[mixout] : use the new audio as [mixout] for the "map"
  • Num Lock at startup (set numlock-state with command line or dconf-editor) :
    • sudo -H -u gdm -s /bin/bash
    • dbus-launch gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state 'on'
  • Boot into CMD (Ubuntu) with /etc/default/grub file :
    • disable GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    • set GRUB_CMDLINE_LINUX="text"
    • enable GRUB_TERMINAL="console"
    • Then, update with : sudo update-grub && systemctl set-default multi-user.target
    • To revert : sudo systemctl set-default graphical.target

Part 5 : Troubleshooting

Recover broken GUI after an upgrade

Install lightdm and xfce (with tasksel).
Change the default display manager whith : dpkg-reconfigure gdm3|lightdm|sddm or update-rc.d -f gdm3|lightdm|sddm defaults.
To check the current display manager : cat /etc/X11/default-display-manager.

Reinstall Gnome3

Purge all gnome related package : apt purge gdm3 gnome gnome-session gnome-shell.
Remove all dependencies : apt remove gnome-*.
Then, simply reinstall Gnome (with tasksel).

Broken lock screen button from the system menu

If lock screen button disapear by magic or the Ctrl + L keyboard shortcut doesn't work, just use this command as a workaround : gnome-screensaver-command -a.

Ubuntu : "System program problem" popup at startup (source)

If a popup keep popping up at start up, it's probably because of the presence of a crash file in /var/crash/.
To get rid of this, simply remove the crash file(s).

Ubuntu : force shutdown after power off (source)

Edit the /etc/default/grub file and add acpi=force at the end : GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi=force”
Refresh the config with update-grub.

Ubuntu : Grub working but not visible (source)

If your grub menu does not show up even after you set GRUB_TIMEOUT_STYLE=menu and GRUB_TIMEOUT=10 in /etc/default/grub and updated the grub, try setting (uncommenting) GRUB_TERMINAL=console as well and re sudo update-grub.
Make sure windows has either :

  • Fast boot disabled : Control Panel > Power options > Define power buttons > Change settings unavailable > Turn off fast startup
  • Or, with admin powershell : powercfg /hibernate off (this will disable the option in the control panel)

Fix the Gnome Monitor Applet

Locate this file : ~/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/extension.js
Change these three lines :

let lines = ByteArray.toString(as_r[1]).split('\n');
this.temperature = Math.round(parseInt(ByteArray.toString(as_r[1])) / 1000);
this.rpm = parseInt(ByteArray.toString(as_r[1]));

with :

let lines = String(as_r[1]).split('\n');
this.temperature = Math.round(parseInt(as_r[1]) / 1000);
this.rpm = parseInt(as_r[1]);

Soucre :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment