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
Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
Meh, GPU hardware acceleration in Chrome seems busted when running it with Wayland via their Ozone stuff. And systemd-resolved seems to keep forgetting/not resolving my local poo poo. I keep to need restarting it.

Adbot
ADBOT LOVES YOU

AlexDeGruven
Jun 29, 2007

Watch me pull my dongle out of this tiny box


I've yet to have decent experiences with resolved. It's especially bad for me on a laptop where things change quite often. I usually end up just disabling it after I fight with it for a few minutes.

cruft
Oct 25, 2007

AlexDeGruven posted:

I've yet to have decent experiences with resolved. It's especially bad for me on a laptop where things change quite often. I usually end up just disabling it after I fight with it for a few minutes.

I'm actually using it in my router. :smug: It lets me do some cool stuff with multiple uplinks and VPNs.

Not that I'm going to disparage anybody who just wants to edit /etc/resolv.conf. I went through a 10 year period where step 1 was "disable network-manager", after multiple sessions fighting with it for control over my own system.

Klyith
Aug 3, 2007

GBS Pledge Week

Combat Pretzel posted:

That said, my power usage grievances with NVidia are gone.

Combat Pretzel posted:

Meh, GPU hardware acceleration in Chrome seems busted when running it with Wayland via their Ozone stuff.

Your power grievance may be gone, but here's a new grievance to enjoy. Nvidia proprietary only provides VDPAU and NVEN/DEC for hardware decode. Chrome only supports VA-API.

So you need to jump through your choice of hoop to make VA-API work with the nvidia driver.


