linux

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

Frederic, (edited ) in Suspension on my laptop (closing the lid) causes Wifi to not be available.

You need to unload your wifi module before suspend.

Without systemd it’s easy:

create a file /etc/pm/config.d/config containing:


<span style="color:#323232;">HOOK_BLACKLIST="wireless"
</span><span style="color:#323232;">SUSPEND_MODULES=”NAME_OF_YOUR_WIFI_MODULE”
</span><span style="color:#323232;">SUSPEND_MODULES=”wl”
</span>

With systemd try this

create a file /usr/lib/systemd/system-sleep/fix-wifi.sh containing (fuck this editor, replace the “##” with “&&”) :


<span style="color:#323232;">#!/bin/bash
</span><span style="color:#323232;">[ "$1" = "post" ] ## exec /usr/sbin/modprobe NAME_OF_YOUR_WIFI_MODULE
</span><span style="color:#323232;">[ "$1" = "pre" ] ## exec /usr/sbin/modprobe -r NAME_OF_YOUR_WIFI_MODULE
</span><span style="color:#323232;">exit 0
</span>

and make it executable with chmod 755 /usr/lib/systemd/system-sleep/fix-wifi.sh

RossoErcole, (edited )
@RossoErcole@kbin.social avatar

It doesn't work, should it look like this the script?

#!/bin/sh
[ "$1" = "post" ] ## exec /usr/sbin/modprobe Intel Corporation Wireless-AC 9260
[ "$1" = "pre" ] ## exec /usr/sbin/modprobe -r Intel Corporation Wireless-AC 9260
exit 0

EDIT: should the name be something like wlp62s0 ??? I'm going to try it

Frederic, (edited )

you have to replace the ## with &&

the name should be iwlwifi

RossoErcole, (edited )
@RossoErcole@kbin.social avatar

how do I check the name? because iwlwifi doesn't work

Frederic, (edited )

well, are you sure the script is executed? I don’t know systemd enough :-(

First, do a test in command line modprobe -r iwlwifi

then suspend your laptop, resume it after a few seconds then do

modprobe iwlwifi

and see if wifi is working

RossoErcole, (edited )
@RossoErcole@kbin.social avatar

Yeah, thanks for the help even if you don't know much. I get stuck on the first command where I get this error:

rmmod: ERROR: ../libkmod/libkmod-module.c:799 kmod_module_remove_module() could not remove 'iwlmvm': Operation not permitted
rmmod: ERROR: could not remove module iwlmvm: Operation not permitted
rmmod: ERROR: Module iwlwifi is in use by: iwlmvm
modprobe: FATAL: Error running remove command for iwlwifi


Frederic,

yes of course

sudo modprobe -r iwlwifi

RossoErcole,
@RossoErcole@kbin.social avatar

I've tried. After suspension but before modprobe the wifi is not available, after modprobe it is there, but is disabled and cannot be enabled.

xkoe, (edited ) in Suspension on my laptop (closing the lid) causes Wifi to not be available.

Is your laptop, by any chance, an HP? I had the same issue with wifi and finally, after about a year of frustration, found the solution HERE. To save a click, here’s the part that worked for me, with the disclaimer that I don’t honestly know how this works, but by the time I found it I was frustrated enough to run random code from the internet with sudo privileges on my main machine:

First, create the file

/etc/systemd/system/hp-keycodes.service

and type/copy-paste the following into it:

[Unit]
Description=HP setkeycodes fix

[Service]
Type=oneshot
Restart=no
RemainAfterExit=no
ExecStart=/usr/bin/setkeycodes e057 240 e058 240

[Install]
WantedBy=rescue.target
WantedBy=multi-user.target
WantedBy=graphical.target

Then, run the following commands:

sudo systemctl daemon-reload
sudo systemctl enable --now hp-keycodes.service

That fixed it for me, hopefully it helps you (or someone else) as well!

RossoErcole,
@RossoErcole@kbin.social avatar

no I have an MSI, but I hope in some ways this script helps people that might know more about it.

olutukko, in Looking to switch to Linux in the somewhat distant future

Fedora is neat

slacktoid, in How many of you run a Linux phone (Pine64, Librem etc) as your daily driver?
@slacktoid@lemmy.ml avatar

Does sailfish os count?

MigratingtoLemmy,

Is it for feature-phones?

itsaj26744, in How many of you run a Linux phone (Pine64, Librem etc) as your daily driver?
@itsaj26744@programming.dev avatar

I use Kaios , Another embedded linux

Helix,

Which phone?

itsaj26744,
@itsaj26744@programming.dev avatar

Jiophone F220b

MigratingtoLemmy,

Do you specifically use feature-phones?

itsaj26744,
@itsaj26744@programming.dev avatar

Life is nice this way, No bzz, Everything supposed to be done by a phone is handled perfectly by this small thing and for rest (like office,game and code) I go with PC

MigratingtoLemmy,

How do you do instant messaging? Isn’t typing with that harder than average?

itsaj26744,
@itsaj26744@programming.dev avatar

That’s also a thing but I use xmpp,matrix on pc (which I rarely do). BTW I forgot to mention I am full time student so…

MigratingtoLemmy,

Essentially, your usage of your mobile ends with calling?

Unfortunately, that won’t work for me since I need a browser to check my accounts and other needs on the move

itsaj26744,
@itsaj26744@programming.dev avatar

I have actually tied everything to my email so all updates are in my inbox. Calling + email,music,text,calendar,notes,todo and we have a brower for basic ddg searches

Smk, in Looking to switch to Linux in the somewhat distant future

Use Archlinux. Reason ? Because you will be able to say " I use Arch btw".

Btw, I use Arch.

Rangus97, in How do I get Nviddia drivers to work in arch?

If it ends up being Optimus, I’ve found optimus-manager-qt from the aur to be great. You don’t have to mess around with configs and you can make switching or setting to Nvidia permanently really easy with it

db2, in How to run command or code in parallel in bash shell under Linux or Unix

Why would you make a one line command in to a function 🤣

WalrusByte,
@WalrusByte@lemmy.world avatar

It’s just a proof of concept. They wanted to keep it clean and easy to read while still showing off how to run the function in the background

db2,

Adding three extra lines to call a single command makes it clean? Remind me not to hire you.

Helix,

Do you know what the word ‘example’ means? There are people who aren’t as superbly knowledgeable as you are.

eager_eagle,
@eager_eagle@lemmy.world avatar

only a masochist would want to work with anyone this dense

cashews_best_nut,

What’s the point in commenting just to be a dick head?

db2,

You tell me.

sebsch,

Readability counts, toxic comments … not sure

jsh, in openSUSE Logo Contest Concludes With Winners Selected

I…

LunchEnjoyer, in openSUSE Logo Contest Concludes With Winners Selected
@LunchEnjoyer@lemmy.world avatar

Honestly not sure what to make of think of this…

Stillhart, in Looking to switch to Linux in the somewhat distant future

If you game, and especially if you use nvidiva, I’d recommend Pop!_OS or Nobara.

thespezfucker,

I’ll take note

sentient_loom, in openSUSE Logo Contest Concludes With Winners Selected
@sentient_loom@sh.itjust.works avatar

I know this is dumb, but cute animal logos is the reason I refuse to learn Go.

janAkali,

IMO, go’s gopher is ugly, not cute. But, anyway, there are better reasons not to learn Go.

sentient_loom,
@sentient_loom@sh.itjust.works avatar

I’m curious to know those reasons. I’d like to pretend that I have a valid argument against Go.

janAkali, (edited )

For one - the error handling. Every codebase is filled with messy, hard to type:


<span style="color:#323232;">if err != nil {
</span><span style="color:#323232;">    ...
</span><span style="color:#323232;">}
</span>

And it doesn’t even give you a stack trace to debug the problem when an error happens, apparently.

Second reason - it lacks many features that are generally available in most other languages. Generics is the big one, but thankfully they added them in last half a year or so. In general Golang’s design principle is to implement only the required minimum.

And probably most important - Go is owned by Google, aka the “all seeing eye of Sauron”. There was recently a big controversy with them proposing adding an on-by-default telemetry to the compiler. And with the recent trend of enshittification, I wouldn’t trust google or any other mega-corporation.

sentient_loom,
@sentient_loom@sh.itjust.works avatar

Yeah the “owned by google” thing is a big turn-off. And telemetry… he’ll no. Also it’s weird that Go doesn’t have a ternary. It’s a small thing, but it’s a thing.

BarrierWithAshes, (edited )
@BarrierWithAshes@kbin.social avatar

That gopher is literally the reason I have been considering learning go. Same with plan 9.

DannyBoy,

Guess you’re stuck with C++

sentient_loom,
@sentient_loom@sh.itjust.works avatar

Right, the only other language.

DannyBoy,

Because it has an animal mascot that’s not cute.

savvywolf,
@savvywolf@pawb.social avatar

Poor Keith. ;_;

sentient_loom,
@sentient_loom@sh.itjust.works avatar

I didn’t even know they has a mascot. And now my idiot-brain wants to learn c++ for a bad reason (on top of some good reasons).

IrritableOcelot, in Rust for Linux — in space [LWN.net]

Huh, the idea of running a general purpose and a real-time kernel side-by-side is new to me. Makes sense though, pretty cool!

highduc, in What are you most excited when it comes to linux in 2024?

I hope Valve will make the Index VR work again after breaking it with the 2.x updates in October :')

callyral, in Bored With Bash? Change the Default Shell in Linux
@callyral@pawb.social avatar

i use nushell

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #