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
BrainDance
May 8, 2007

Disco all night long!

waffle iron posted:

Try running your curl command with --verbose and giving us the complete output. Be sure to redact your personal IP address, because it will print it a bunch.

I am so late to this because I had to very suddenly move, it was a whole pain, and I'm realizing to fix it after seeing the output of this I'm probably gonna have to go back and explain everything I did to route some things to the no-VPN NIC and others to the NIC that does go through the VPN.

Here is the output though
code:
$ curl --interface enp3s0 --verbose "https://api.ipify.org"
* Host api.ipify.org:443 was resolved.
* IPv6: (none)
* IPv4: 172.67.74.152, 104.26.13.205, 104.26.12.205
*   Trying 172.67.74.152:443...
* socket successfully bound to interface 'enp3s0'
* connect to 172.67.74.152 port 443 from 192.168.50.98 port 46918 failed: No route to host
*   Trying 104.26.13.205:443...
* socket successfully bound to interface 'enp3s0'
* connect to 104.26.13.205 port 443 from 192.168.50.98 port 55128 failed: No route to host
*   Trying 104.26.12.205:443...
* socket successfully bound to interface 'enp3s0'
* connect to 104.26.12.205 port 443 from 192.168.50.98 port 52700 failed: No route to host
* Failed to connect to api.ipify.org port 443 after 9430 ms: Couldn't connect to server
* Closing connection
curl: (7) Failed to connect to api.ipify.org port 443 after 9430 ms: Couldn't connect to server
But I don't get it, ok it's not routed right, then why does my jellyfin server that goes through enp3s0 too work perfectly? Why do all my torrents working perfectly?

Adbot
ADBOT LOVES YOU

Woolie Wool
Jun 2, 2006


Another CRT issue I've had: a complete or nearly complete set of video modes for my CRT is available under KDE/X11, and I usually set it to 1600x1200@70 for desktop use. However, 1600x1200 is not available at all under KDE/Wayland (the resolutions go up to 1920x1080, as if it were a cheap LCD), and resolutions over 1024x768 are locked to 60 Hz. Even then, lower resolutions have severely limited refresh rates--1024x768 goes up to 75 Hz under KDE/Wayland but 120 Hz on X11. I have seen some pages on how to force Linux to enable specific video modes but they appear to involve GRUB configuration and kernel parameters, and for all I know the compositor could just ignore them. Is there any other way?

E: I am using it with a 13W3 to VGA adapter daisy chained into a VGA to DP adapter

Woolie Wool fucked around with this message at 07:00 on Mar 17, 2024

Klyith
Aug 3, 2007

GBS Pledge Week

Woolie Wool posted:

I have seen some pages on how to force Linux to enable specific video modes but they appear to involve GRUB configuration and kernel parameters, and for all I know the compositor could just ignore them. Is there any other way?

E: I am using it with a 13W3 to VGA adapter daisy chained into a VGA to DP adapter

There is another way, but it's to generate a fake EDID and force the kernel to use that, and sounds like even more of a pain.

(Secret third way: buy & return VGA adapters until you find one that passes the EDID of the CRT monitor while also not causing new problems.)


The root of the problem is that, when connected through a VGA adapter, you aren't getting EDID which is how the monitor tells the PC what specs it can run. So the OS just presents a bunch of default "safe" resolutions and the basic 60hz refresh. On Xorg you can override that easily. On Windows you generally use video drivers to add custom resolutions and then the driver passes those to the OS as "approved" modes.

On wayland, KWin and Mutter (gnome) don't have the ability to override modes. Sway does, because sway is made by people who want that type of hyper control.

Tankakern
Jul 25, 2007

it's not _that_ hard to add the modes using custom edid, don't make it sound like a moon landing

https://wiki.archlinux.org/title/kernel_mode_setting#Forcing_modes_and_EDID

Woolie Wool
Jun 2, 2006


Klyith posted:

On wayland, KWin and Mutter (gnome) don't have the ability to override modes. Sway does, because sway is made by people who want that type of hyper control.

This is exactly the sort of poo poo I went to Linux to get away from. FFS, even Windows lets me define a custom video mode, at least until the nVidia control panel gets broken in the next round of enshittification.

:ohdear: We can't have users making custom video modes, they might type in the wwong numbies and get a bwack scween! They'll be scawed!

Reading up on EDIDs this looks like it's going to be really annoying. Do I have to download the kernel source?

