Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New desktop PC
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
der bastler
Apprentice
Apprentice


Joined: 13 Apr 2003
Posts: 257

PostPosted: Sun Feb 25, 2024 12:39 pm    Post subject: New desktop PC Reply with quote

After 15 years (and 1.5 ThinkPads due to commuting) I want to assemble a new desktop machine.

Ok, granted, the kids asking for a "Gaming PC" is another trigger.

I've put Gentoo on several machines, latest being a Raspberry Pi Zero W. Over the decade it's been easier and easier to roll it out. Nonetheless I'd like to get some feedback before buying.

I've settled for an AMD Ryzen 7 5800X3D on a Gigabyte B550 Gaming X V2. I'd spend 2x32 GiB RAM (DDR4-3200), since I put /var/tmp and /tmp on RAM disks.

In the 2000s I bought Nvidia cards due to the functioning blob driver. Recently I read about a completely different picture these days, with AMD offering better support. A decent FHD performance suffices, thus I'd pick an XFX Speedster SWFT 210 RX 6600.

To reduce cabling I'd add a TP-Link TL-WN781ND PCIe WLAN card.

This rather conservative setup should be simple to set up -- or do I miss something?
_________________
Tempus fugit.
@frank@troet.cafe
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1538

PostPosted: Sun Feb 25, 2024 2:07 pm    Post subject: Reply with quote

Looks good, the only thing I can think of is AMD desktop GPU's firmware do not control fans to automatically change speed to reflect cooling needs, you need to setup additional software for that. Try browsing the forums for such threads.

I'd also advice against using cheap wireless cards, I've had a terrible experience with a Mediatek. Research well if the chosen model works reliably under Linux.

Best Regards,
Georgi
Back to top
View user's profile Send private message
der bastler
Apprentice
Apprentice


Joined: 13 Apr 2003
Posts: 257

PostPosted: Sun Feb 25, 2024 6:27 pm    Post subject: Reply with quote

logrusx wrote:
Looks good, the only thing I can think of is AMD desktop GPU's firmware do not control fans to automatically change speed to reflect cooling needs, you need to setup additional software for that. Try browsing the forums for such threads.


Didn't had that on my screen, thanks. Found it (memo to me):

https://forums.gentoo.org/viewtopic-t-1158037.html
https://forums.gentoo.org/viewtopic-t-1119075.html
https://wiki.gentoo.org/wiki/AMDGPU#Power_management

Quote:
I'd also advice against using cheap wireless cards, I've had a terrible experience with a Mediatek. Research well if the chosen model works reliably under Linux.


Good point. Seems to work:

https://forums.gentoo.org/viewtopic.php?p=6483150#6507317

I'll report back if the TL complies.
_________________
Tempus fugit.
@frank@troet.cafe
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1538

PostPosted: Sun Feb 25, 2024 7:53 pm    Post subject: Reply with quote

der bastler wrote:


Quote:
I'd also advice against using cheap wireless cards, I've had a terrible experience with a Mediatek. Research well if the chosen model works reliably under Linux.


Good point. Seems to work:

https://forums.gentoo.org/viewtopic.php?p=6483150#6507317

I'll report back if the TL complies.


The post you've linked is about atheros chip, I searched but couldn't find what chip the TL card uses. I doubt it's atheros as TL produce their own chips AFAIK.

The problem I have with cheap chips is they take shortcuts and often end up not quite fully compliant with the specs, resulting in loss of packages, which was my struggle with the Mediatek, which is my struggle with a Broadcom BT audio receiver chip and another BCM WiFi card from years ago. In other words I haven't had good experience with cheap chips and adapters. At all.

Best Regards,
Georgi
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54252
Location: 56N 3W

PostPosted: Sun Feb 25, 2024 9:21 pm    Post subject: Reply with quote

der bastler,

Heres my bucket list PC are rational.
The rational may be of interest.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 501

PostPosted: Sun Feb 25, 2024 10:24 pm    Post subject: Reply with quote

logrusx wrote:
Looks good, the only thing I can think of is AMD desktop GPU's firmware do not control fans to automatically change speed to reflect cooling needs, you need to setup additional software for that.

That's not strictly true, it does - the issue is it's set really odd and doesn't like to put fans over 50-60%, to the point they will actually let the card thermal throttle and never consider putting them over whatever limit they have set.

