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
Subjunctive
Sep 12, 2006

✨sparkle and shine✨

VictualSquid posted:

Most likely.

In that case using "sudo --login user command" should work.
Though if ssh from a different machine works, then ssh from the local machine also works.
I do run one of my backup scripts through ssh from root to my user. So that I read files as root having read permissions, and it writes the backup file as user so I can upload it to cloud and copy it around with a job running with user permissions.

Yeah, I do that sort of thing with root-whatever | sudo me tee /file but for batch file transfer that’s gross.

Adbot
ADBOT LOVES YOU

AlexDeGruven
Jun 29, 2007

Watch me pull my dongle out of this tiny box


Yeah, non-interactive operations can get weird. There's a lot that people don't realize comes in with your .bashrc (or .zshrc, etc) when you're logged in that makes stuff work, it can be difficult to troubleshoot when you're not logged in.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

I discovered that .zshenv was even a thing about a month ago after multiple hours of debugging my setup with our developer support team, and finding that something had stuck a hard $PATH reset (not augmentation) in it. They had no idea either!

brianp34
May 23, 2004
www.bigbz.net
Oh, I definitely don't know what I'm doing. Cruft pointed out that Cron doesn't have access to the environment variables of your login shell, so I while trying to muddle my way through a solution to that, I figured I'd give it a try via ssh and it worked. I recognize that this solution is stupid.

Sorry for the befuddlement! I appreciate that you took the time to help me.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

If it’s stupid, and it works, it’s not stupid.

AlexDeGruven
Jun 29, 2007

Watch me pull my dongle out of this tiny box


You're good, it's all about learning.

What you can do is run env to see what you have interactively, then fire a cron job that captures the env of the cron environment and then compare. It's easy to set variables for a cron job once you know what it's looking for.

AlexDeGruven fucked around with this message at 02:35 on Feb 29, 2024

cruft
Oct 25, 2007

Subjunctive posted:

If it’s stupid, and it works, it’s not stupid.

This makes me feel better about the horrible kludges I rolled out at work today. Thank you.

Woolie Wool
Jun 2, 2006


cruft posted:

I don't think kids ever wanted desktops, or even computers. They used them because they were an effective tool for accomplishing what they did want, which was communicating with their friends, or getting jobs, or whatever. But these smartphones seem to be providing what people want, in a more convenient way than desktop computers.

Maybe one day they can give up the smartphone for some other, better thing that's even less intrusive and more convenient in terms of letting them communicate with friends or get jobs.

Lots of kids loved 80s and early 90s computers which had no networking and were useless for communicating or getting jobs.

RFC2324
Jun 7, 2012

http 418

Woolie Wool posted:

Lots of kids loved 80s and early 90s computers which had no networking and were useless for communicating or getting jobs.

I still sometimes miss the old 286 I ran a BBS off of

cruft
Oct 25, 2007

Woolie Wool posted:

Lots of kids loved 80s and early 90s computers which had no networking and were useless for communicating or getting jobs.

Would you guess a majority of kids did?

RFC2324
Jun 7, 2012

http 418

cruft posted:

Would you guess a majority of kids did?

I traded my knowledge of computers for drugs in the 90s, so I think it was more common than you think.

cruft
Oct 25, 2007

RFC2324 posted:

I traded my knowledge of computers for drugs in the 90s

Drugs? In my computers?

RFC2324 posted:

it was more common than you think.

... oh.

RFC2324
Jun 7, 2012

http 418

:vince:

DrSunshine
Mar 23, 2009

Did I just say that out loud~~?!!!
I'm trying to get KDE Plasma to work with Wayland on an NVIDIA RTX4070 Super, using the proprietary drivers. I saw that the latest graphics drivers came out which supposedly improved Wayland compatibility.

(I know, I know, "NVIDIA proprietary is a bad time." I know! But dangit, everything seems to work nicely so far except for trying to use Wayland!)

System specs:





Now, I've tried running Plasma-Wayland before the new drivers and it was totally unusable. It'd freeze up, barely render windows, etc. With the new one it "kinda?" works in that I can open things up, run various apps and so on, but the actual desktop interface is super super laggy. If I click on buttons in the taskbar, it takes tens of seconds or more to open up or respond. There's a noticeable lag if I try to mouse over things. And if I run something like nvidia-settings --query all it doesn't even seem to poll any info from the GPU. Is it... somehow not detecting the GPU and rendering graphics using the onboard motherboard GPU? I'm baffled. None of these issues come up if I use X11.

Any thoughts?

Klyith
Aug 3, 2007

GBS Pledge Week

brianp34 posted:

I hope this problem isn't too elementary to post here, but I've been googling all day and can't figure this out.

I have an ubuntu 22.04 system running gnome 42.9. I'm having an issue where gnome memory usage balloons over the course of few days and eventually crashes. I know its probably related to one or more of the extensions I have enabled, but I'd prefer to keep those. I might go three or four days without touching the desktop, so I'd like to schedule a restart that will preserve my session as completely as possible. This command does what I want
code:
busctl --user call org.gnome.Shell /org/gnome/Shell org.gnome.Shell Eval s 'Meta.restart("Restarting…")'
.

I can't figure out how to schedule it either via cron or systemd timers. It seems to be because of the scope that the script is executed under when using cron, but I"m out of my depth. I'd appreciate any insight here.

Quick reprise: was the problem with systemd that it didn't work, or that you couldn't make a systemd timer? I'm on KDE rather than gnome, but after searching to find a busctl thing I could do in KDE I made this user service:
code:
~> cat ~/.config/systemd/user/busctldemo.service
[Unit]
Description=Demo busctl

[Service]
Type=simple
WorkingDirectory=/home/klyith/
ExecStart=busctl call --user org.kde.KWin /ColorCorrect org.kde.kwin.ColorCorrect preview u 5000
Nice=0

[Install]
WantedBy=default.target

~> systemctl --user start busctldemo.service
worked perfectly to change the screen color temperature in my active session.