mila kunis
Jun 10, 2011

mila kunis posted:

The option to change this is disabled on the latest BIOS versions. I've seen people suggesting flashing older versions of your BIOS to be able to access the old functionality to change this, but I've also seen people saying this is a potentially bad idea, as its possible that newer hardware/firmware simply won't support S3 sleep.

Unfortunately it seems that people have to just live with S0 sleep going forward thanks to horrible decisions from intel/microsoft/whoever. Personally I think computers should just sleep when told to sleep instead of whatever this new mode is doing.

After some digging around, I found debug tools that will help identify what specifically might be causing issues during S0 sleep.

For AMD: https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
For intel: https://github.com/intel/S0ixSelftestTool

In my case, it told me to update the firmware for my wifi card (from here: https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware)

Doing this seems to have worked somewhat, the battery drain is a lot less from my test over a couple of hours. I'll see how it does tonight when I shut it off overnight.

Ultimately I think you're right, I'll probably try and set it to 'sleep after shutting the lid, then hibernate after an hour' or something to save the most battery.

However - I tried setting up hibernate today, but found it was disabled, and the only way to enable it would be to disable Secure Boot. Is this a bad idea?

Well this fixed it for a while but its regressed for (??) reasons.

I'm on the verge of giving up and going back to a mac. I close my company-provided macbook at 100% battery, its at 99% when I open it up in the morning. I close this linux thinkpad at 100% and its at 50% in the morning. I've been banging my head against this for a month now.

It's a shame that hardware issues continually let me down when I try out linux because in all other respects the experience is a lot nicer, I infinitely prefer KDE to the macOS UI, hate mac keyboards so prefer different laptops, other stuff like terminals are better by default.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

mila kunis posted:

Well this fixed it for a while but its regressed for (??) reasons.

I'm on the verge of giving up and going back to a mac. I close my company-provided macbook at 100% battery, its at 99% when I open it up in the morning. I close this linux thinkpad at 100% and its at 50% in the morning. I've been banging my head against this for a month now.

It's a shame that hardware issues continually let me down when I try out linux because in all other respects the experience is a lot nicer, I infinitely prefer KDE to the macOS UI, hate mac keyboards so prefer different laptops, other stuff like terminals are better by default.

There are laptops that have better Linux support, if you want to try that again. Frameworks have had some power management issues with Linux (I think partly related to the USB firmware, but those modules are removable) but not as bad as you’re seeing; more like 10% a day IIRC from mine. System 76 is an all-Linux vendor that uses well-supported hardware that reportedly has great battery life.

Klyith
Aug 3, 2007

GBS Pledge Week

Woolie Wool posted:

This is exactly the sort of poo poo I went to Linux to get away from. FFS, even Windows lets me define a custom video mode, at least until the nVidia control panel gets broken in the next round of enshittification.

:ohdear: We can't have users making custom video modes, they might type in the wwong numbies and get a bwack scween! They'll be scawed!

Nah, at least for KDE it's more like "sorry we haven't made that function yet". This isn't something that's part of the Wayland protocol or spec, so it's kinda up to each of the compositors to implement it or not. But wishlists don't happen until someone who cares writes the code, and these days it is a very small niche.

(I'm assuming you don't want to stick with Xorg because you have a different set of problems from it?)


Woolie Wool posted:

Reading up on EDIDs this looks like it's going to be really annoying. Do I have to download the kernel source?

No, you def don't need to download the kernel source.

Do you need to change resolution on the CRT? If not, these instructions should work equally well for KDE as gnome -- it's setting a rez and refresh for the DRM (Direct Rendering Manager). Skip over the bits in that blog about parsing the EDID, you don't have a useful EDID to parse. You are just setting an option in the kernel parameters. It's the same thing as launch options for a normal program, but you put it in GRUB config.

code:
/etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="your current kernel parameters"
and you add "video=OUTPUT:800x600@100" or whatever, where OUTPUT is whichever output device name you found.

Then sudo grub-mkconfig -o /boot/grub/grub.cfg to regen your GRUB config, reboot, and the CRT should be set.


If you want to have multiple CRT rez & refresh options you need to create a custom EDID file. Then use a launch option to force that EDID to be associated with an output. You still don't need the kernel source, but generating an EDID from scratch seems like a PITA. on reddits people say that the windows program Custom Resolution Utility can export EDIDs, that might be the easiest option.