Disclaimer: I never intended to share this software, so it's a little rough around the edges, you have been warned!

Some background - I used kmplot to create a mathematical function representing the "hockey stick" temp vs fan speed curve I was looking for, at daemon start-up this is loaded into a dictionary. Below a certain temperature (45°C), as well as on daemon exit, it reverts the card to "auto" control (assuming auto was the default when it was started - otherwise is reverts to whatever the default was).
Because of the "firmware fan speed lock issue" (I run ~amd64 or ** drivers from time to time, because game related reasons (gotta love the flexibility of Gentoo!)) where after crashes, and even after reboot after a crash, the fan control firmware can "lock up", on start-up the daemon will run the fans at 100% for 5 seconds - you will be able to hear this, listen for it on reboot/restart if you experience severe frame-dropping in games due to thermal throttling*
The daemon searches /sys/class/hwmon for the first device using the amdgpu kernel driver, then attempts to control the fan of that device. I have "static PCI bus ID" versions floating around, as I now use two cards and it was easier to revert to two "old" static BusID versions and run each once than make it detect/control all things using the amdgpu driver dynamically, but you should be fine.


So, I have an openrc init script, but the daemon was written to be "as self sufficient as possible" so it's easily portable to lesser init systems:
/etc/init.d/amdtempd:
#!/sbin/openrc-run

depend() {
        after modules coldplug hotplug xdm
}

start() {
        ebegin "Starting AMD GPU fan speed daemon"
        start-stop-daemon --start --exec /usr/sbin/amdtempd \
        --pidfile /var/run/amdtempd.pid -- start
        eend $?
}

stop() {
        ebegin "Stopping AMD GPU fan speed daemon"
        start-stop-daemon --stop --exec /usr/sbin/amdtempd \
        --pidfile /var/run/amdtempd.pid -- stop
        eend $?
}

status() {
        ebegin "Status of AMD GPU fan speed daemon"
        /usr/sbin/amdtempd status
        eend $?
}


The actual daemon:
/usr/sbin/amdtempd:
#!/usr/bin/env python

import os
import sys
import signal
import time
debug=0

