Skip to content

u/2001herne

In this archive from Jul 2022 to Mar 2024

1
posts
29
comments
0
media
77
score

So, my personal recommendation would be as follows:

  1. Boot from the arch live iso again
  2. Mount your partitions like you did when installing - DONT format them, just mount them like you did when installing.
  3. Pacstrap network manager like you did with base. Or, chroot into your install, and then install networkmanager with Pacman.
7 points

Alright. So, first of all, I agree with what u/zardvark said - the best thing you can do going forward is to learn how to read man pages and the arch wiki. That, said, I also agree that hey are cryptic and confusing at times. My own system is similar to yours (intel/nvidia), and we seem to want similar things (render everything on the NVIDIA card), so I thought I'd share not only my setup, but also how I got to it. One last thing - I'm assuming that you're running X11 and not Wayland, as NVIDIA and Wayland do not get along all that well.

  1. Check if you're running X11 or Wayland by opening a terminal and running echo $XDG_SESSION_TYPE. That should give back eitherx11or wayland. If it gives back x11, then we're good to go. Otherwise, sorry, can't help

  2. There's two arch wiki pages that we're going to be referencing a bit here. One is the page for NVIDIA, the other is the page for PRIME. You can also find the PRIME article listed in the 'Related Articles' sidebar of the NVIDIA article. We're mostly going to be using a page from NVIDIA own docs on PRIME, however, located here.

  3. Install the drivers as per the arch wiki page. For your system, it's going to be either the nvidia package, or the nvidia-dkms package. Unless you're using a non-standard kernel (such as linux-zen, instead of linux or linux-lts, nvidia should be fine. So install it with sudo pacman -S nvidia or sudo pacman -S nvidia-dkms. Do not reboot just yet, we've got some config to do.

  4. From the arch wiki page on PRIME, more specifically the first line of section 2, we can see that the description of PRIME ("render applications on the more powerful GPU") is exactly what we want. Unfortunately, the article on PRIME only lists instructions for the open source drivers (known as nouveau), while we want to use NVIDIA's drivers, mostly because the nouveau drivers are poorly optimised at best. So, we'll need to go looking elsewhere.

  5. Looking further down the page we come across section 4 - user scenarios. The first scenario - Discrete Card as Primary GPU" seems like what we need. Unfortunately, it (once again) only gives instructions for the nouveau drivers. It does have a footnote for the users of the NVIDIA drivers, and provides a link to NVIDIA's own docs on the topic, which I gave you in Step 2.

  6. Going to the NVIDIA page, we're given two options. The first one is the one we want (PRIME, not Reverse PRIME), so we'll look into that one. It provides us with an example xorg.conf, and we can pretty much just copy it over to /etc/X11/xorg.conf. One thing we need to keep in mind is the "BusID" option in the "Device" section. You can find this by running lspci -k | grep -E "(VGA|3D)". That should give you something like

    00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
    01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)
    

    Those numbers out the front are the PCIE BusID of each card. Unfortunately, lspci formats the number as 3 (or 4) sections of hexadecimal. X11, on the other hand, expects the sections in decimal. If none of the sections are over 9, or have letters in them, you're all good to basically just copy it over. So, if lspci gave me a BusID of A:B.C, where A, B and C are all less than 9, the BusID line in my xorg.config would look like BusID: "PCI:A:B:C". Or, for the output above, BusID: "PCI:1:0:0"

  7. That should be the xorg.conf done, now we just need to enable PRIME. THe commands are the same, but where to put them can differ depending on your system. If you login to a tty (blank terminal) and start X11 by running startx, put them in your ~/.xinitrc file. On the other hand, if you use a display manager to login, then ~/.xsession is a good place to try. If that doesn't work, you'll, unfortunately, need to go digging through google. The commands that you'll need to add to the file are:

    xrandr --setprovideroutputsource modesetting NVIDIA-0
    xrandr --auto
    

    Also, if you run into screen tearing, you can try also adding

    xrandr --output <output> --set "PRIME Synchronization" 1
    

I hope that helps.

2 points

Happy to help. One thing to keep in mind: the '@' symbol is usually used to differentiate btrfs subvolumes from normal folders, as they can look pretty similar otherwise. So, moving forward, if something is prefixed by a '@', try treating it as a subvolume - or at least check if it is a subvolume, it'll likely point you in the right direction.

4 points

You'll want to specify subvols. Instead of mounting the disk, do the following:

mount /dev/nvme0n1p2 /mnt -o subvol='@'
mount /dev/nvme0n1p2 /mnt/home -o subvol='@home' 
mount /dev/nvme0n1p2 /mnt/var/cache/pacman/pkg -o subvol='@pkg' 
arch-chroot /mnt

I'm pretty sure that'll get you close, but I can't be sure, every config is different.

6 points

I use a patched version of rxvt-unicode from the AUR, rxvt-unicode-truecolor-wide-glyphs. For a shell I use bash. Something to look into is the PS1 line (or your shells equivalent). For myself, I've got it set to show the git repository, branch name and commit hash if I'm inside a git repo. Looks a little something like this:

https://imgur.com/a/WXVPTbp

The font used is the nerd-fonts patched version of inconsolata (package name ttf-inconsolata-nerd). The PS1 generation is done with the scripts/programs in this github repo:

https://github.com/2001herne/ps1Helpers

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.