-
Notifications
You must be signed in to change notification settings - Fork 4
First steps
After a fresh install, it's important to update your system. Run # pacman -Syu, and you should be all set.
Install Xorg by running:
# pacman -S xorg-server xorg-xinit xorg-xrandrThis display server will help you start your window manager later on. After installing it, you will have the xrandr command. Use it to list all connected monitors and their resolutions. You can set your monitors like this:
xrandr --output DP-1 --rotate left
xrandr --output DP-1 --left-of HDMI-1In the above example, I'm setting my monitor DP-1 to be left of my HDMI-1 monitor and then setting it to be vertically oriented.
Finally, make the X server start your desired window manager by making a copy of a configuration file located at /etc/X11/xinit/xinitrc and appending exec [wm] to the end of it. You may need to comment out some of the last lines depending if you have the apps configured to start up at that file. Example:
$ cp /etc/X11/xinit/xinitrc ~/.xinitrc# ... rest of the code
#twm &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login
exec i3You can use the setxkbmap [layout] to change the default keyboard layout. However, to make it persistent you may append it to the ~/.xinitrc file mentioned above. Example:
# ... rest of the code
exec i3
setxkbmap usIf you have GRUB installed and want to alter its resolution, you can use the command:
# nano /etc/default/grubModify the line where the resolution is set, for example:
GRUB_GFXMODE=1920x1080x32Make sure the resolution is supported by your monitor; otherwise, it may crash. Confirm this using xrandr. Finally, run # grub-mkconfig -o /boot/grub/grub.cfg to save changes.
To set your desired shell as the default one, first, confirm that it is installed by running:
$ cat /etc/shellsAfterwards, you can do:
# chsh -s $(which zsh)In the example provided above, I used zsh. Note that for this change to take effect, you may need to reboot.
To set up audio, run:
# pacman -S alsa-utils pulseaudio playerctlThe last package will come in handy when switching audio media through key bindings (e.g., for Spotify). After installing those, you can run:
$ alsamixerThis will open an audio mixer where you can adjust your computer's volume. You may need to reboot your computer after installing the packages.
To install the proprietary Nvidia drivers (replacing the nouveau ones), assuming you have the linux kernel (not linux-lts, etc.) and a Maxwell or newer graphics card architecture, follow these steps:
- Install the nvidia package:
# pacman -S nvidia. - Edit the
/etc/mkinitcpio.conffile and modify the modules array to:MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm). - Edit the
/etc/default/grubfile and modify the following like by adding the last two kernel parameters shown here:GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet nvidia-drm.modeset=1 nvidia-drm.fbdev=0". - Save the previous changes by running
sudo grub-mkconfig -o /boot/grub/grub.cfgandsudo mkinitcpio -P. - Reboot.
To be sure, you can also blacklist the nouveau driver to ensure the proprietary one gets used instead. Do this by creating the file /etc/modprobe.d/blacklist-nouveau.conf and adding:
blacklist nouveau
options nouveau modeset=0Lastly, create a pacman hook to be run everytime the linux kernel updates, or the nvidia drivers get updated. Do this in /etc/pacman.d/hooks/nvidia.hook. Result:
[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=nvidia
Target=linux
[Action]
Description=Updating NVIDIA module in initcpio
Depends=mkinitcpio
When=PostTransaction
NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux*) exit 0; esac; done; /usr/bin/mkinitcpio -P'After being done, run nvidia-smi to verify the correct installation of the drivers. If you do this before rebooting, an error may appear instead, but that doesn't mean the installation was unsuccessful.
After a fresh install, it's important to update and upgrade your packages. If you encounter an error related to sources where Debian looks for packages, you can resolve it by running:
$ su -
# nano /etc/apt/sources.listThen, comment out the first line, which should look something like this:
#deb cdrom:[Debian GNU/Linux 12.4.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20231210-1>Finally, run # apt update && apt upgrade, and you should be all set.
The sudo command may not be initially recognized. To solve this, install it with:
$ apt install sudoAfter installation, edit the sudoers file by running # visudo and add yourself to it. For example:
# User privilege specification
root ALL=(ALL:ALL) ALL
eduardo ALL=(ALL:ALL) ALLInstall Xorg by running:
# apt install xorgThis display server will help you start your window manager later on. After installing it, you may have the xrandr command (if not, install it with # apt install xrandr). Use this command to list all connected monitors and their resolutions. You can set your monitors like this:
xrandr --output DP-1 --rotate left
xrandr --output DP-1 --left-of HDMI-1In the above example, I'm setting my monitor DP-1 to be left of my HDMI-1 monitor and then setting it to be vertically oriented.
If you have GRUB installed and want to alter its resolution, you can use the command:
# nano /etc/default/grubModify the line where the resolution is set, for example:
GRUB_GFXMODE="1920x1080"Make sure the resolution is supported by your monitor; otherwise, it may crash. Confirm this using xrandr. Finally, run # update-grub to save changes.
To set your desired shell as the default one, first, confirm that it is installed by running:
$ cat /etc/shellsAfterwards, you can do:
# chsh -s $(which zsh)In the example provided above, I used zsh. Note that for this change to take effect, you may need to reboot.
To set up audio, run:
# apt install alsa-utils pulseaudio playerctlThe last package will come in handy when switching audio media through key bindings (e.g., for Spotify). After installing those, you can run:
$ alsamixerThis will open an audio mixer where you can adjust your computer's volume. You may need to reboot your computer after installing the packages.
Finally, pulseaudio may cause some cracking or popping noises when leaving your computer idle for a couple of minutes. To fix this, run:
$ nano ~/.config/pulse/default.paAdd the following lines to that file (create it if it doesn't exist):
.include /etc/pulse/default.pa
.nofail
unload-module module-suspend-on-idle
.fail