class daemon:
        def __init__(self):
                self.classpath=self.findPath()
                self.pid_filename='/var/run/amdtempd.pid'
                self.go_auto_temp=x=45000 #under this we switch back to auto mode
                self.gpu_temp_path='%stemp1_input'%self.classpath
                self.fan_mode_path='%spwm1_enable'%self.classpath
                self.fan_speed_path='%spwm1'%self.classpath
                self.fan_rpm_path='%sfan1_input'%self.classpath
                self.fan_enable_path='%sfan1_enable'%self.classpath
                self.modes={0:'None',1:'Manual',2:'Auto'}
                self.default_mode=2
                self.default_fan_speed=90
                self.fan_off_temp=40
                self.curve={}
                self.firstrun=1
                while x <= 120000:
                        self.curve.update({x:(((x-10000)/21609)**5)+90}) #should be +90
                        if self.curve[x]>255:self.curve.update({x:255})
                        if x<(self.fan_off_temp*1000):self.curve.update({x:0})
                        x+=1000

        def findPath(self):
                for base,dirs,files in os.walk('/sys/class/hwmon/'):
                        for dir in dirs:
                                namefile=open('%s%s/name'%(base,dir))
                                name=namefile.readline().strip()
                                namefile.close()
                                if name=="amdgpu":
                                        return '%s%s/'%(base,dir)
                exit


        def exit(self,sig,*_):
                sig_name=str(signal.Signals(sig))[8:]
                print('AMDTempd: Received %s, stopping gracefully ...' %sig_name)
                if self.default_mode != 2:self.set_fan_speed(self.default_fan_speed)
                self.set_mode(self.default_mode)
                try:os.remove(self.pid_filename)
                except:sys.exit(1)
                sys.exit(0)

        def start(self):
                self.default_mode=self.read_file(self.fan_mode_path)
                self.default_fan_speed=self.read_file(self.fan_speed_path)
                self.get_mode()
                try:
                        pid_file = open(self.pid_filename,'x')
                except FileExistsError as error:
                        pid=self.read_file(self.pid_filename)
                        if not os.system('ps -A|awk \'{print $1}\'|grep -qw "%s"'%pid):
                                print('AMDTempd: PID file already exists and daemon is running. Exiting...')
                                sys.exit(1)
                        else:
                                print('AMDTempd: Removing stale PID file:')
                                os.remove(self.pid_filename)
                                self.start()
                except OSError as error:
                        print(error)
                        sys.exit(1)
                #endtry
                pid_file.write(str(os.getpid()))
                pid_file.close()
                signal.signal(signal.SIGINT, self.exit)#from ctrl-c
                signal.signal(signal.SIGUSR1, self.exit)#from main script stop()
                signal.signal(signal.SIGTERM, self.exit)#from start-stop-daemon
                while True:
                        time.sleep(1)
                        self.check_temp()

        def check_temp(self):
                if self.firstrun:
                        self.set_mode(1)
                        self.set_fan_speed(255)
                        time.sleep(5)
                        self.set_mode(2)
                        self.firstrun=0
                if debug: print("checking temp")
                gpu_temp=self.read_file(self.gpu_temp_path)
                if gpu_temp <= self.go_auto_temp:
                        if self.current_mode != 'Auto':
                                if debug:print("going auto")
                                self.set_mode(2)
                        return
                self.set_fan_speed(self.curve[gpu_temp])

        def set_mode(self,mode):
                mode_file=open(self.fan_mode_path,'w')
                mode_file.write(str(mode))
                mode_file.close()
                os.system('cat %sfan1_max > %sfan1_target 2>/dev/null'%(self.classpath,self.classpath)) #fixes "locked fan" after crash etc
                self.current_mode=self.modes[int(mode)]

        def set_fan_speed(self,Pspeed):
                self.get_mode()
                if self.current_mode != 'Manual':
                        if debug:print("going manual")
                        self.set_mode(1)
                speed=str(int(Pspeed))
                try:
                        speed_file=open(self.fan_speed_path,'w')
                        speed_file.write(speed)
                        speed_file.close()
                except OSError: #Happens after GPU power off/on events (suspend hibernate)
                        if debug:print("speed_file error")
                        pass

        def get_mode(self):
                mode=self.read_file(self.fan_mode_path)
                self.current_mode=self.modes[mode]

        def read_file(self,path):
                try:
                        ret_file=open(path,'r')
                        ret_val=ret_file.read()
                        ret_file.close()
                        return int(ret_val)
                except:
                        print("read file error")
                        self.exit(signal.SIGUSR1)

        def simple_exit(self,sig,*frame):
                sys.exit(0)

        def force_stop(self,pid):
                if pid:print('AMDTempd: Daemon refused to exit cleanly, killing PID:%s with SIGKILL and cleaning up'%pid)
                try: os.remove(self.pid_filename)
                except: pass
                if pid:
                        print ('AMDTempd: %s'%os.system('/bin/kill -SIGKILL %s'%pid))
                else:
                        os.system('ps aux|sed -n "/python %s start/p"|awk \'{print $2}\'|xargs /bin/kill -SIGKILL >/dev/null 2>&1'%(sys.argv[0].replace('/','\/')))
                sys.exit(0)

        def stop(self):
                pid=0
                try:
                        pid=self.read_file(self.pid_filename)
                        os.remove(self.pid_filename)
                except:
                        self.force_stop(pid)
                os.system('/bin/kill -SIGUSR1 %s'%pid)
                timer=60
                while timer > 0 and not os.system('ps -A|grep -qw "%s"'%pid):
                        time.sleep(0.1)
                        timer-=1
                if not os.system('ps -A|grep -q "%s"'%pid):self.force_stop(pid)
                sys.exit(0)

        def status(self):
                signal.signal(signal.SIGINT,self.simple_exit)
                try: interval=sys.argv[2]
                except:interval=0
                run=True
                while run:
                        if os.system('ps aux|grep -v grep 2>/dev/null|grep -q "python %s start"'%sys.argv[0]):
                                isRunning='Not running'
                        else:
                                isRunning='Yes, PID:%s'%self.read_file(self.pid_filename)
                        maxx=self.read_file(self.fan_speed_path)
                        curr=self.read_file(self.fan_rpm_path)
                        temp=self.read_file(self.gpu_temp_path)
                        mode=self.read_file(self.fan_mode_path)
                        print('###############################')
                        print(' Running      : %s'%isRunning)
                        print(' Temp         : %s°C'%int(temp/1000))
                        print(' Current RPM  : %s'%curr)
                        print(' Current Fan  : %s %s%%'%(maxx,int(curr/35)))
                        print(' Current Mode : %s'%self.modes[mode])
                        print('###############################')
                        time.sleep(int(interval))
                        run=interval

