3 After Installation - ivanmrva/gentoo-wiki GitHub Wiki

SUDO users

  1. Edit /etc/sudoers and uncomment the following line: %wheel ALL=(ALL:ALL) NOPASSWD: ALL
    • Make sure the user is part of the wheel user group.

Bash history

  1. Add to ~/.bashrc:

    # bash history memory size
    export HISTSIZE=20000
    # bash history file size
    export HISTFILESIZE=20000
    # append history from multiple opened terminals to one file (no overwriting on exit)
    shopt -s histappend
    # displays history commands from other terminals in real-time
    PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
    

Systemd services

  1. Enable useful services to run on startup:
    • systemctl --user enable pulseaudio.service pulseaudio.socket
    • systemctl enable bluetooth.service

Gnome Configuration

  1. Open Gnome Settings and change

    • Displays -> Resolution / Scale
    • Displays -> Night Light = ON
    • Sound -> Alert Sound = None
    • Power -> Show battery percentage
    • Multitasking -> Fixed number of workspace = 2
    • Search -> Search Locations -> add custom locations as desired
      • TODO: where is index stored
    • Online accounts -> add accounts as desired
    • Mouse & Touchpad -> Pointer speed
    • Keyboard -> Input sources -> add Switzerland (German)
    • System -> Region & Language -> Language = English (US) + Formats = Switzerland (German)
    • System -> Date & Time -> Automatic Date & Time = ON, Timezone = Zurich, Time Format = 24h, Week day + Date + seconds + week numbers = ON
  2. Prevent grouping windows when Alt+Tab

    • Keyboard -> Shortcuts -> Switch windows - set to Alt+Tab

Intel Graphics: Vaapi

  1. Make sure /etc/portage/make.conf contains the USE="vaapi".
  2. Install vaapi driver for intel cards:
    • emerge libva-intel-media-driver
  3. Verify correct driver usage:
    • emerge media-video/libva-utils
    • vainfo
      • It should like something like this:
        vainfo: VA-API version: 0.35 (libva 1.3.1)
        vainfo: Driver version: Intel i965 driver - 1.3.0
        vainfo: Supported profile and entrypoints
        VAProfileMPEG2Simple            :	VAEntrypointVLD
        VAProfileMPEG2Simple            :	VAEntrypointEncSlice
        VAProfileMPEG2Main              :	VAEntrypointVLD
        VAProfileMPEG2Main              :	VAEntrypointEncSlice
        VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
        VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
        VAProfileH264Main               :	VAEntrypointVLD
        VAProfileH264Main               :	VAEntrypointEncSlice
        VAProfileH264High               :	VAEntrypointVLD
        VAProfileH264High               :	VAEntrypointEncSlice
        VAProfileVC1Simple              :	VAEntrypointVLD
        VAProfileVC1Main                :	VAEntrypointVLD
        VAProfileVC1Advanced            :	VAEntrypointVLD
        VAProfileNone                   :	VAEntrypointVideoProc
        VAProfileJPEGBaseline           :	VAEntrypointVLD
        
  4. Verify HW encoding/decoding is used:
    • emerge x11-apps/igt-gpu-tools
    • intel_gpu_top
      • Video BUSY should be greater than zero:
      ENGINES     BUSY                                                                        MI_SEMA MI_WAIT
      Render/3D   23.92% |█████████████████████                                              |      0%      0%
      Blitter    0.00% |                                                                   |      0%      0%
      Video    7.98%
      

TODO: make sure rendering is used in chrome

See also https://wiki.gentoo.org/wiki/VAAPI

Power Management

  1. Make use of Intel's Linux thermal daemon:
    • emerge thermald
    • systemctl enable thermald
  2. Install TLP:
    • emerge sys-power/tlp
      • Do not install laptop-mode-tools to prevent conflicts (TLP is an alternative with safe, modern defaults OOTB).
    • Configure TLP for more consumption savings on battery:
    • systemctl enable tlp

Check also https://wiki.gentoo.org/wiki/Power_management/Guide

Verify Kernel configuration

  1. Verify microcode is loaded:
    • dmesg | grep microcode
      • It should contain a message like: microcode: microcode updated early to revision 0xa4, date = 2010-10-02
  2. Verify loading of Intel Graphic firmware
    • dmc, guc, huc

Verify Portage package logs

  1. Fix warnings, suggestion or kernel configuration based on the logs of all installed packages:
    • Check portage logs with elogv

modprobed-db

  1. sudo emerge modprobed-db
  2. modprobed-db store (create db and store modules to file)
  3. systemctl --user enable modprobed-db (auto-updates to modules file)
  4. Next time use module DB for kernel compilation:
    • make LSMOD=$HOME/.config/modprobed.db localmodconfig

Portage Repo Sync over GIT

  1. Create /etc/portage/repos.conf/gentoo.conf file with the following content

    [DEFAULT]
    main-repo = gentoo
    
    [gentoo]
    location = /var/db/repos/gentoo
    sync-type = git
    # Official "sync-friendly git mirror of repo/gentoo with caches and metadata"
    # sync-uri = https://anongit.gentoo.org/git/repo/sync/gentoo.git
    # GitHub mirror (saves the Gentoo project bandwidth - of *this* sync-friendly git mirror is preferred)
    sync-uri = https://github.com/gentoo-mirror/gentoo.git
    auto-sync = yes
    sync-rsync-verify-jobs = 1
    sync-rsync-verify-metamanifest = yes
    sync-rsync-verify-max-age = 24
    sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc
    sync-openpgp-key-refresh-retry-count = 40
    sync-openpgp-key-refresh-retry-overall-timeout = 1200
    sync-openpgp-key-refresh-retry-delay-exp-base = 2
    sync-openpgp-key-refresh-retry-delay-max = 60
    sync-openpgp-key-refresh-retry-delay-mult = 4
    
    sync-git-verify-commit-signature = yes
    
  2. Before initial sync, remove /var/db/repos/gentoo/ directory.

  3. Synchronise the repository tree as usual:

    • emerge --sync