Woolie Wool
Jun 2, 2006


Yeah I'll definitely have to look into generating an EDID because changing resolutions on the fly is one of the main reasons to even have a CRT at all.

Of course this wouldn't have been necessary if video card makers didn't delete the RAMDAC and VGA ports from their cards :arghfist::corsair:

Mantle
May 15, 2004

Subjunctive posted:

There are laptops that have better Linux support, if you want to try that again. Frameworks have had some power management issues with Linux (I think partly related to the USB firmware, but those modules are removable) but not as bad as you’re seeing; more like 10% a day IIRC from mine. System 76 is an all-Linux vendor that uses well-supported hardware that reportedly has great battery life.

I get approximately 1% battery loss per sleep-hour on my AMD Framework 13 running Fedora 39 with Sway. I leave 2 x USB C, 1 x USB A and 1 x HDMI modules in it overnight. 1% per hour loss is not the best efficiency, but it's ok if I plan to use the computer the next day.

Another thing that makes it bearable is that the computer charges really fast from a charger this small: https://www.amazon.ca/Anker-Charger-Compact-Foldable-MacBook/dp/B09C5RG6KV/ref=sr_1_5
It can also trickle charge off my 18W Pixel charger or 20W iPad charger if I want to go even smaller or lighter.

Overall I get around 6 hours of video watching or 9 hours of light use.

This is my first real committed desktop Linux experiment and I'm rather pleased with the frequency of bug fixes. In the 5 months that I've had it it's noticeably become better and better to use.

Well Played Mauer
Jun 1, 2003

We'll always have Cabo
Switching my thinkpad to Linux sleep mode in the bios made a huge difference for me. I lose about 7-10% per night which isn’t great but for picking up and putting it down throughout the day is fine. I can’t compare to windows on this specific machine but I don’t remember much better sleep performance on windows 11 on a laptop once I account for battery size.

I also grabbed powertop and let it do its thing and it basically brought my battery life up to what I’d expect from windows. I don’t expect Mac power management because, well, Apple makes the best laptops and can tailor their os to them so they get even better power management out of them.

mila kunis
Jun 10, 2011

Well Played Mauer posted:

Switching my thinkpad to Linux sleep mode in the bios made a huge difference for me. I lose about 7-10% per night which isn’t great but for picking up and putting it down throughout the day is fine. I can’t compare to windows on this specific machine but I don’t remember much better sleep performance on windows 11 on a laptop once I account for battery size.

I also grabbed powertop and let it do its thing and it basically brought my battery life up to what I’d expect from windows. I don’t expect Mac power management because, well, Apple makes the best laptops and can tailor their os to them so they get even better power management out of them.

They disabled "linux" sleep mode (S3 or suspend to ram) in the bios for the recent thinkpad models. I've been told it's being phased out and that it's a bad idea to flash in an older version of the BIOS to try to enable it.

ihafarm
Aug 12, 2004

BrainDance posted:

I am so late to this because I had to very suddenly move, it was a whole pain, and I'm realizing to fix it after seeing the output of this I'm probably gonna have to go back and explain everything I did to route some things to the no-VPN NIC and others to the NIC that does go through the VPN.

Here is the output though
code:
$ curl --interface enp3s0 --verbose "https://api.ipify.org"
* Host api.ipify.org:443 was resolved.
* IPv6: (none)
* IPv4: 172.67.74.152, 104.26.13.205, 104.26.12.205
*   Trying 172.67.74.152:443...
* socket successfully bound to interface 'enp3s0'
* connect to 172.67.74.152 port 443 from 192.168.50.98 port 46918 failed: No route to host
*   Trying 104.26.13.205:443...
* socket successfully bound to interface 'enp3s0'
* connect to 104.26.13.205 port 443 from 192.168.50.98 port 55128 failed: No route to host
*   Trying 104.26.12.205:443...
* socket successfully bound to interface 'enp3s0'
* connect to 104.26.12.205 port 443 from 192.168.50.98 port 52700 failed: No route to host
* Failed to connect to api.ipify.org port 443 after 9430 ms: Couldn't connect to server
* Closing connection
curl: (7) Failed to connect to api.ipify.org port 443 after 9430 ms: Couldn't connect to server
But I don't get it, ok it's not routed right, then why does my jellyfin server that goes through enp3s0 too work perfectly? Why do all my torrents working perfectly?

Traceroute? And, dump your routing table; do you have multiple default gateways?

Kibner
Oct 21, 2008

Acguy Supremacy
How/where do I configure a PoliciKit policy on Fedora Sericea? I am getting this error when trying to redirect a USB device to a Win11 VM via virt-manager:

code:
Error setting USB device node ACL: 'Error PoliciKit error: GDBuss.Error:org.feedesktop.PolicyKit1.Error.Failed: Action org.spice-spacelowlevelusbaccess is not registered' (0)
I am unable to really find good documentation on this. If I could at least find that, I might be able to figure the rest out on my own.

pseudorandom name
May 6, 2007

You probably need to install spice-glib, but how that is accomplished within the Sericea bonghits is an exercise for the reader.

BrainDance
May 8, 2007

Disco all night long!

ihafarm posted:

Traceroute? And, dump your routing table; do you have multiple default gateways?

So it seems to work,
code:
$ sudo traceroute -s 192.168.50.98 api.ipify.org
traceroute to api.ipify.org (104.26.13.205), 30 hops max, 60 byte packets
 1  MyRouter(192.168.50.1)  0.112 ms  0.130 ms  0.150 ms
 2  MYISPStuffIGuess4.334 ms  4.639 ms  4.662 ms
 3  MoreISPStuff  2.870 ms  3.164 ms hn.kd.pix (219.155.45.153)  2.326 ms
 4  pc73.zz.ha.cn (61.168.28.73)  4.206 ms pc149.zz.ha.cn (61.168.26.149)  27.557 ms pc65.zz.ha.cn (61.168.28.65)  14.957 ms
 5  219.158.105.133 (219.158.105.133)  27.796 ms *  27.090 ms
 6  219.158.8.114 (219.158.8.114)  36.483 ms 219.158.103.42 (219.158.103.42)  30.997 ms 219.158.8.122 (219.158.8.122)  34.145 ms
 7  219.158.97.29 (219.158.97.29)  38.311 ms  29.455 ms  36.970 ms
 8  219.158.10.62 (219.158.10.62)  39.454 ms  38.402 ms  43.894 ms
 9  202.77.23.30 (202.77.23.30)  33.768 ms  38.322 ms  35.869 ms
10  * * *
11  172.71.208.2 (172.71.208.2)  69.613 ms 172.71.212.2 (172.71.212.2)  68.195 ms 103.22.203.231 (103.22.203.231)  71.751 ms
12  104.26.13.205 (104.26.13.205)  66.854 ms  66.841 ms  68.120 ms
With the one that goes through the VPN, even though that's not what I'm trying to use here (and this one does in fact work with curl. It's just not useful to me since that of course returns my VPN's IP)
code:
$ sudo traceroute api.ipify.org
traceroute to api.ipify.org (172.67.74.152), 30 hops max, 60 byte packets
 1  MyRouter(192.168.50.1)  0.091 ms  0.124 ms  0.165 ms
 2  MyVPN  248.176 ms  248.119 ms  248.016 ms
 3  38.86.135.1 (38.86.135.1)  248.158 ms  248.197 ms  248.237 ms
 4  * * *
 5  be2213.ccr41.dca01.atlas.cogentco.com (154.54.6.241)  248.304 ms be2231.ccr42.dca01.atlas.cogentco.com (154.54.83.69)  248.238 ms be2213.ccr41.dca01.atlas.cogentco.com (154.54.6.241)  248.237 ms
 6  be2406.ccr42.iad02.atlas.cogentco.com (154.54.85.210)  248.320 ms be4008.ccr42.iad02.atlas.cogentco.com (154.54.87.146)  247.254 ms  247.765 ms
 7  38.32.185.178 (38.32.185.178)  248.743 ms 38.88.214.142 (38.88.214.142)  246.201 ms *
 8  172.70.36.5 (172.70.36.5)  246.135 ms 172.70.172.2 (172.70.172.2)  246.232 ms 172.70.36.3 (172.70.36.3)  246.165 ms
 9  172.67.74.152 (172.67.74.152)  245.737 ms  245.826 ms  246.011 ms
And as far as I can tell I only have 1 default gateway.

code:
$ ip route show
default via 192.168.50.1 dev enp4s0 proto dhcp src 192.168.50.249 metric 100 
192.168.50.0/24 dev enp3s0 proto kernel scope link src 192.168.50.98 
192.168.50.0/24 dev enp4s0 proto kernel scope link src 192.168.50.249 metric 100
192.168.50.98 is the No-VPN one, the one I'm trying to use for curl here

/etc/network/interfaces is
code:
source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The 2nd NIC
auto enp3s0
iface enp3s0 inet static
    address 192.168.50.98
    netmask 255.255.255.0
#    gateway 192.168.50.1
I have gateway commented out because when I didn't I remember it didn't work

And I think all the rest was to get the jellyfin server to use the no-VPN NIC all the time, not anything to do with curl using it when told to use it.
But it was stuff like:
sudo iptables -t mangle -A OUTPUT -p tcp --dport 8896 -j MARK --set-mark 1
sudo iptables -t mangle -A OUTPUT -p udp --dport 8896 -j MARK --set-mark 1

added 100 jellyfin to /etc/iproute2/rt_tables

And then some more that I have to keep digging in here to remember. drat, I should documented all this when I was doing it.

mila kunis
Jun 10, 2011

mila kunis posted:

Well this fixed it for a while but its regressed for (??) reasons.

I'm on the verge of giving up and going back to a mac. I close my company-provided macbook at 100% battery, its at 99% when I open it up in the morning. I close this linux thinkpad at 100% and its at 50% in the morning. I've been banging my head against this for a month now.

It's a shame that hardware issues continually let me down when I try out linux because in all other respects the experience is a lot nicer, I infinitely prefer KDE to the macOS UI, hate mac keyboards so prefer different laptops, other stuff like terminals are better by default.

Okay well, I tried a hail mary and it worked. After digging around I found posts from AMD engineers suggesting that the newer linux kernels had fixed a bunch of issues. Unfortunately kubuntu was limited to a kernel before the fix, and from what I read its a bad idea to install a kernel your distro doesn't support.

I installed arch linux because I heard its supposed to be the "bleeding edge" distro, and voila. Shut the laptop at 100%, and it was only 97% 8 hours later.

So I guess the solution was "install arch"? I'll see if this sticks, I didn't have any browsers or anything running at all when I shut the laptop and will check and see if it makes a difference.

hifi
Jul 25, 2012

mila kunis posted:

Okay well, I tried a hail mary and it worked. After digging around I found posts from AMD engineers suggesting that the newer linux kernels had fixed a bunch of issues. Unfortunately kubuntu was limited to a kernel before the fix, and from what I read its a bad idea to install a kernel your distro doesn't support.

I installed arch linux because I heard its supposed to be the "bleeding edge" distro, and voila. Shut the laptop at 100%, and it was only 97% 8 hours later.

So I guess the solution was "install arch"? I'll see if this sticks, I didn't have any browsers or anything running at all when I shut the laptop and will check and see if it makes a difference.

Fyi fedora runs a very new kernel too although you would be switching from debian-based to rhel-based

ihafarm
Aug 12, 2004

BrainDance posted:

So it seems to work,
code:
$ sudo traceroute -s 192.168.50.98 api.ipify.org
traceroute to api.ipify.org (104.26.13.205), 30 hops max, 60 byte packets
 1  MyRouter(192.168.50.1)  0.112 ms  0.130 ms  0.150 ms
 2  MYISPStuffIGuess4.334 ms  4.639 ms  4.662 ms
 3  MoreISPStuff  2.870 ms  3.164 ms hn.kd.pix (219.155.45.153)  2.326 ms
 4  pc73.zz.ha.cn (61.168.28.73)  4.206 ms pc149.zz.ha.cn (61.168.26.149)  27.557 ms pc65.zz.ha.cn (61.168.28.65)  14.957 ms
 5  219.158.105.133 (219.158.105.133)  27.796 ms *  27.090 ms
 6  219.158.8.114 (219.158.8.114)  36.483 ms 219.158.103.42 (219.158.103.42)  30.997 ms 219.158.8.122 (219.158.8.122)  34.145 ms
 7  219.158.97.29 (219.158.97.29)  38.311 ms  29.455 ms  36.970 ms
 8  219.158.10.62 (219.158.10.62)  39.454 ms  38.402 ms  43.894 ms
 9  202.77.23.30 (202.77.23.30)  33.768 ms  38.322 ms  35.869 ms
10  * * *
11  172.71.208.2 (172.71.208.2)  69.613 ms 172.71.212.2 (172.71.212.2)  68.195 ms 103.22.203.231 (103.22.203.231)  71.751 ms
12  104.26.13.205 (104.26.13.205)  66.854 ms  66.841 ms  68.120 ms
With the one that goes through the VPN, even though that's not what I'm trying to use here (and this one does in fact work with curl. It's just not useful to me since that of course returns my VPN's IP)
code:
$ sudo traceroute api.ipify.org
traceroute to api.ipify.org (172.67.74.152), 30 hops max, 60 byte packets
 1  MyRouter(192.168.50.1)  0.091 ms  0.124 ms  0.165 ms
 2  MyVPN  248.176 ms  248.119 ms  248.016 ms
 3  38.86.135.1 (38.86.135.1)  248.158 ms  248.197 ms  248.237 ms
 4  * * *
 5  be2213.ccr41.dca01.atlas.cogentco.com (154.54.6.241)  248.304 ms be2231.ccr42.dca01.atlas.cogentco.com (154.54.83.69)  248.238 ms be2213.ccr41.dca01.atlas.cogentco.com (154.54.6.241)  248.237 ms
 6  be2406.ccr42.iad02.atlas.cogentco.com (154.54.85.210)  248.320 ms be4008.ccr42.iad02.atlas.cogentco.com (154.54.87.146)  247.254 ms  247.765 ms
 7  38.32.185.178 (38.32.185.178)  248.743 ms 38.88.214.142 (38.88.214.142)  246.201 ms *
 8  172.70.36.5 (172.70.36.5)  246.135 ms 172.70.172.2 (172.70.172.2)  246.232 ms 172.70.36.3 (172.70.36.3)  246.165 ms
 9  172.67.74.152 (172.67.74.152)  245.737 ms  245.826 ms  246.011 ms
And as far as I can tell I only have 1 default gateway.

code:
$ ip route show
default via 192.168.50.1 dev enp4s0 proto dhcp src 192.168.50.249 metric 100 
192.168.50.0/24 dev enp3s0 proto kernel scope link src 192.168.50.98 
192.168.50.0/24 dev enp4s0 proto kernel scope link src 192.168.50.249 metric 100
192.168.50.98 is the No-VPN one, the one I'm trying to use for curl here

/etc/network/interfaces is
code:
source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The 2nd NIC
auto enp3s0
iface enp3s0 inet static
    address 192.168.50.98
    netmask 255.255.255.0
#    gateway 192.168.50.1
I have gateway commented out because when I didn't I remember it didn't work

And I think all the rest was to get the jellyfin server to use the no-VPN NIC all the time, not anything to do with curl using it when told to use it.
But it was stuff like:
sudo iptables -t mangle -A OUTPUT -p tcp --dport 8896 -j MARK --set-mark 1
sudo iptables -t mangle -A OUTPUT -p udp --dport 8896 -j MARK --set-mark 1

added 100 jellyfin to /etc/iproute2/rt_tables

And then some more that I have to keep digging in here to remember. drat, I should documented all this when I was doing it.

Don’t multihome; put the NICs on different subnets. Can you ping both interfaces from another machine?

When you said the VPN/router allowed you to exclude ports, did you mean physical ports?

Well Played Mauer
Jun 1, 2003

We'll always have Cabo

mila kunis posted:

Okay well, I tried a hail mary and it worked. After digging around I found posts from AMD engineers suggesting that the newer linux kernels had fixed a bunch of issues. Unfortunately kubuntu was limited to a kernel before the fix, and from what I read its a bad idea to install a kernel your distro doesn't support.

I installed arch linux because I heard its supposed to be the "bleeding edge" distro, and voila. Shut the laptop at 100%, and it was only 97% 8 hours later.

So I guess the solution was "install arch"? I'll see if this sticks, I didn't have any browsers or anything running at all when I shut the laptop and will check and see if it makes a difference.
Glad you got it sorted. I run fedora :smug: so a newer kernel would explain the difference.

CaptainSarcastic
Jul 6, 2013



Just for anyone else running Firefox on OpenSUSE - they hosed up an update and Firefox is currently unable to verify any add-ons. Hopefully they'll roll out a fix soon, but right now extensions in Firefox are fuckled on OpenSUSE:

https://bugzilla.opensuse.org/show_bug.cgi?id=1221531

cruft
Oct 25, 2007

mila kunis posted:

from what I read its a bad idea to install a kernel your distro doesn't support.

What?

Is this real advice? What the hell has happened to Unix?