try:
        action=sys.argv[1]
        if action == 'start':
                main=daemon()
                if debug:
                        main.start()
                        sys.exit()
                fork_ret=os.fork()
                if fork_ret == 0:
                        main.start()
                else:
                        sys.exit(0)
        elif action == 'stop':
                main=daemon()
                main.stop()
        elif action == 'status':
                main=daemon()
                main.status()
        else:
                print('Usage: %s start|stop|status <interval (s)>'%sys.argv[0][sys.argv[0].rfind('/')+1:])
except IndexError:
        print('Usage: %s start|stop|status <interval (s)>'%sys.argv[0][sys.argv[0].rfind('/')+1:])
#endtry


*This lock happened using windows too, so it may be card specific, but the takeaway is - if it happens, power down and unplug the power to the PC, go make a cup of tea - afterwards turn it back on and it should work again. TBF this hasn't happened more than once in the last 2 years, where as it used to happen 1-2 times a week (depending on the game being played) so credit to AMD and wine/vulkan devs.
Back to top
View user's profile Send private message
der bastler
Apprentice
Apprentice


Joined: 13 Apr 2003
Posts: 257

PostPosted: Mon Feb 26, 2024 6:50 pm    Post subject: Reply with quote

NeddySeagoon wrote:
The rational may be of interest.


Indeed! Checked for PCIe 4.0 and changed to ASRock X570 S PG Riptide and Samsung 980 Pro 1 TB.

I'm not that hardcore when it comes to the build system, though, so 64 GB ought to be enough. :wink:
_________________
Tempus fugit.
@frank@troet.cafe
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Tue Feb 27, 2024 1:25 am    Post subject: Reply with quote

logrusx wrote:
der bastler wrote:


Quote:
I'd also advice against using cheap wireless cards, I've had a terrible experience with a Mediatek. Research well if the chosen model works reliably under Linux.


Good point. Seems to work:

https://forums.gentoo.org/viewtopic.php?p=6483150#6507317

I'll report back if the TL complies.


The post you've linked is about atheros chip, I searched but couldn't find what chip the TL card uses. I doubt it's atheros as TL produce their own chips AFAIK.

The problem I have with cheap chips is they take shortcuts and often end up not quite fully compliant with the specs, resulting in loss of packages, which was my struggle with the Mediatek, which is my struggle with a Broadcom BT audio receiver chip and another BCM WiFi card from years ago. In other words I haven't had good experience with cheap chips and adapters. At all.

Best Regards,
Georgi


It looks like later revision of this card (v3) use Realtek chip. But what I see, 150 Mpbs seems a bit limitimg. You could well have faster connection to outside
Back to top
View user's profile Send private message
NichtDerHans
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2023
Posts: 131

PostPosted: Tue Feb 27, 2024 8:09 am    Post subject: Reply with quote

You can also buy a complete PC from Tuxedocomputers. Then you know it will at least run with the Ubuntu supplied. It will also work with Gentoo.

I have a laptop from that company.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Tue Feb 27, 2024 11:24 am    Post subject: Reply with quote

As Tuxedo is a germany originated, no idea how easy or cheap it is to get out of mainland europe.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Gentoopc
Apprentice
Apprentice


Joined: 25 Dec 2017
Posts: 296

PostPosted: Tue Feb 27, 2024 2:45 pm    Post subject: Re: New desktop PC Reply with quote

der bastler wrote:



Guys, let's be honest.... to live comfortably under Gentoo, knowledge alone is not enough, you also need good hardware. if you have the money
, then buy yourself a Threadripper PRO 7995WX or higher. and then you won't waste your precious time on a long program build. I suggested using CUDA kernels, but it was not approved by people. The rest of the equipment is just toys for children.
Back to top
View user's profile Send private message
der bastler
Apprentice
Apprentice


Joined: 13 Apr 2003
Posts: 257

PostPosted: Tue Feb 27, 2024 4:44 pm    Post subject: Reply with quote

dmpogo wrote:
It looks like later revision of this card (v3) use Realtek chip. But what I see, 150 Mpbs seems a bit limitimg. You could well have faster connection to outside


