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
Klyith
Aug 3, 2007

GBS Pledge Week

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.

40Inch posted:

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

Have yall checked in the BIOS settings? Some lenovo laptops have a sleep setting where they literally label the options "Linux" or "Windows". Linux is where they re-enable S3 sleep instead of modern standby.

Otherwise, I think what you need to do is make sure hibernation is enabled in your desktop environment settings. And directly hibernate instead of sleep if you want max battery life.




AlexDeGruven posted:

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.

After it's defined in fstab you may be able to use KDE or Gnome settigns to auto-mount it on login. Whatever method they're using doesn't require elevation.

This is what I ended up doing for my LUKS encrypted drives: I haven't encrypted my home or root so I don't need to type in a password just to boot / login. Then I have the drives set to automount in KDE, which allows me to save the password in KDE wallet so I don't have to type it in.

(This is less secure since it puts full access behind my relatively easy user password, but I'm not dealing with anything that needs heavy security.)

Adbot
ADBOT LOVES YOU

DrSunshine
Mar 23, 2009

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

DrSunshine posted:

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?

I just wanted to say I fixed this.

I don't know what it was, but I just installed Arch so I could get Plasma 6, and installed the Nvidia proprietary drivers, and now Wayland works fine somehow. Magic!

ziasquinn
Jan 1, 2006

Fallen Rib
Arch, it just works

cruft
Oct 25, 2007

ziasquinn posted:

Arch, it just works

:hmmno:

mila kunis
Jun 10, 2011

Klyith posted:

Have yall checked in the BIOS settings? Some lenovo laptops have a sleep setting where they literally label the options "Linux" or "Windows". Linux is where they re-enable S3 sleep instead of modern standby.

Otherwise, I think what you need to do is make sure hibernation is enabled in your desktop environment settings. And directly hibernate instead of sleep if you want max battery life.

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?

Klyith
Aug 3, 2007

GBS Pledge Week

mila kunis posted:

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?

Nah, secure boot is pretty ignorable for most people. The threat it was designed to combat -- bootloader rootkits that could invisibly take over the innermost layer of your OS -- never actually materialized. It has ended up mostly being a hassle for people who want to run linux or other non-MS OSes and of very little practical value.


Digression: To be fair to secure boot, that might be because it got implemented before Russia & China had gotten quite so enthralled with state-sponsored hacking. So they didn't bother with bootloader rootkits, and went directly to firmware rootkits instead. "Ok, now we control the lowest-level code on your machine. What now?" Well, at that point you have to do crazy stuff like blow fuses in the CPU to vendor lock it so it only boots with Official Signed Lenovo (or whoever) firmware. So if your firmware gets messed with the machine can't boot at all. But you can't use the CPU anywhere else.


Anyways, I have never had secure boot turned on since it was invented, purely for convenience reasons, and never felt this was putting me at risk. I don't think I've ever heard about a major attack which would have been foiled by secure boot.

If it's a business machine for health care or finance, or you do classified poo poo, this advice null and void.

Spyderizer
Feb 18, 2004
Posted in the linux gaming thread, but I might ask here.

Running Kubuntu, the latest version seems to not want to detect my controller. I can see it with bluetoothctl, KDE shows its connected and I can use the KDE system settings to calibrate, I'm not getting any obvious hints from journalctl -f when I launch steam.

dmesg says

[ 106.740903] input: Xbox Wireless Controller as /devices/virtual/misc/uhid/0005:045E:0B22.000B/input/input33
[ 106.741716] input: Xbox Wireless Controller Keyboard as /devices/virtual/misc/uhid/0005:045E:0B22.000B/input/input34

Is there anything I could be doing to troubleshoot, or am I basically waiting for the next update?

Ihmemies
Oct 6, 2012

I just wanted to install a new package, but no, linux today says poo poo is broken and I can't use apt-get anymore:

code:
Err:5 https://packages.sury.org/php bullseye InRelease
  The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php bullseye InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Failed to fetch https://packages.sury.org/php/dists/bullseye/InRelease  The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Some index files failed to download. They have been ignored, or old ones used instead.
Just what the doctor ordered for saturday evening...

Is there some "easy" way to unfuck this situation? I just want to install more packages for my Debian.

Ihmemies fucked around with this message at 17:05 on Mar 2, 2024

spiritual bypass
Feb 19, 2008

Grimey Drawer
Scuse me if this is redundant, but did you paste the error line into a search engine yet? You won't be the only one having that problem

Rescue Toaster
Mar 13, 2003
A dumb syslog/journal question:

I have a debian machine that's only running journald, no rsyslogd. (So there is no /var/log/syslog*) There's a service (nut-client, aka upsmon) that writes to syslog.

Shouldn't this be putting stuff into the journal? I can't see any of the messages I used to expect from upsmon with journalctl -u nut-client.service nor journalctl -xe.

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

Ihmemies posted:

I just wanted to install a new package, but no, linux today says poo poo is broken and I can't use apt-get anymore:

code:
Err:5 https://packages.sury.org/php bullseye InRelease
  The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php bullseye InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Failed to fetch https://packages.sury.org/php/dists/bullseye/InRelease  The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Some index files failed to download. They have been ignored, or old ones used instead.
Just what the doctor ordered for saturday evening...

Is there some "easy" way to unfuck this situation? I just want to install more packages for my Debian.

They mishandled their key expiration: https://github.com/oerdnj/deb.sury.org/issues/2074

Try apt install debsuryorg-archive-keyring and you should be in business.

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.

Ihmemies posted:

I just wanted to install a new package, but no, linux today says poo poo is broken and I can't use apt-get anymore:

Is there some "easy" way to unfuck this situation? I just want to install more packages for my Debian.

This is something you can expect to happen every now and then if you want to use third party repositories outside the distro. Many of these organizations just don't have the required experience in maintaining a repository and issues crop up regularly.

Twerk's advice probably works, but if you come across a similar issue again and there are no published fixes, if you want to install something that isn't in this specific repo then the expedient solution is to comment out the repo from /etc/apt/sources.list or sources.list.d/something.repo.

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug
It could be worse; about ten years ago I was trying to use FreeNAS (I think?) and it turns out that the entire package management repo they shipped their product with had been down for seven months and I got yelled at by bsd nerds for not reading the forum post about updating your package repo, when they had been pushing changes to the codebase for that entire time; never once did they think to change that configuration apparently.

AlexDeGruven
Jun 29, 2007

Watch me pull my dongle out of this tiny box


It's really fun when the mainstream repos gently caress their SSL certs. I couldn't update my RHEL boxes for a couple of days last year because of it.

BrainDance
May 8, 2007

Disco all night long!

I have two NICs. A VPN client runs on my router. In my home server/Jellyfin client (it's got that 2070s in it for transcoding might as well also use it for watching movies), one of the IPs goes through the VPN, then the other does not.

So I'm basically routing a bunch of stuff different places, like my jellyfin server and stuff goes through the no-VPN one, but then torrents and web browsing and stuff goes through the VPN one. The default one is the VPN one, mostly I route things by port. I doubt I'm doing this the best way but that doesnt matter probably, it mostly works.

Except one thing, curl. As a part of a script for updating DNS stuff, it has myip=$(curl --interface enp3s0 "https://api.ipify.org")

enp3s0 is the no-vpn one. It does not work.
"curl: (7) Failed to connect to api.ipify.org port 443 after 9361 ms: Couldn't connect to server"

If I just do it without specifying the interface it works perfectly fine, except, of course, it gets my VPNs IP.

So I thought, ok, that one is going straight through Chinese Internet. Lots of stuff outside China cant be connected to without a VPN even if it's not "blocked", because it's just so slow. Maybe that's the problem. So I SSHed into my router since doing it there obviously isn't behind my VPN, ran curl "https://api.ipify.org", and it works perfectly. ms later there's my IP. So it's not that. It should be able to connect just fine?

I try to ask good questions, always include everything necessary, try to ask things in a specific way. Honestly though, I have no idea what else to even include to figure this out. I don't have any ideas or know what logs or configuration stuff would even be relevant, no idea what else to test. But, hoping someone could have any clue, why is my curl hosed when I specify the interface? Or possibly, why is that interface hosed and works for everything but apparently not curl?

waffle iron
Jan 16, 2004
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.

waffle iron fucked around with this message at 16:13 on Mar 3, 2024

isaboo
Nov 11, 2002

Muay Buok
ขอให้โชคดี
Anyone using the newly released Plasma 6? I have it on my Arch install and the only negative thing I've noticed so far is the loading time once I login. With Plasma 5 it only took a couple of seconds to get past the splash screen, now it's around 30. I didn't see anything wonky in journalctl.

The behavior is the same with Wayland and X11. Good news is I'm not seeing any weird artifacts with Wayland so that's a step forward.

Well Played Mauer
Jun 1, 2003

We'll always have Cabo
That’s awesome re: Wayland. I started running it with a 3080 in plasma 5 just to prepare and outside of some electron apps running like poo poo it’s been pretty solid outside of waking from sleep issues.

I’m probably gonna wait until Fedora 40 drops next month just to see some additional bugs get ironed out but I’m excited to move over to 6.

Klyith
Aug 3, 2007

GBS Pledge Week

Well Played Mauer posted:

That’s awesome re: Wayland. I started running it with a 3080 in plasma 5 just to prepare and outside of some electron apps running like poo poo

Try using --enable-features=UseOzonePlatform --ozone-platform=wayland as launch arguments on the electron apps that suck to see if they do better with native wayland.

Chromium & electron are not 100% on wayland support so I can't promise no crashes. But the one electron app I use most (Obsidian) feels much nicer running native & has been totally stable.

Satire Forum Mom
Oct 4, 2003
MY CUNT DRIPS BROWN REFUSE LIKE A DIRTY HOOKAH. PS. THE BACK OF MY THIGHS ARE RIDICULOUS - COTTAGE CHEESE ANYONE?

isaboo posted:

Anyone using the newly released Plasma 6? I have it on my Arch install and the only negative thing I've noticed so far is the loading time once I login. With Plasma 5 it only took a couple of seconds to get past the splash screen, now it's around 30. I didn't see anything wonky in journalctl.

The behavior is the same with Wayland and X11. Good news is I'm not seeing any weird artifacts with Wayland so that's a step forward.

What icons are you using? I’m using Papirus Dark and for some icons it’s falling back on Breeze icons. Other than that, it’s great.

Well Played Mauer
Jun 1, 2003

We'll always have Cabo

Klyith posted:

Try using --enable-features=UseOzonePlatform --ozone-platform=wayland as launch arguments on the electron apps that suck to see if they do better with native wayland.

Chromium & electron are not 100% on wayland support so I can't promise no crashes. But the one electron app I use most (Obsidian) feels much nicer running native & has been totally stable.

Good call. I did this for Brave, i think, and it helped. Didn't think to bother with Slack or Discord because i had them in flatpak. Can you modify the arguments via the .desktop file in the same way?

Volguus
Mar 3, 2009

isaboo posted:

Anyone using the newly released Plasma 6? I have it on my Arch install and the only negative thing I've noticed so far is the loading time once I login. With Plasma 5 it only took a couple of seconds to get past the splash screen, now it's around 30. I didn't see anything wonky in journalctl.

The behavior is the same with Wayland and X11. Good news is I'm not seeing any weird artifacts with Wayland so that's a step forward.

I'm using it in Fedora 40. Still rough around the edges here. I addition to that long startup time (that I haven't figure out where it comes from) the Energy Savings panel in the settings crashes the settings application. And the reason I wanted to use it is because for some reason now it doesn't respect instructions to not blank the monitors after 10 minutes when told by a media player. Looking at the core dump it seems it cannot find some QML file.

But this is Fedora 40, alpha, so things to be broken is expected. Other than that it works ...

Klyith
Aug 3, 2007

GBS Pledge Week

Well Played Mauer posted:

Good call. I did this for Brave, i think, and it helped. Didn't think to bother with Slack or Discord because i had them in flatpak. Can you modify the arguments via the .desktop file in the same way?

For regular apps if you're editing the .desktop file manually, you just throw it in the Exec= line like so:
code:
Exec=/usr/bin/obsidian --enable-features=UseOzonePlatform --ozone-platform=wayland %U
For the flatpaks? I don't do flatpak, but seems like flatpak run flatpak.app arguments will pass through the arguments. So you could edit your .desktop files to do that. But apparently there's no way to set them permanently on the flatpak itself.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

This article seems to summarize the alternate approaches pretty well, from a scan:

https://ardasevinc.hashnode.dev/launch-flatpak-apps-with-custom-args-and-environment-variables

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.
So, I am temporarily using a TV as my second monitor.
When I step away kde sends the monitor switch off signal, as intended.
Which turns the TV off and I have to turn it on again with the remote.
When I turn the computer off it doesn't send the signal and the tv skips to displaying a "no connection" banner. Which keeps going for at least half an hour, too lazy to test longer.

Anyways, how would I switch those behaviours? Especially adding the switching off to logout.
kde5 on opensuse if it matters.

acetcx
Jul 21, 2011

VictualSquid posted:

So, I am temporarily using a TV as my second monitor.
When I step away kde sends the monitor switch off signal, as intended.
Which turns the TV off and I have to turn it on again with the remote.
When I turn the computer off it doesn't send the signal and the tv skips to displaying a "no connection" banner. Which keeps going for at least half an hour, too lazy to test longer.

Anyways, how would I switch those behaviours? Especially adding the switching off to logout.
kde5 on opensuse if it matters.

Those types of HDMI control signals are called "HDMI CEC". I don't have any specific advice for you but that should point you in the right direction. It looks like there's a Linux utility called "cec-client" that might allow you to send the shutdown command and you could probably write a script to send it on logout.

Bozza
Mar 5, 2004

"I'm a really useful engine!"
is there an easy way to do a full system backup on a fully encrypted system? I've got a LVM on LUKS with encrypted GRUB laptop where I want to totally rip apart my config and probably start again with another distro but I'd like ideally to have a way to revert assuming it goes either pear shaped or I just don't get on with it

is it a simple rsync or do I need to be more clever than that given I want to clone the whole physical hard disk?

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.
Why not do a full binary backup? Like with rescuezilla, clonezilla or just dd? It feels correct for that situation. It will be an uncompressable waste of space, though.

Bozza
Mar 5, 2004

"I'm a really useful engine!"
that seems spot on for what I'm looking for, thanks!

Less Fat Luke
May 23, 2003

Exciting Lemon
I spent all day trying to figure out why my Debian install (and various live CDs) would *not* initialize a new AMD GPU correctly - installing backport kernels, firmware from the kernel git, custom building a kernel, a million different things. Eventually I found a setting in my BIOS named "BME DMA Mitigation" that immediately made it work even with the stock Debian stable kernel. Goddamnit computers.

Less Fat Luke fucked around with this message at 22:31 on Mar 5, 2024

mawarannahr
May 21, 2019

file is doing a really bad job at determining the file types of things -- for example, a file called __something__.py, with some assignments in it, is not being detected as a Python file without a shebang or an executable bit.

although file's man page suggests it looks at extensions, I've seen no evidence that it does. i tried mimetype, (powered by File::MimeInfo) and that correctly identified the Python files.

however, mimetype did not correctly identify valid troff man page files (for example, about half of the man pages that ship with restic), so I actually had to use file in the part of my script that looks for man pages.

is there a tool that's actually good?

BlankSystemDaemon
Mar 13, 2009



mawarannahr posted:

file is doing a really bad job at determining the file types of things -- for example, a file called __something__.py, with some assignments in it, is not being detected as a Python file without a shebang or an executable bit.

although file's man page suggests it looks at extensions, I've seen no evidence that it does. i tried mimetype, (powered by File::MimeInfo) and that correctly identified the Python files.

however, mimetype did not correctly identify valid troff man page files (for example, about half of the man pages that ship with restic), so I actually had to use file in the part of my script that looks for man pages.

is there a tool that's actually good?
FreeBSD (and the other BSDs?) uses this which has no problems identifying python scripts, even without the shebang.

It also identifies manual page files, although not in their compressed state.
Presumably it could be patched to use libarchive?

BlankSystemDaemon fucked around with this message at 11:33 on Mar 6, 2024

Computer viking
May 30, 2011
Now with less breakage.

Which reminds me: I have written a thing just now that requires users to give the MIME type of the files they are uploading. It's for a very niche audience, but I should still dig up the R equivalent to mimetools and allow them to leave that field empty.

Eh, later.

pseudorandom name
May 6, 2007

mawarannahr posted:

although file's man page suggests it looks at extensions, I've seen no evidence that it does.

where does it suggest that?

mystes
May 31, 2006

mawarannahr posted:

file is doing a really bad job at determining the file types of things -- for example, a file called __something__.py, with some assignments in it, is not being detected as a Python file without a shebang or an executable bit.

although file's man page suggests it looks at extensions, I've seen no evidence that it does. i tried mimetype, (powered by File::MimeInfo) and that correctly identified the Python files.

however, mimetype did not correctly identify valid troff man page files (for example, about half of the man pages that ship with restic), so I actually had to use file in the part of my script that looks for man pages.

is there a tool that's actually good?
File uses magic numbers and ignores extensions afaik

mawarannahr
May 21, 2019

pseudorandom name posted:

where does it suggest that?

this suggested it to me, weakly:
--extension: Print a slash-separated list of valid extensions for the file type found.

at least I expected it to output something but even on correctly identified files the output is ???.

so is there anything good, then? I am trying to find and distinguish between man pages, completion scripts in bash/zsh, and source code in other languages. i could try matching extensions in /etc/mime.types but it kinda feels like something should exist for this already?

mystes
May 31, 2006

mawarannahr posted:

this suggested it to me, weakly:
--extension: Print a slash-separated list of valid extensions for the file type found.

at least I expected it to output something but even on correctly identified files the output is ???.
I believe that outputs extension for file types it has recognized and knows the extension for. It doesn't mean it uses the extension of the actual file.

mawarannahr
May 21, 2019

mystes posted:

I believe that outputs extension for file types it has recognized and knows the extension for. It doesn't mean it uses the extension of the actual file.
yeah, it doesn't know the extension for anything either though!!

hifi
Jul 25, 2012

It looks like you can grep your magic file for "!:ext" and it will show you the files that it understands extensions for, but it sounds like it's not what you are looking for.

If you have a bunch of properly named files you can just do "wc *.py" etc. And if you don't then that sounds like a pain in the rear end so good luck.

Adbot
ADBOT LOVES YOU

pseudorandom name
May 6, 2007

The only thing that reliably knows if a given file is a specific type of file is the program that consumes those files, anything that externally tries to do it is going to be best effort at best.

Windows and Macintosh solved the problem by not bothering to try to guess the file type and just forced programs to label the files appropriately.

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