Eletriarnation
Apr 6, 2005

People don't appreciate the substance of things...
objects in space.


Oven Wrangler
I think if you're OK dealing with dependency hell yourself like the greybeards of yore, you can do what you want - but if you want the package manager to take care of it, you probably should install the kernel provided by your distro's repos. So, I guess package managers happened to Unix?

IDK, I'm no expert but my understanding was that kernel update policy is a key defining difference between many common distros. Happy to be educated if it's more complicated than that.

CaptainSarcastic
Jul 6, 2013



CaptainSarcastic posted:

Just for anyone else running Firefox on OpenSUSE - they hosed up an update and Firefox is currently unable to verify any add-ons. Hopefully they'll roll out a fix soon, but right now extensions in Firefox are fuckled on OpenSUSE:

https://bugzilla.opensuse.org/show_bug.cgi?id=1221531

Looks like this got sorted pretty quick. I had to reinstall my extensions, but it retained the settings and it's all working again now.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

cruft posted:

What?

Is this real advice? What the hell has happened to Unix?

Did you ever try to run the “wrong” kernel on SunOS or HPUX? Lots of poo poo would break and you’d never get support for anything atop it, including Oracle.

Less Fat Luke
May 23, 2003

Exciting Lemon
Even the most boring distributions like Debian let you compile and use your own kernel; they provide tools to help or you can just do it yourself. It shouldn’t be an issue but check your distros docs.

cruft
Oct 25, 2007

Subjunctive posted:

Did you ever try to run the “wrong” kernel on SunOS or HPUX? Lots of poo poo would break and you’d never get support for anything atop it, including Oracle.

Well sure, but breaking SunOS was something that all kinds of activities could cause, including, but not limited to, patching the kernel, typing the wrong key in the FORTH-based boot firmware, starting X11R5, or using SunOS.

I had a college professor (J) who got mad at another college professor (M) and changed the firmware so that the A key would trigger A1-reset and hard-reboot the machine. So M got into the habit of keeping the letter "a" copied into the X11 paste buffer, and middle-clicked the mouse every time he needed to type the letter "a". None of the students would admit to knowing what the problem was, because he was a clueless jerk, and watching him struggle was funny.

Truga
May 4, 2014
Lipstick Apathy

Less Fat Luke posted:

Even the most boring distributions like Debian let you compile and use your own kernel; they provide tools to help or you can just do it yourself. It shouldn’t be an issue but check your distros docs.
hell, you can just download kernels customized for a billion different things these days from a ppa or whatever

ExcessBLarg!
Sep 1, 2001

mila kunis posted:

Unfortunately kubuntu was limited to a kernel before the fix, and from what I read its a bad idea to install a kernel your distro doesn't support.
Ubuntu maintains builds of mainline kernels using the standard Ubuntu kernel configuration and packaging. You may want to give these a try.

AlexDeGruven
Jun 29, 2007

Watch me pull my dongle out of this tiny box


cruft posted:

What?

Is this real advice? What the hell has happened to Unix?

Well, for one, GNU's Not Unix, but...

I think that statement needs some clarification. I wouldn't install a Debian configured kernel on a RedHat system, for example (but if it had everything the system needed,it would probably be fine, anyway). But custom kernels are pretty common, especially in the scientific and HPC spaces. Hell, you can even install custom kernels in Android.

BlankSystemDaemon
Mar 13, 2009



cruft posted:

What?

Is this real advice? What the hell has happened to Unix?
A traditional Unix-like is both the kernel, its libraries, and userland (ie. a Linux distribution) - so this advice is more of a function of Linux being Linux, whereas you wouldn't really even think of it on another Unix-like.

In theory, it's also possible that a kernel could be compiled with different optimizations and that that could lead to problems - but I've not tried it, and don't intend to.

cruft
Oct 25, 2007

BlankSystemDaemon posted:

A traditional Unix-like is both the kernel, its libraries, and userland (ie. a Linux distribution) - so this advice is more of a function of Linux being Linux, whereas you wouldn't really even think of it on another Unix-like.

In theory, it's also possible that a kernel could be compiled with different optimizations and that that could lead to problems - but I've not tried it, and don't intend to.

Hey, did that thing where the GNU userspace stuff ran on the FreeBSD kernel ever get to a state where it was working? I think the Debian people were doing it. I remember thinking it was the "let's enrage absolutely everyone" project.

BlankSystemDaemon
Mar 13, 2009



cruft posted:

Hey, did that thing where the GNU userspace stuff ran on the FreeBSD kernel ever get to a state where it was working? I think the Debian people were doing it. I remember thinking it was the "let's enrage absolutely everyone" project.
It's dead - and the response from Jessica Clarke (who worked on it from the FreeBSD side) summed up the opinions of the FreeBSD folks quite well.
Besides, it basically just replicates functionality you can get by doing FreeBSD with the Linuxulator and a jail.

Around that time, I think, someone started trying to do it the other way around - which has the advantage of probably being easier, since I believe most of the FreeBSD userland already gets built for Linux distributions as a package.

BlankSystemDaemon fucked around with this message at 22:07 on Mar 19, 2024

mila kunis
Jun 10, 2011

mila kunis posted:

Okay well, I tried a hail mary and it worked. After digging around I found posts from AMD engineers suggesting that the newer linux kernels had fixed a bunch of issues. Unfortunately kubuntu was limited to a kernel before the fix, and from what I read its a bad idea to install a kernel your distro doesn't support.

I installed arch linux because I heard its supposed to be the "bleeding edge" distro, and voila. Shut the laptop at 100%, and it was only 97% 8 hours later.

So I guess the solution was "install arch"? I'll see if this sticks, I didn't have any browsers or anything running at all when I shut the laptop and will check and see if it makes a difference.

Woke up to a dead laptop again, ah gently caress it. Gonna return it. If I try Linux ever again it'll probably be from a dedicated linux vendor like system76 or framework rather than bothering with a thinkpad. I've wasted enough time and I'm feeling frustrated enough atm that I'm just gonna pay the apple premium for now I think.

mila kunis fucked around with this message at 23:19 on Mar 19, 2024

Less Fat Luke
May 23, 2003

Exciting Lemon
Also this kernel version chat made me remember to try a newer kernel on Debian 12 to get AMD p_states going so I went to 6.8.1 and it literally dropped my wall-power usage in half when idling - cores drop to 400mhz now instead of 1800mhz. Worked great for a few hours til I tried to launch a Steam game and of course ZFS is currently broken with that kernel, lol.

Edit: Also cool graph porn:


Double-edit: Turns out the "stable" 6.7.10 kernel is what I wanted, AMD p-states and a functional copy_file_range for ZFS.

Less Fat Luke fucked around with this message at 00:54 on Mar 20, 2024

F_Shit_Fitzgerald
Feb 2, 2017



I'm trying to set up a shell script so that if it detects any files of a certain type, those are moved to a separate directory. For example:

code:
if [ -z *.jpg ];
then
  mv *.jpg Media/
fi
When this script is run with 'dummy' jpg files, it throws the error "Line 3: [: a.jpg: binary operator expected". a.jpg is the name of the 'dummy' jpg file I created.

What am I doing wrong? It for sure has to be something really dumb I'm overlooking.

F_Shit_Fitzgerald fucked around with this message at 02:09 on Mar 23, 2024

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

do you have more than one dummy file? if so, the

code:
if [ -z *.jpg ]
is going to expand to something like

code:
if [ -z 1.jpg a.jpg b.jpg ]
and that’s not going to work. to detect if there are any files matching a glob, I would recommend something like

code:
if ls *.jpg >/dev/null 2>&1;
then
but you could also just do the mv unconditionally, since it’ll be harmless if there are none there and you suppress output

(apologies for typos above, I’m on my phone)

F_Shit_Fitzgerald
Feb 2, 2017



I do, and I think you nailed the problem: trying to move them en masse is probably just easier with a mv command rather than testing for the existence of each file type. The directory targeted for this shouldn't have any other picture files in it anyway. Thanks!

ExcessBLarg!
Sep 1, 2001
Also if you don't have any files that match the glob then "*.jpg" expands into "*.jpg".

If you're using bash you may want to look into the failglob or nullglob options.

Adbot
ADBOT LOVES YOU

F_Shit_Fitzgerald
Feb 2, 2017



ExcessBLarg! posted:

Also if you don't have any files that match the glob then "*.jpg" expands into "*.jpg".

If you're using bash you may want to look into the failglob or nullglob options.

So setting shopt -s nullglob will prevent a SNAFU where it starts deleting all jpg files in my system, if I'm understanding correctly? Will do; that's an easy fix. I should have already done that.

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