Ah, hardware revision hell. I remember those days, but experience made me think they're gone.

Changed that item to Intel Wi-Fi 6 Gig+ Desktop Kit.
_________________
Tempus fugit.
@frank@troet.cafe
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54252
Location: 56N 3W

PostPosted: Tue Feb 27, 2024 4:46 pm    Post subject: Reply with quote

Gentoopc,

Having been able to play on a 96 core box for a year or two, I wouldn't want to pay for that much parallel processing out of my own pocket.
Very few builds can get even 30 parallel makes going. So you use emerge --jobs=3 to try to keep the CPU busy.
When three out of firefox, thunderbird, libreoffice and chromium build concurrently, the poor wee thing ran out of RAM. It 'only' had 128G. :)

The take away from playing on the Cavium Thunder X2 was that 32 threads is the start of diminishing returns.

Quote:
All computer wait at the same speed
... to quote a tagline from newsnet and S@H classic.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
der bastler
Apprentice
Apprentice


Joined: 13 Apr 2003
Posts: 257

PostPosted: Tue Feb 27, 2024 4:59 pm    Post subject: Re: New desktop PC Reply with quote

Gentoopc wrote:
and then you won't waste your precious time on a long program build.


*chuckles*

My current flagship is a ThinkPad T480S, inferior to any modern Ryzen.

Build time falls into my suspend-to-bed phase, though.
_________________
Tempus fugit.
@frank@troet.cafe
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1538

PostPosted: Tue Feb 27, 2024 5:37 pm    Post subject: Re: New desktop PC Reply with quote

Gentoopc wrote:
der bastler wrote:



Guys, let's be honest.... to live comfortably under Gentoo, knowledge alone is not enough, you also need good hardware. if you have the money
, then buy yourself a Threadripper PRO 7995WX or higher. and then you won't waste your precious time on a long program build. I suggested using CUDA kernels, but it was not approved by people. The rest of the equipment is just toys for children.


Please, open your own thread for your ideas and let this one be. Don't try to hijack it.

Best Regards,
Georgi
Back to top
View user's profile Send private message
flysideways
Guru
Guru


Joined: 29 Jan 2005
Posts: 437

PostPosted: Wed Feb 28, 2024 3:24 pm    Post subject: Reply with quote

I'm curious why you have selected a mb without wifi and bluetooth onboard. That is all I've used for many years.

I haven't looked at wifi adapters in a long time. It's pretty interesting what is out there now, pcie and m2 devices. The m2 devices surprised me but I get it.

Oh, does one need an uber machine to use Gentoo? Not at all. I'm typing this from a Pi 5 with Gnome driving two 2560x1440 monitors while it's updating @world.
Back to top
View user's profile Send private message
der bastler
Apprentice
Apprentice


Joined: 13 Apr 2003
Posts: 257

PostPosted: Wed Feb 28, 2024 4:31 pm    Post subject: Reply with quote

flysideways wrote:
I'm curious why you have selected a mb without wifi and bluetooth onboard. That is all I've used for many years.

The (German) market tells me Cost(MB with WiFi) > Cost(MB) + Cost(Wifi).

Quote:
Oh, does one need an uber machine to use Gentoo? Not at all. I'm typing this from a Pi 5 with Gnome driving two 2560x1440 monitors while it's updating @world.

My FlightBox (highly mobile ADS-B receiver/flightrecorder with own web frontend) is based on a Raspberry Pi Zero running Gentoo...
_________________
Tempus fugit.
@frank@troet.cafe
Back to top
View user's profile Send private message
flysideways
Guru
Guru


Joined: 29 Jan 2005
Posts: 437

PostPosted: Thu Feb 29, 2024 6:56 pm    Post subject: Reply with quote

der bastler wrote:
flysideways wrote:
I'm curious why you have selected a mb without wifi and bluetooth onboard. That is all I've used for many years.

The (German) market tells me Cost(MB with WiFi) > Cost(MB) + Cost(Wifi).


I suspected pricing might have been a factor.

I haven't really looked at the available motherboards since my last build in 2020. The dedicated WiFi M2 slot and antennae bracket on the Asrock motherboard looks interesting. There appears to be quite a few M2 WiFi adapters to choose from too. The technical aspect of being able to select the WiFi/BlueTooth chip seems compelling in itself.

I didn't know there were motherboards so equipped, thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum