Skip to content

u/qgnox

In this archive from Nov 2015 to Nov 2023

3
posts
128
comments
1
media
316
score

with linux-tkg

git clone https://github.com/Frogging-Family/linux-tkg
cd linux-tkg
#change customization.cfg, so far I only tested it with 6.2
#create dir for patch
mkdir linux<version that you put in customization.cfg edit -- without . dot>-tkg-userpatches
#download patch, I think this is the last updated patch
curl https://bugzilla.kernel.org/attachment.cgi\?id\=303726\&action\=diff\&collapsed\=\&headers\=1\&format\=raw -o linux<version..see up>-tkg-userpatches/fix_tpm.mypatch
# compile 
makepkg
# install
pacman -U *.zst
# configure your boot loader grub,systemd-boot, ...
3 points

xf86-video-amdgpu helps when using WM's (i3, bswpm, ..) and not compositor being used (picom, ...) to avoid tearing, if you are using DE's (GNOME, KDE, ..) you dont need it because they have their own compositor, so if you are using DE just leave this section as this:

Section "Device"
    Identifier "amdgpu"
    Driver "modesetting" #<- change from amdgpu
#   Option "TearFree" "true"
#   Option "DRI" "3"
#   Option "VariableRefresh" "true"
    BusID "PCI:6:0:0" #<- change to your amd pci id
EndSection
1 points
  1. When you have prime-offload working, the programs that you need to use the dGPU have to be called with prime-run <program>.

  2. This is my xorg.conf for prime offload for my laptop with amd igpu + nvidia dgpu, replace the amdgpu/nvidia bus id with the ones that you see with lspci:

     Section "ServerLayout"
             Identifier "layout"
             Screen 0 "amdgpu"
             Inactive "nvidia"
             Option "AllowNVIDIAGPUScreens"
     EndSection
    
     Section "Device"
         Identifier "amdgpu"
         Driver "amdgpu"
         Option "TearFree" "true"
         Option "DRI" "3"
         Option "VariableRefresh" "true"
         BusID "PCI:6:0:0"
     EndSection
    
     Section "Screen"
         Identifier "amdgpu"
         Device "amdgpu"
     EndSection
    
     Section "Device"
         Identifier "nvidia"
         Driver "nvidia"
         BusID "PCI:1:0:0"
     EndSection
    
     Section "Screen"
             Identifier "nvidia"
             Device "nvidia"
     EndSection
    

For reverse prime you can also use nvidia-xrun or optimus-manager.

1 points

If you selected as boot loader: systemd when using archinstall, there was an issue a few weeks ago (with the iso at that date) that the systemd boot entry file created in /boot/loader/entries/<date>.conf there was a placeholder not replaced making the installation show that error of mounting /new_root, something like <FSTREE.. , you have to remove that part to boot correctly.

2 points

Try downgrading to linux-firmware-20200916.00a84c5-1, and run mkinitcpio -P and reboot , I have also a laptop with amdgpu and the latest firmware versions of this year makes that error appear and/or the amdgpu memory clock go to 100% .

2 points

I dont know about gnome but in kde wayland or sway (wayland) configured to use the amd gpu you can use the prime-run command to launch a xwayland using the nvidia card , you just have to set correctly some env variables :

In your session (bash, zsh) set :

export __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json:/usr/share/vulkan/icd.d/radeon_icd.i686.json
export DXVK_FILTER_DEVICE_NAME="AMD"
export VKD3D_FILTER_DEVICE_NAME="AMD"
export __GLX_VENDOR_LIBRARY_NAME="mesa"

And prepend to or better create a new prime-run (cause it can be replaced in an update) the same variables but for nvidia:

#!/bin/bash
__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json DXVK_FILTER_DEVICE_NAME=NVIDIA VKD3D_FILTER_DEVICE_NAME=NVIDIA VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia "$@"

You have to have the nvidia modules loaded (via mkinitcpio.conf or in modprobe.d) or in my case I use a simple script to load/unload the modules.

Then prime-run app, should appear in nvidia-smi .