Systemd timers are slightly more effort to set up than an existing cron. (Though less if you don't already have cron out of the box, which is getting more common.) And the time format isn't as flexible; every how-to for them brings up an example of something where systemd needs multiple timers to replicate some crazy thing that's a single line in cron. But systemd is good for system-integrated stuff like this.


DrSunshine posted:

Is it... somehow not detecting the GPU and rendering graphics using the onboard motherboard GPU?

Sorry this isn't more help, but I don't think so. If it was it wouldn't be that awful. :)

DrSunshine
Mar 23, 2009

Did I just say that out loud~~?!!!

Klyith posted:


Sorry this isn't more help, but I don't think so. If it was it wouldn't be that awful. :)

:mrwhite:

cruft
Oct 25, 2007

Klyith posted:

Sorry this isn't more help, but I don't think so. If it was it wouldn't be that awful. :)

The built-in graphics card is perfectly capable of almost anything other than ray-tracing 50000 polygons per second. Klyith isn't being facetious here: it's not that awful.

Bark! A Vagrant
Jan 4, 2007

Grad school is good for mental health
Have you walked through the requirements and suggestions here for plasma+wayland+nvidia?

If you don't need wayland I'd just wait it out honestly. It's seems to be under very active development finally, with the most recent nvidia driver released last week having a lot of wayland fixes/updates and it looks like Plasma 6 released yesterday with a bunch of wayland improvements. Some people are reporting the infamous resume from sleep bug is fixed now in Plasma 6. I don't know much about kubuntu but it looks like it won't be getting the latest nvidia drivers and Plasma 6 for a little while

Bark! A Vagrant fucked around with this message at 18:14 on Feb 29, 2024

DrSunshine
Mar 23, 2009

Did I just say that out loud~~?!!!

Bark! A Vagrant posted:

Have you walked through the requirements and suggestions here for plasma+wayland+nvidia?

If you don't need wayland I'd just wait it out honestly. It's seems to be under very active development finally, with the most recent nvidia driver released last week having a lot of wayland fixes/updates and it looks like Plasma 6 released yesterday with a bunch of wayland improvements. Some people are reporting the infamous resume from sleep bug is fixed now in Plasma 6. I don't know much about kubuntu but it looks like it won't be getting the latest nvidia drivers and Plasma 6 for a little while

I have, yes, and it doesn't seem to have made any difference. I'll wait and see if Plasma 6 makes any differences when it gets released. For now, X11 works great still, I've mainly been interested in tinkering with Wayland in the interests of preparing for the future.

RFC2324
Jun 7, 2012

http 418

DrSunshine posted:

I have, yes, and it doesn't seem to have made any difference. I'll wait and see if Plasma 6 makes any differences when it gets released. For now, X11 works great still, I've mainly been interested in tinkering with Wayland in the interests of preparing for the future.

I mean, its linux. I fully expect wayland to be abandoned any day now and replaced with something else that leaves us using X11 for another decade

Volguus
Mar 3, 2009

RFC2324 posted:

I mean, its linux. I fully expect wayland to be abandoned any day now and replaced with something else that leaves us using X11 for another decade

Nah, won't happen. Too much money has been spent on it for the companies to let it crash and burn.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Volguus posted:

Nah, won't happen. Too much money has been spent on it for the companies to let it crash and burn.

How much money do you think has been spent on Wayland, approximately?

Volguus
Mar 3, 2009

Subjunctive posted:

How much money do you think has been spent on Wayland, approximately?

No idea.

Wayland was announced in 2008. Now, it probably didn't have teams of people working full time on compositors until 2014 or so.

So I guess at least a decade of investment went in it. With multiple teams and companies contributing.

ziasquinn
Jan 1, 2006

Fallen Rib
the correct answer is 0 dollars cause Linux dev is free~

Kibner
Oct 21, 2008

Acguy Supremacy
Need help to get USB Redirection working via KVM. Currently using virt-manager to manage the Win11 VM I created. I am using one of the Fedora Atomic Desktops and am running this through Toolbox (so, not bare-metal or a flatpak).

code:
spice-client-error-quar: Could not redirect <thing>
[3662:0001] at 7-9: Error setting USB device node ACL: 'Error PoliciKit error: GDBuss.Error:org.feedesktop.PolicyKit1.Error.Failed: Action org.spice-spacelowlevelusbaccess is not registered' (0)

USB redirection error
I found this mailing list answer which seems to be what I need, but I have no idea where to find the file they are talking about changing or if it is even a file that I need to change. I'm just confused.

code:
I had the same problem some time ago. It can be fixed by extending
polkit-service-type with spice-gtk, i.e.

(operating-system
  ...
  (services
    ...
    (simple-service 'spice-polkit polkit-service-type (list spice-gtk))))

Dyscrasia
Jun 23, 2003
Give Me Hamms Premium Draft or Give Me DEATH!!!!
What is the correct method to mount cifs shares with current Fedora?

I am successful in doing so with my fstab and assigning the uid to my user. The problem is that I need access to the mount command which is removed with every kernel update. I assume I'm doing it wrong because of this permission change that keeps happening.

I switched one of my shares to a systemd mount unit which also works, but puts the share in the file browser favorites section rather than the mounted drives section.

What is the fedora prescribed way to mount shares on boot/logon? I would prefer mount on login rather than access.

Yaoi Gagarin
Feb 20, 2014

you're saying `mount -t cifs blah blah` stops working after every kernel update?

mila kunis
Jun 10, 2011
My laptop battery is draining hugely when I put it in sleep. I've looked around a bit and the issue seems to be that my model doesn't support S3 sleep mode, but only S0. I'm not sure why this mode performs so poorly, it's basically consuming as much battery as if I'd just left it on.

Model: Lenovo T14s gen 4 AMD
BIOS version: 1.16
OS: Kubuntu 23.10
Kernel version: 6.5.0-21

Anyone know of any fixes?

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.

mila kunis posted:

My laptop battery is draining hugely when I put it in sleep. I've looked around a bit and the issue seems to be that my model doesn't support S3 sleep mode, but only S0. I'm not sure why this mode performs so poorly, it's basically consuming as much battery as if I'd just left it on.

The simple solution is to unplug it first and then put it to sleep, if you can't keep it plugged in. My new work laptop drained the battery few times over weekend, and when I started using that routine it hasn't happened again.

Linus Tech Tips did a video about this issue with some possible remedies.

Microsoft is Forcing me to Buy MacBooks - Windows Modern Standby

Goon Matchmaker
Oct 23, 2003

I play too much EVE-Online

mila kunis posted:

My laptop battery is draining hugely when I put it in sleep. I've looked around a bit and the issue seems to be that my model doesn't support S3 sleep mode, but only S0. I'm not sure why this mode performs so poorly, it's basically consuming as much battery as if I'd just left it on.

Model: Lenovo T14s gen 4 AMD
BIOS version: 1.16
OS: Kubuntu 23.10
Kernel version: 6.5.0-21

Anyone know of any fixes?

Is it warm to the touch if you put it to sleep and then come back to it some time later?

mila kunis
Jun 10, 2011

Saukkis posted:

The simple solution is to unplug it first and then put it to sleep, if you can't keep it plugged in. My new work laptop drained the battery few times over weekend, and when I started using that routine it hasn't happened again.

Linus Tech Tips did a video about this issue with some possible remedies.

Microsoft is Forcing me to Buy MacBooks - Windows Modern Standby

I always shut it unplugged.

Goon Matchmaker posted:

Is it warm to the touch if you put it to sleep and then come back to it some time later?

Nope

AlexDeGruven
Jun 29, 2007

Watch me pull my dongle out of this tiny box


Dyscrasia posted:

What is the correct method to mount cifs shares with current Fedora?

I am successful in doing so with my fstab and assigning the uid to my user. The problem is that I need access to the mount command which is removed with every kernel update. I assume I'm doing it wrong because of this permission change that keeps happening.

I switched one of my shares to a systemd mount unit which also works, but puts the share in the file browser favorites section rather than the mounted drives section.

What is the fedora prescribed way to mount shares on boot/logon? I would prefer mount on login rather than access.

Are you changing permissions/ownership of the actual mount executable? That would explain why updates break it if that's the case.

If not, what are you changing that's getting overwritten with updates?

40Inch
Aug 15, 2002

mila kunis posted:

My laptop battery is draining hugely when I put it in sleep. I've looked around a bit and the issue seems to be that my model doesn't support S3 sleep mode, but only S0. I'm not sure why this mode performs so poorly, it's basically consuming as much battery as if I'd just left it on.

Model: Lenovo T14s gen 4 AMD
BIOS version: 1.16
OS: Kubuntu 23.10
Kernel version: 6.5.0-21

Anyone know of any fixes?

Huh, my wife told me the other day her Lenovo IdeaPad Slim AMN8 does the same thing.

Model: IdeaPad Slim 3 15AMN8
BIOS: L1CN28WW
OS: Fedora Silverblue
Kernel: 6.7.6-200

Also, I guess sometimes it doesn't sleep properly and the power light stays solid, the screen turns off but when she opens the lid the screen doesn't come back on.

For now she's just been shutting it down before closing the lid.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

mila kunis posted:

My laptop battery is draining hugely when I put it in sleep. I've looked around a bit and the issue seems to be that my model doesn't support S3 sleep mode, but only S0. I'm not sure why this mode performs so poorly, it's basically consuming as much battery as if I'd just left it on.

Model: Lenovo T14s gen 4 AMD
BIOS version: 1.16
OS: Kubuntu 23.10
Kernel version: 6.5.0-21

Anyone know of any fixes?

Isn’t S0 “not sleeping”, in that it’s the fully-powered state (ignoring C-states that can turn off pieces of the CPU to save power when it’s not under load)?

pseudorandom name
May 6, 2007

Modern Standby aka Connected Standby aka S0ix is a low power mode that stays in S0 and doesn't use the now Legacy S1-S5 power states.

lobsterminator
Oct 16, 2012




RFC2324 posted:

I mean, its linux. I fully expect wayland to be abandoned any day now and replaced with something else that leaves us using X11 for another decade

Wayland will be replaced with Waylon.

https://www.youtube.com/watch?v=8YzSHIYxdRs

Dyscrasia
Jun 23, 2003
Give Me Hamms Premium Draft or Give Me DEATH!!!!

AlexDeGruven posted:

Are you changing permissions/ownership of the actual mount executable? That would explain why updates break it if that's the case.

If not, what are you changing that's getting overwritten with updates?

Yes, exactly that and I know that's why it's breaking, but that is how I was able to get fstab mounts working. In fedora, you have to sudo to use mount. Should I not be defining my uid and gid my fstab mounts?

I'm at the point where I can just make it work, but I must be missing the "correct" way to do this.

Here is how I'm running these right now:
//192.168.11.100/backups /media/backups cifs credentials=/root/.smbcreds,rw,uid=1000,gid=1000 0 0

Dyscrasia fucked around with this message at 11:43 on Mar 1, 2024

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.
What happens when you set the "user" option? I thought that does what you need.

AlexDeGruven
Jun 29, 2007

Watch me pull my dongle out of this tiny box


Dyscrasia posted:

Yes, exactly that and I know that's why it's breaking, but that is how I was able to get fstab mounts working. In fedora, you have to sudo to use mount. Should I not be defining my uid and gid my fstab mounts?

I'm at the point where I can just make it work, but I must be missing the "correct" way to do this.

Here is how I'm running these right now:
//192.168.11.100/backups /media/backups cifs credentials=/root/.smbcreds,rw,uid=1000,gid=1000 0 0

I mean, the short way would be using sudo, particularly if it's something you want to do manually after login. You could even set the specific mount command as a NOPASSWD option in sudoers and add it to your login scripts.

Adbot
ADBOT LOVES YOU

Dyscrasia
Jun 23, 2003
Give Me Hamms Premium Draft or Give Me DEATH!!!!

VictualSquid posted:

What happens when you set the "user" option? I thought that does what you need.

That looks like it's exactly what I was missing. RTFM on my part for sure, thank you!

Dyscrasia fucked around with this message at 15:55 on Mar 1, 2024

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