Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
ziasquinn
Jan 1, 2006

Fallen Rib
I agree with immersion learning.

But also don't be scared of a Linux reinstall. it takes like 15m at most.

Adbot
ADBOT LOVES YOU

spiritual bypass
Feb 19, 2008

Grimey Drawer
Reinstalling is also a lot less scary if you keep /home on its own partition or disk. This way, you can blast away the OS without losing files you care about

ziasquinn
Jan 1, 2006

Fallen Rib

spiritual bypass posted:

Reinstalling is also a lot less scary if you keep /home on its own partition or disk. This way, you can blast away the OS without losing files you care about

yeah definitely!!

buglord
Jul 31, 2010

Cheating at a raffle? I sentence you to 1 year in jail! No! Two years! Three! Four! Five years! Ah! Ah! Ah! Ah!

Buglord

buglord posted:

So I unplugged the HD Audio cable from the motherboard header and I got an interesting result. Like Voodoo Cafe said, not only does my computer boot way faster, but the errors are mostly gone?

I still get
code:
 hub 8-0:1.0 config failed, hub doesn't have any ports! (err -19)
But it only shows up for a second, by itself, instead of the parade of other errors that I ran into.

I can tolerate leaving my front panel audio disconnected, but removing all the front panel connectors (like the USB A, C ports) feels like a bridge too far.

I'm willing to live with this for now, but im curious:

Is there a way to tell Linux not to worry about the errors, and just boot the system?
Whatever errors it thinks are occuring are not actually impacting my system. My USB ports are working and such, audio on the front panel would work (before i just removed it). its kinda annoying that it slows down the boot process so much chasing a problem that isnt there.

So I was curious enough to see what happened if i unplugged all my motherboard header cables, then plugged them back in (because I would like front panel audio if I need it). I'm left with the 1 weird momentary error, but still have the benefit of *much faster* boot speed. So maybe I had something slightly plugged in the wrong way for some reason? I have no clue, but im considering this a victory because I'm much better than when I started off, before the problem got worse. i can live with this tiny wrinkle in an otherwise stable and gaming-worthy install of Kubuntu.

Thanks everyone :toot:

mila kunis
Jun 10, 2011

Klyith posted:

So I don't do this myself, I'm just going off the instructions and various reports that it can work. But for every 1 person that it works for there are 5 who have problems. Good luck!

Did you have other games previously that it did see? Were you able to install a game in Linux and have it work?

Only tried with one game installed in windows and it couldn't see it. I've been able to install a game in Linux and have it work fine. The dream would be that I could boot into either and play without having to download and save elden ring or whatever twice.

quote:


If the game has a native linux version, the linux-steam will ignore the windows-steam version, and you have to override it to use the windows version instead. (This is a useful thing to know for linux gaming in general. I feel like running the windows versions in proton generally work better than the native linux does.)

Also it might just be steam being picky about the appmanifest files. Try repair library? (Settings -> Storage -> ... -> Repair Library)



IIRC when I changed over from windows to linux I directly copied a number of steam games from my old windows partitions to my new linux setup and steam-linux picked them up ok. So steam-linux is definitely able to pick up installs created by steam-windows. But I only did that with a few games, and I wasn't dealing with a foreign filesystem. I moved the games from ntfs to ext4 because I said sayonara to windows.

Will try this, thanks!

Kivi
Aug 1, 2006
I care
Shoud I be worried of these sort of errors on my dmesg:

code:
 traps: rasdaemon[10900] trap stack segment ip:72178ca41108 sp:721584ff7a30 error:0
 traps: rasdaemon[11269] trap stack segment ip:79456d1a8108 sp:7941bbff5a30 error:0 in libsqlite3.so.0.8.6[79456d0e4000+f7000]
 traps: rasdaemon[11623] trap stack segment ip:70b706063108 sp:70b5eaffba30 error:0 in libsqlite3.so.0.8.6[70b705f9f000+f7000]
 rasdaemon[12406]: segfault at 21 ip 000073be27c12a42 sp 000073ba96ffb9f0 error 6 likely on CPU 12 (core 16, socket 0)
I'm getting these all the time, I've tried reinstalling the library but alas, no change in behaviour.

Less Fat Luke
May 23, 2003

Exciting Lemon
Hm kinda seems like rasdaemon itself is crashing using it's own database; I would probably stop the daemon (systemctl stop rasdaemon) and clear out the db; on Debian it's /var/lib/rasdaemon/ras-mc_event.db and then start it again (systemctl start rasdaemon).

Kivi
Aug 1, 2006
I care

Less Fat Luke posted:

Hm kinda seems like rasdaemon itself is crashing using it's own database; I would probably stop the daemon (systemctl stop rasdaemon) and clear out the db; on Debian it's /var/lib/rasdaemon/ras-mc_event.db and then start it again (systemctl start rasdaemon).
Did that and upon start of the rasdaemon it does reproduce the errors right away:

code:
[23713.033812] traps: rasdaemon[248479] trap stack segment ip:7e98d8bde108 sp:7e9573ffda30 error:0
[23716.087080] traps: rasdaemon[248776] trap stack segment ip:783e19396108 sp:783a18ff7a30 error:0
[23716.087088] traps: rasdaemon[248720] trap stack segment ip:783e19396108 sp:783b177fca30 error:0
[23716.087090]  in libsqlite3.so.0.8.6[783e192d2000+f7000]
[23716.087094]  in libsqlite3.so.0.8.6[783e192d2000+f7000]
[23719.087411] traps: rasdaemon[248852] trap stack segment ip:73b34584660f sp:73b295ff9a10 error:0 in libsqlite3.so.0.8.6[73b345771000+f7000]

Less Fat Luke
May 23, 2003

Exciting Lemon
Pretty weird, what distribution? I would probably reboot and force a filesystem check and maybe run memtest for a few passes.

Kivi
Aug 1, 2006
I care
It’s just regular Ubuntu 23.10 box. I’ll reboot as soon as zfs scrub finishes and have it check the ext4 root partition.

E: nope, still errors after clean reboot & fsck; namely when I do service rasdaemon restart

code:
[  234.109548] traps: rasdaemon[11681] trap stack segment ip:763550617108 sp:76330effba30 error:0 in libsqlite3.so.0.8.6[763550553000+f7000]
[  237.206793] traps: rasdaemon[11922] trap stack segment ip:767971cd4108 sp:7677677fca30 error:0
[  240.276193] traps: rasdaemon[12227] trap stack segment ip:7e097ea68108 sp:7e06aa7faa30 error:0 in libsqlite3.so.0.8.6[7e097e9a4000+f7000]
[  240.276255] rasdaemon[12145]: segfault at 21 ip 00007e097ea1fa42 sp 00007e08157f89f0 error 6 in libsqlite3.so.0.8.6[7e097e9a4000+f7000] likely on CPU 37 (core 17, socket 0)
[  240.276274] Code: 0f b7 80 b6 01 00 00 c3 b8 80 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 53 48 89 fb e8 a7 ff ff ff 89 c2 48 8b 83 18 03 00 00 <01> 10 5b c3 66 2e 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 8d 05 85

Kivi fucked around with this message at 18:07 on Mar 10, 2024

Klyith
Aug 3, 2007

GBS Pledge Week

Kivi posted:

[ 240.276255] rasdaemon[12145]: segfault at 21 ip 00007e097ea1fa42 sp 00007e08157f89f0 error 6 in libsqlite3.so.0.8.6[7e097e9a4000+f7000] likely on CPU 37 (core 17, socket 0)

Do you actually have a bigass CPU in there? One thing that comes up on google is an old (2022) kernel bug about something that would make rasdeamon try to access more CPUs than actually existed. And that would crash the system.

And the kernel bug ends with "Success! Now rasdaemon is segfaulting, but that`s hardly a kernel problem."

(lmao)

Kivi
Aug 1, 2006
I care

Klyith posted:

Do you actually have a bigass CPU in there? One thing that comes up on google is an old (2022) kernel bug about something that would make rasdeamon try to access more CPUs than actually existed. And that would crash the system.

And the kernel bug ends with "Success! Now rasdaemon is segfaulting, but that`s hardly a kernel problem."

(lmao)
24 cores and 48 threads so yeah. :ms:

Less Fat Luke
May 23, 2003

Exciting Lemon
I'm using it on a 32 core Threadripper with no issue so I don't think it's just simply "too many cores"

mila kunis
Jun 10, 2011
Is updating my linux kernel to the latest from the one that came installed with my distro a bad idea? Saw someone out there suggest updating it might give a performance boost with my hardware.

pseudorandom name
May 6, 2007

It's the kind of nerdy thing a bored teenager with infinite free time does, your distro should already be supplying you with a recent kernel unless you're on some kind of LTS release.

spiritual bypass
Feb 19, 2008

Grimey Drawer
It is so, so rare that kernel performance increases are noticeable in the real world. Are you having specific performance problems?

Most of the time, you get a new kernel by upgrading your packages and it's no big deal.

xzzy
Mar 5, 2009

Most distros are built around the assumption that you're using the kernel they built for you and poo poo can blow up badly if you try to work around it. Assuming you get it working, the next package updates (even non kernel related) are very likely going to cause headache.

mila kunis
Jun 10, 2011

spiritual bypass posted:

It is so, so rare that kernel performance increases are noticeable in the real world. Are you having specific performance problems?

Most of the time, you get a new kernel by upgrading your packages and it's no big deal.

Battery consumption seems really high so I'm trying to see if it can be better. I've also seen recommendations for tools like TLP, power-profile-daemon and the like - any recommendations for an AMD laptop?

Volguus
Mar 3, 2009
Updating the kernel if it's offered in the packages updates of your distro is perfectly fine. If it isn't available and you want something newer, take a look at the testing repos of your distro to see if they're available there.

hifi
Jul 25, 2012

mila kunis posted:

Battery consumption seems really high so I'm trying to see if it can be better. I've also seen recommendations for tools like TLP, power-profile-daemon and the like - any recommendations for an AMD laptop?

I used the powercap settings exposed by the kernel for an intel laptop for a while. Current laptops have super high burstable power limits but Imo they just end up burning a lot of that power into heat, especially when the AC configured limits don't expect you to have the laptop charging on your lap.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

mila kunis posted:

Battery consumption seems really high so I'm trying to see if it can be better. I've also seen recommendations for tools like TLP, power-profile-daemon and the like - any recommendations for an AMD laptop?

I've heard good things about tuned (replaces power-profile-daemon) but usually followed by the caveat that you should use a custom profile, and with that name it is infuriatingly hard to Google useful examples.

Kivi
Aug 1, 2006
I care

Less Fat Luke posted:

I'm using it on a 32 core Threadripper with no issue so I don't think it's just simply "too many cores"
How many CPUs does your system list underneath /sys/kernel/tracing/per_cpu/cpu? Mine goes to 255.

On the kernel lore posting,

quote:

> Just figured out something, the poll() errors starting at fd 29 (which
> is CPU 24).
> But I only have 24 cores. Looked at
> /sys/kernel/debug/tracing/instances/rasdaemon/per_cpu/, and voila, it
> lists 32 cpus not 24.