The problem is with my amd/nvidia laptop is that when the nvidia_drm module is loaded the opengl/vulkan games show some kind of stutter/artifacts like showing parts of a previous frame like if is not syncing but with normal/high fps, if the nvidia_drm is not loaded only with nvidia, nvidia_modeset, nvidia_uvm modules runs almost smooth but the fps could be lower and/or without sync. I dont know yet if is the xwayland or the driver.

edit: if nvidia-smi show no process means you are running your de/wm session with the integrated gpu (amdgpu), if the nvidia drivers were not loaded the nvidia-smi will crash with an error, only when using X11 config you will see a xorg process running in the case of prime offload until you launch others using it (prime-run) or many when X11 is configured to use only nvidia.

2 points

You can try with zenstates for that cpu, disabling the higher states 2.3Ghz, 1.7Ghz and leaving only the 1.4Ghz similar to what windows does, turbo boost should be disabled too (/sys/devices/system/cpu/cpufreq/boost)

sudo zenstates --disable -p 0
sudo zenstates --disable -p 1

In my asus 3750h now I see ~11.xW usage from ~15W, there is also a flag -v to change the voltage? I tested until -v 78

$sudo zenstates -l
P0 - Disabled
P1 - Disabled
P2 - Enabled - FID = 62 - DID = E - VID = 78 - Ratio = 14.00 - vCore = 0.80000
P3 - Disabled
P4 - Disabled
P5 - Disabled
P6 - Disabled
P7 - Disabled
C6 State - Package - Enabled
C6 State - Core - Enabled

Also for my lap there is a thermal throttle that change the speed of the fans

/sys/devices/platform/asus-nb-wmi/throttle_thermal_policy

value 2 = Silent, maybe that laptop brand is using the same module or look if there is something similar. I remember that when I got the lap 2019 I could set the usage at ~5W but in later kernels it has been increasing ..

5 points

Your school network may have some firewall rules to block not common ports, I think mullvad uses by default tcp ports 51xxx , if the app allows you to modify it try with 443 (if mullvad server allows it). If I remember correctly you can specify the server connection port when creating a wireguard conf on the mullvad website.

2 points

There is another way (reverse prime) to use one tty for the igpu with the dgpu suspended, and then with ctrl + alt+ f2 start a x server on tty2 waking up the nvidia card and suspending it after use, is almost the same as logging out and login again the difference is that you dont lose what you were doing in tty1.

1 points

if you are not downloading all the dns records to your machine you are just doing a dns cache so it needs to forward the resolution to a dns server (8.8.8.8 or other) and then it caches the ip for the next requests .., this is my working config maybe it gives you a hint what is missing in your config:

server:
  chroot: ""
  interface: 127.0.0.1
  access-control: 0.0.0.0/0 allow
  use-syslog: yes
  username: "unbound"
  directory: "/etc/unbound"
  root-hints: "/etc/unbound/root.hints"
  msg-cache-size: 50m
  rrset-cache-size: 100m
  msg-cache-slabs: 16
  rrset-cache-slabs: 16
  infra-cache-slabs: 16
  key-cache-slabs: 16
  include: "/etc/unbound/ads.conf"
  prefetch-key: yes
  key-cache-size: 32m
  key-cache-slabs: 2
  num-threads: 4
  so-reuseport: yes
  so-rcvbuf: 1m
  so-sndbuf: 1m
  do-daemonize: no
  rrset-roundrobin: yes
  do-not-query-localhost: no
  do-ip4: yes
  do-ip6: yes
  do-udp: yes
  do-tcp: yes
  cache-max-ttl: 86400
  cache-min-ttl: 3600
  hide-identity: yes
  hide-version: yes
  minimal-responses: yes
  prefetch: yes
  use-caps-for-id: yes
  verbosity: 1
  harden-glue: yes
  harden-dnssec-stripped: yes

forward-zone:
   name: "."
   forward-addr: 8.8.8.8

ads.conf the blocked ips, root.hints are downloaded with curl --output /etc/unbound/root.hints https://www.internic.net/domain/named.cache

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.