(I'll note that chromium only started doing hardware decode successfully in Wayland with an AMD GPU pretty recently. Maybe 6 months ago?)

Saukkis
May 16, 2003

Unless I'm on the inside curve pointing straight at oncoming traffic the high beams stay on and I laugh at your puny protest flashes.
I am Most Important Man. Most Important Man in the World.

Combat Pretzel posted:

Meh, GPU hardware acceleration in Chrome seems busted when running it with Wayland via their Ozone stuff. And systemd-resolved seems to keep forgetting/not resolving my local poo poo. I keep to need restarting it.

That sounds a bit like LLMNR is enabled, but restarting shouldn't help with that. LLMNR caused a bit of confusion at work when servers were unable to resolve addresses in their own subnet, but worked fine for others.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!

Klyith posted:

Your power grievance may be gone, but here's a new grievance to enjoy. Nvidia proprietary only provides VDPAU and NVEN/DEC for hardware decode. Chrome only supports VA-API.

So you need to jump through your choice of hoop to make VA-API work with the nvidia driver.

(I'll note that chromium only started doing hardware decode successfully in Wayland with an AMD GPU pretty recently. Maybe 6 months ago?)
I need to reboot into Linux later and check it. After disabling fractional scaling and configuring Chrome back to X11, to get generic GPU accelerated rendering and compositing back working, I've installed some VA-API <-> VDPAU thingimajic and had working video decode. At least on Youtube. (--edit: libva-vdpau-driver)

Trying to get Chrome to work with Wayland, the log spam says something about being unable to find a Vulkan related entrypoint and then says it gives up for GPU acceleration.

Saukkis posted:

That sounds a bit like LLMNR is enabled, but restarting shouldn't help with that. LLMNR caused a bit of confusion at work when servers were unable to resolve addresses in their own subnet, but worked fine for others.
Latest info I have is something about Domain=xxxx in systemd-resolved to fix this.

--edit: Yeah, I set Domains=home to get my .home tld to work. It still works after booting into the system.

Combat Pretzel fucked around with this message at 16:47 on Nov 29, 2023

Mr. Crow
May 22, 2008

Snap City mayor for life
Here's a random one, I periodically get SELinux denials for virsh attempting to execmem. I've looked it up in the past and my search terms were apparently bad and have just ignored it for the longest time. I finally found something to search for and realized it's a boolean you can flip, however it doesn't really explain anything.

https://access.redhat.com/documenta...achines-in-rhel

quote:

virt_use_execmem
Enables confined virtual guests to use executable memory and executable stack.

Anyone ELI5 what this means (in the context of a virtual machine / virt) and why you would turn it on (since it is disabled by default)? And/or some elaboration on what executable memory/stack are? This wikipedia page is about the best explanation I could find but doesn't really explain like I'm an idiot why you would want to have executable memory or what it means. Guess my managed language background is biting me in the rear end.

waffle iron
Jan 16, 2004
Each executable file in Linux has a data segment, a code segment, and then as it runs memory (RAM) is allocated on the heap and stack. For security code should only be running from the code segment so it's harder for malicious code to be downloaded and run from the data segments or memory. It looks like kernel based virtualization (i.e. uses the Intel VT or AMD-V professor extensions) don't need to execute code from memory, but userland/software only virtualization does need it.

cruft
Oct 25, 2007

Why does bash return 1 when I log out?

code:
% bash --login; echo "Return value $?"
$ logout
Return value 1
e: nevermind, it's because Debian installed a `.bash_logout` that calls `/usr/bin/clear_console -q` which exits with 1 because the terminal is not a console. Because that's the last executable run in `.bash_logout`, that's the return value for the entire shell.

cruft fucked around with this message at 18:15 on Nov 30, 2023

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Anything with a JIT will need execmem, though, so node or Ruby-with-yjit, etc.

xzzy
Mar 5, 2009

It's something to do with the --login option but I ain't digging deeper than that because it's probably some esoteric backwards compatibility crap. If you leave it out it returns 0.

edit - the edit explanation is better. :v:

cruft
Oct 25, 2007

xzzy posted:

It's something to do with the --login option but I ain't digging deeper than that because it's probably some esoteric backwards compatibility crap. If you leave it out it returns 0.

I edited my post with the answer. It's a `.bash_logout` file installed by Debian that runs `/usr/bin/clear_console`, which fails because my terminal is not a console. I should probably open a bug with Debian to append `|| true` to that, but :effort:

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

lol that’s ridiculous

cruft
Oct 25, 2007

Subjunctive posted:

lol that’s ridiculous

At least it's consistent. Once I saw the `.bash_logout` file I didn't create, it was clear what was going on.

If you run a shell script that doesn't explicitly exit, the exit value is whatever the last executed command returned.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

yeah, I mean it’s ridiculous that they would put that there and let it gently caress with the exit code instead of just adding || true or similar

cruft
Oct 25, 2007

Subjunctive posted:

yeah, I mean it’s ridiculous that they would put that there and let it gently caress with the exit code instead of just adding || true or similar

Well, I went 25+ years before it affected me, so :shrug:

The return code of your login shell probably isn't something that comes up enough to consider.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

it’s the principle of the thing!

cruft
Oct 25, 2007

Subjunctive posted:

it’s the principle of the thing!

:hai:

However, I ain't going publicly on the record complaining about it since I can't be arsed to open a bug. I'm probably the first person in 25+ years to even notice.

e: Since we have completely derailed the other conversation, how's it going today, Subjunctive?

ExcessBLarg!
Sep 1, 2001

cruft posted:

Why does bash return 1 when I log out?
You can bypass this with an "exec true".

cruft
Oct 25, 2007

ExcessBLarg! posted:

You can bypass this with an "exec true".

alias logout="exec true" is the kind of innovative thinking I've come expect from the top minds on the Something Awful forums.

ExcessBLarg!
Sep 1, 2001

cruft posted:

I'm probably the first person in 25+ years to even notice.
I actually noticed this about a year ago, so might as well provide details:

I have a set of scripts that ssh into remote hosts but instead of providing a command to ssh directly, ssh takes a set of commands from stdin. This creates a login shell on the remote side (something which I've never really cared about despite displaying motd and all), and so when the ssh session ends it runs clear_console, as you've discovered, which returns 1, which gets returned by ssh itself.

For a long time I didn't really care about the return value of ssh because a downed remote host wasn't a failure condition for the scripts themselves. But at one point I did need to test if ssh returned 0 (essentially to determine if my script should follow a legacy pathway) and I discovered it never did. I was dumbfounded at first, until I ran a "set -x" in the remote session and saw the culprit. I thought about it for a while, the number of machines affected, and decided to put "exec true" at the end of my remote commands.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

I feel like exit 0 would feel better to me, a little more self-documenting?

dunno

ExcessBLarg!
Sep 1, 2001

Subjunctive posted:

I feel like exit 0 would feel better to me, a little more self-documenting?
code:
$ exec exit 0
bash: exec: exit: not found
Yeah so exit is only a built-in, it can't be exec'd. true is also a built-in, but /bin/true also exists so you can exec that.

If you mean just plain "exit 0" that runs ~/.bash_logout.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

wait .bash_logout stomps on an explicit exit code? now we’re talking

ExcessBLarg!
Sep 1, 2001

Subjunctive posted:

wait .bash_logout stomps on an explicit exit code? now we’re talking
It does!

And anyone responsible for that behavior is probably asking all three of these WTF questions:
1. Why do you care about the exit status of a login shell?
2. Why does your ~/.bash_logout have a command that might fail?
3. Why is Debian so paranoid over information leakage from a previous shell session that they make clear console a distribution-wide default behavior when public terminals aren't a thing anymore?

Computer viking
May 30, 2011
Now with less breakage.

3 may just be a leftover - it was useful once, and none of the five people who have noticed it this decade could be bothered to make the security argument for it being ok to remove it now.

cruft
Oct 25, 2007

ExcessBLarg! posted:

code:
$ exec exit 0
bash: exec: exit: not found
Yeah so exit is only a built-in, it can't be exec'd. true is also a built-in, but /bin/true also exists so you can exec that.

If you mean just plain "exit 0" that runs ~/.bash_logout.

Okay but since we're splitting extremely pedantic hairs anyway, why do you need to exec true? Why not just run true? Or for that matter, why not just run :?

Behold:

code:
% cat > foo.sh
#! /bin/sh
false
:
% chmod +x foo.sh
% ./foo.sh && echo yay
yay
%

ExcessBLarg!
Sep 1, 2001

cruft posted:

why do you need to exec true?
Because exec replaces the login shell process with true and (in my case) returns straight to sshd, so ~/.bash_logout never gets invoked.

Now bash often does a fancy thing and will automatically exec the last line of a script where it determines its safe to do so, but since I'm passing commands to the input of a login shell I don't think it's smart enough to tell that true is followed by EOF. Plus in my case the "exec true" actually happens on an early conditional exit.

cruft posted:

Or for that matter, why not just run :?
: is also a built-in and can't be exec'd.

cruft
Oct 25, 2007

ExcessBLarg! posted:

Because exec replaces the login shell process with true and (in my case) returns straight to sshd, so ~/.bash_logout never gets invoked.

Now bash often does a fancy thing and will automatically exec the last line of a script where it determines its safe to do so, but since I'm passing commands to the input of a login shell I don't think it's smart enough to tell that true is followed by EOF. Plus in my case the "exec true" actually happens on an early conditional exit.

: is also a built-in and can't be exec'd.

Oh, you're running `exec true` from the thing that invokes ssh. I thought you were putting that at the end of your .bash_logout.

Makes sense. Weird, but then, what isn't.

e: I understand your initial reply to me a lot better now. My use case was hitting ^D in the terminal ;)

Woolie Wool
Jun 2, 2006


Does anyone have any experience with the Trinity desktop environment? To me the idea of a desktop environment that looks and behaves like a desktop from 20 years ago while actually working on a modern system seems pretty cool. I have thought of putting it on my ThinkPad, but my ThinkPad's Linux install already has KDE Plasma and I am concerned that Trinity and KDE will gently caress each other up severely since they share a lot of things in common but wildly different versions. From what I can tell it doesn't have DPI scaling so using it on my main rig with its 4K display would be a no-go.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

Woolie Wool posted:

To me the idea of a desktop environment that looks and behaves like a desktop from 20 years ago while actually working on a modern system seems pretty cool.
XFCE already works without using weird versions of important libraries.

Coffee Jones
Jul 4, 2004

16 bit? Back when we was kids we only got a single bit on Christmas, as a treat
And we had to share it!
Well here's a 'fun' discovery
I'm running PopOS on a Microsoft Surface Book 3.
I install Chrome via `sudo apt install google-chrome`

I watch a youtube video and it's oddly choppy. Right click on 'stats for nerds' and it's dropping frames everywhere.
I switch to firefox, no such issue.

I browse to - chrome://gpu/ apparently it's decoding video via software rendering!

I browse to chrome://flags/ and enable "Override software rendering list" thinking it's just some linux being unsupported forever, and now the window just hangs - unresponsive.

I sudo apt remove google-chrome and install the flatpak version of chrome. Everything runs fine, https://webglsamples.org/ looking at these demos I get all the frames.

chrome://gpu/ shows everything enabled except Vulkan and WebGPU. Fine, it's probably that way on windows, too.


:argh:

Coffee Jones fucked around with this message at 03:33 on Dec 4, 2023

Nitrousoxide
May 30, 2011

do not buy a oneplus phone



Yeah, flatpak rocks.

Coffee Jones
Jul 4, 2004

16 bit? Back when we was kids we only got a single bit on Christmas, as a treat
And we had to share it!
I guess?

Trying GZ doom via flatpak

I got this working setting permissions to a specific wad directory and got it loading custom wads via flatseal . There's a bit of a learning curve - and a configuration burden


But in some cases like IDEs that have to access everything it's a bit of "WHAT ARE YOU DOOOOOING??!????!!"

My linux use is "Get me up to a point where I can compile and run my stuff" and have never actually changed things like default desktop environment

Still having a answer to "My favorite app isn't available in my OS's package repository (like say, a quake sourceport)- how screwed am I?" and the answer being "not screwed at all if there's a snap or flatpak" is a world of difference from twenty years ago when I started with linux.

Coffee Jones fucked around with this message at 05:56 on Dec 4, 2023

Dead Goon
Dec 13, 2002

No Obvious Flaws



Flatseal is essential if you want to run a Flatpak that actually needs to access files.

Dead Goon fucked around with this message at 06:41 on Dec 4, 2023

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!
I really like flatpak but for IDEs I don't ever bother.

cruft
Oct 25, 2007

Mega Comrade posted:

I really like flatpak but for IDEs I don't ever bother.

Same

Nitrousoxide
May 30, 2011

do not buy a oneplus phone



Terminal shells and IDEs are two things I would suggest installing directly to the host rather than trying to containerize them.

I know podman is trying to create a whole workflow for using a shell in a container but, while I'm all-in on containerizing stuff, this seems like a dumb part of their project.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
I have a goofy problem where I get a "target is busy" option when umounting a filesystem I was manipulating as a chroot. The file system is just a file itself. I have to set up some binds for stuff like /dev and /dev/pts, but I only fail when unmounting the actual filesystem. If I umount again afterwards, it works fine. It doesn't happen every time. I am guessing something is still flushing/committing/whatever when I try to umount it, but I had exited the chroot well before that.

Even trying to diagnose with fuser or lsof comes up with nothing, and the consequence of using those commands often causes the umount to actually succeed. I'm thinking I need to wait on some operations to finish saving to the image file that represents the filesystem. Are there any flushing commands like that I should be considering?

Adbot
ADBOT LOVES YOU

Rescue Toaster
Mar 13, 2003
Should the installation images for modern distros support secure boot? I know lots of distros can do various secure boot configurations and there's instructions once you're up and running and need to update a kernel and so forth.

I tried a couple and got secure boot errors, and so ok well I'll disable it and think about enabling it later. But that does sort of defeat the purpose. I verified the hash and signature on the install medium so it's not that, and I'm not like, worried about it or anything, more a curiosity.

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