4446May 201026y978298 May 2019LXF249 47
Arch Linux in-depth
the user or another program. The most common
problem is the X Server itself trying to load its nouveau
module, which then loads the kernel module, which
then has a hissy fit because the proprietary module is
claiming its hardware. Anyway, one way around this is
to create an xorg.conf snippet. Create this with:
# nano /etc/X11/xorg.conf.d/20-nvidia.conf
and populate the file with:
Section “Device”
Identifier “Nvidia 1080GTX”
Driver “nvidia”
EndSection
The identifier string doesn’t affect anything, it’s just
used as a label. If you’re in the converse situation, and
would like the Nouveau driver back, changing the driver
to nouveau may help you. You’d probably want to
uninstall the nvidia package altogether, to be sure.
ne way that Arch (and in fact all other rolling
distros) differs from Ubuntu is that it’s critically
important to update the whole system
whenever you install a new package, since that new
package will have been compiled against the current
Arch package tree. So it won’t work if the libraries it
depends on, and is linked to, aren’t updated in lock-
step. Keeping your system up to date is good practice
anyway, so make sure you do:
pacman -Syu
once in a while, and certainly before installing anything.
The y means sYnc all repos and the u stands for
Update all packages. Remember, we use the #
prompt instead of $ to denote commands run as root,
as opposed to a general user. You’ll have set up the root
account during the install process, and you can use it
using the su command and the password you set up
during installation (not your user password). By default
the sudo command, as used by Ubuntu and now
Fedora, isn’t installed, although this is handy –
particularly for AUR helpers – so we’ll cover setting
that up below.
Graphics drivers
If you have an AMD/Nvidia graphics card from the last
decade (and perhaps even older), the open source
radeon for AMD (formerly ATI) cards or nouveau
drivers will almost certainly work out of the box for
you. This is even more likely to be true of integrated
graphics, using the intel driver. This is what enables
the console to display in your monitor’s native
resolution, rather than the old fashioned 80x25. Be
that as it may, you’ll still need to install the relevant
DDX (Device Dependent X) driver to get 2D acceleration
in X, and the Mesa drivers for 3D acceleration.
If you have a more recent AMD card (Volcanic
Islands, GCN 1.2 or later), the open source AMDGPU
driver will be used, and if you have a not quite so recent
AMD card (Sea/Southern Islands, GCN 1.0), you may
want to enable the AMDGPU driver anyway – we’ll get
to that in a second. If you have an Nvidia card and
would like to do gaming, you’ll probably want to install
the dastardly proprietary driver, which is actually much
easier to do on Arch than it is on Ubuntu and friends. In
fact, all you need is:
pacman -S nvidia
Of course, nothing’s ever that simple, and if you were
to reboot right away there’s a small possibility that your
display manager (if you’ve installed one) would fail to
start. This would be because both proprietary and
Nouveau modules would be loaded, and the display
server would get confused about which one to use –
either giving up with the classic ‘No screens found’
error, or more commonly just displaying a blank screen.
If you do find yourself in blank screen land, it’s
always worth trying to get to a TTY terminal with
Ctrl+Alt+F2 before reaching for the power button.
Sometimes this works and sometimes it doesn’t; it
depends if the keyboard has been grabbed by a partially
loaded display server or not. At any rate, if it doesn’t,
always try repeatedly hitting Ctrl+Alt+Del to force a
graceful reboot rather than risking your data.
The nvidia package actually installs a file to blacklist
the nouveau module, but blacklisting sometimes isn’t
enough; the module can still be loaded if requested by
Sudo,youknow
InstallingSudoisjustamatterof:
#pacman-Ssudo
butforittobeusefulwe’llneedtogiveourusersudoaccess.This
involveseditingthe/etc/sudoersfile,whichforsafetywe’lldousing
thevisudowrapper.Thiswillcheckanymodificationsthatwemake,
sinceatypoherecouldresultinuslosingsudoaccess.Thisisn’tan
issueonArch(atleastwhilewestillhaverootaccess),butcanbe
catastrophiconotherdistros.Also,don’tworryifthe‘vi’partof
visudosentashiverdownyourspine–youcanusewhichevereditor
youwanttoeditthefile(hey,I’maneditor–Ed).Let’suseNano, for
instance:
#EDITOR=nanovisudo
There’sawholecomplicatedsyntaxtothisfile(theArchWikiwilltell
youallaboutit),butifyoujustwanttoletyouruserruncommands
withtherootpassword(nottheiruserpassword,althoughthatcan
bearrangedtoo),allyouneedtodoisaddtheline:
usernameALL=(ALL)ALL
replacingusername withyourusername,somewherearoundthe
sectionheaded #Userprivilegespecification.NowleaveNanowith
Ctrl+X,thenYtosave.Assumingyou’veobeyedthesyntax,visudo
won’tshoutatyouandyoursudoconfigurationwillbeupdated.
Unlikechanginggrouppermissions,there’snoneedtologoutand
logbackinagainforthesechangestotakeeffect.
The combination
of Powerline and
Cool Retro Term
will strike fear
into the souls of
passing editors
asking where
your feature is.
O