Ah, and this explains why I never triggered it. There's some machines
that list nr_cpu_ids as more than what exists (I guess it is "possible
CPUs" and not "actual CPUs").

Less Fat Luke
May 23, 2003

Exciting Lemon
64 entries there. What's the processor model you're using?

Kivi
Aug 1, 2006
I care

Less Fat Luke posted:

64 entries there. What's the processor model you're using?
Epyc 7443P

acetcx
Jul 21, 2011
I bought a system76 pangolin laptop a year ago and it arrived with a defective keyboard - pressing anywhere near the print screen key caused that key to register. And by "anywhere near" I mean -, +, backspace, or just the frame itself. I ended up getting an RMA and the new one worked fine.

Until a couple days ago that is. Now the trackpad has suddenly turned into a jittery insensitive piece of junk. It was never great mind you but now it's borderline unusable. I did some searching and it looks like this is a fairly common hardware problem, suggested solutions include blasting it with a hair dryer which I'm not too excited about.

I really wanted to support a pro-Linux manufacturer but ehhh this experience hasn't been great. I'm just going to replace it with a macbook (I had one years ago and the hardware was fantastic) and I'd definitely think twice about ordering anything from them again until I hear their track record has improved.

keep punching joe
Jan 22, 2006

Die Satan!
I thought it was still basically mandatory to buy an old thinkpad if you want to run Linux on a laptop.

acetcx
Jul 21, 2011

keep punching joe posted:

I thought it was still basically mandatory to buy an old thinkpad if you want to run Linux on a laptop.

Yeah almost certainly.

Before the pangolin I was running Linux on a dell xps 13 and it worked okay... but it never slept properly and would burn through like 6% battery/hour even with the lid closed. I've heard it works fine on thinkpads and MAYBE on frameworks? Regardless I just want a laptop that works and I'm not a hardcore enough Linux zealot to pursue it further. I'll content myself with Linux on my desktop (this is the year!!!) and homelab servers.

Mantle
May 15, 2004

My AMD Framework burns about 1% battery per hour sleeping. Not great, but it's ok if I intend to use it the next day and also since it charges quite quickly.

I want to switch over to making it hibernate instead of sleep but it's a big pain for me to repartition and configure the button and lid close triggers.

Klyith
Aug 3, 2007

GBS Pledge Week

acetcx posted:

I bought a system76 pangolin laptop a year ago and it arrived with a defective keyboard - pressing anywhere near the print screen key caused that key to register. And by "anywhere near" I mean -, +, backspace, or just the frame itself. I ended up getting an RMA and the new one worked fine.

Until a couple days ago that is. Now the trackpad has suddenly turned into a jittery insensitive piece of junk. It was never great mind you but now it's borderline unusable. I did some searching and it looks like this is a fairly common hardware problem, suggested solutions include blasting it with a hair dryer which I'm not too excited about.

I really wanted to support a pro-Linux manufacturer but ehhh this experience hasn't been great.

My housemate has a system76 laptop they got 2nd-hand. The keyboard on that is flaky too, and it's a totally different & much older model.

OTOH system 76 was incredibly good about answering questions & support long after the warranty expired. One of the fan units died and we contacted their support asking if we could buy a replacement. The model was old enough that they didn't have parts, but they gave us exact part numbers for everything and pointed to places on ali express etc that still carried stuff.

So yeah some ups and downs.

(My housemate uses Windows on it, and amusingly the hibernation doesn't work properly.)



Mantle posted:

I want to switch over to making it hibernate instead of sleep but it's a big pain for me to repartition and configure the button and lid close triggers.

Apparently you can do hibernate with a swapfile instead of swap partitions if you do some fiddling.

keep punching joe
Jan 22, 2006

Die Satan!
Do System 76 build their own laptops or are they just rebranded Clevo devices?

hifi
Jul 25, 2012

Early modern suspend laptops were all kind of crap in that regard imo, even if you were using windows.

Nitrousoxide
May 30, 2011

do not buy a oneplus phone



Macs with their M1,2,3 etc are the only ones that get suspend right.

ExcessBLarg!
Sep 1, 2001

keep punching joe posted:

I thought it was still basically mandatory to buy an old thinkpad if you want to run Linux on a laptop.
For a while Dell was selling "Developer Edition" XPS models with Ubuntu preinstalled. From my limited experience with them Ubuntu worked fine on the regular ones too.

I've been using Chromebooks as my "Linux" laptop of choice for the past decade and although there is an entirely different set of janitorial issues with them, you can be sure you'll always have at least a fully functional web browser and terminal available, which is 90% of my work anyways.

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!
Lenovo offer Linux pre installed also.

neurotech
Apr 22, 2004

Deep in my dreams and I still hear her callin'
If you're alone, I'll come home.

I'm trying to learn how to best write shell scripts. I have the following script for downloading YouTube videos as MP3 and injecting them with metadata + cover art:

code:
#!/bin/bash

yt-dlp \
    --windows-filenames \
    -x \
    --audio-format mp3 \
    --audio-quality 0 \
    --embed-metadata \
    --embed-thumbnail \
    --convert-thumbnails png \
    --exec-before-download "ffmpeg -i %(thumbnails.-1.filepath)q -vf crop=\"'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'\" _%(thumbnails.-1.filepath)q" \
    --exec-before-download "rm %(thumbnails.-1.filepath)q" \
    --exec-before-download "mv _%(thumbnails.-1.filepath)q %(thumbnails.-1.filepath)q" \
    $1

$SHELL
I have it aliased in my .bashrc as this:
code:
alias music='exec /home/hovercastle/tools/scripts/music.sh'
When I try to chain multiple executions of this alias:
pre:
music url1 && music url2
it only runs the first one. What am I missing here?

Volguus
Mar 3, 2009

neurotech posted:

I'm trying to learn how to best write shell scripts. I have the following script for downloading YouTube videos as MP3 and injecting them with metadata + cover art:

code:
#!/bin/bash

yt-dlp \
    --windows-filenames \
    -x \
    --audio-format mp3 \
    --audio-quality 0 \
    --embed-metadata \
    --embed-thumbnail \
    --convert-thumbnails png \
    --exec-before-download "ffmpeg -i %(thumbnails.-1.filepath)q -vf crop=\"'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'\" _%(thumbnails.-1.filepath)q" \
    --exec-before-download "rm %(thumbnails.-1.filepath)q" \
    --exec-before-download "mv _%(thumbnails.-1.filepath)q %(thumbnails.-1.filepath)q" \
    $1

$SHELL
I have it aliased in my .bashrc as this:
code:
alias music='exec /home/hovercastle/tools/scripts/music.sh'
When I try to chain multiple executions of this alias:
pre:
music url1 && music url2
it only runs the first one. What am I missing here?

Exec is replacing the current process, which in this case is bash, (just like the exec call) with the new one. While I honestly have no idea what happens when you chain multiple exec calls (never occurred to me to try such a thing, I should experiment with this new found idea) this is most definitely the culprit. Just make your script executable (chmod u+x) and remove the exec in the alias and you should be golden.

Volguus fucked around with this message at 01:50 on Mar 12, 2024

hifi
Jul 25, 2012

If it only runs the first one then it's returning something other than zero; '&&' is a logical AND, so if the first one is false then there's no way the entire statement can be anything other than false.

So, is yt-dlp returning an error? why do you have the $SHELL at the end there? etc

Also just a tip, if you have a folder full of scripts you can just add it to your path instead of individual aliases for everything

pseudorandom name
May 6, 2007

Also you don't need a shell alias, ~/bin and ~/.local/bin are probably already in your path.

neurotech
Apr 22, 2004

Deep in my dreams and I still hear her callin'
If you're alone, I'll come home.

Thanks for those replies, that is a huge help.

hifi posted:

So, is yt-dlp returning an error? why do you have the $SHELL at the end there? etc
AFAICT yt-dlp is not returning any errors.
Adding $SHELL to the end is (supposedly) to ensure the script doesn't kill my shell and drop my ssh connection. At least that's what superuser says haha

pseudorandom name posted:

Also you don't need a shell alias, ~/bin and ~/.local/bin are probably already in your path.
Where should I be putting scripts like this ideally?

Volguus posted:

Just make your script executable (chmod u+x) and remove the exec in the alias and you should be golden.
What does chmod u+x do? I normally just do chmod +x

Adbot
ADBOT LOVES YOU

Klyith
Aug 3, 2007

GBS Pledge Week

neurotech posted:

What does chmod u+x do? I normally just do chmod +x

+x only for the owning user rather than everyone

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply