The small linux problem thread

LMAO that word did not mean what I thought it meant:

a person who derives sexual gratification from their own pain or humiliation.

I’m dying :joy: :joy: :rofl:

I really, really like Fedora but I like the Arch logo the best :man_shrugging:

Pretty stupid reason to use a distro, but I’ll always have Arch around despite the loathing I hold for their community and their way of doing things.

1 Like

Ormyou idiots could run void, not have systemd, andmrun an actual network stack.

What do you mean “run an actual network stack?” what’s wrong with network manager?

Also, void is even more of a meme than Arch.

It has to talk to that thing

Also I take offense to that. At least wemdon’t get triggered over you not using the 2 hidden bots in irc.

You have a lot of hate for a project that made things a hell of a lot easier.

I, for one, welcome systemd-office

1 Like

You are worse than Shitler

I don’t hate systemd, I just hate when it decides my efi boot doesn’t need to exist anymore or ever again.

Leave init as init. Not as another fucking kernel.

I found this article interesting for understanding who would like Void:

Void Linux covers use cases where a simple, small, reliable, modular, maleable Linux is needed. Void Linux works best when administered by a POSIX-aware admin or a user with some degree of programming or scripting chops, who doesn’t object to rolling up his/her sleeves and reaching into the internals. Someone who wants absolute control over the system, without having to manipulate, push aside, or drill through too many layers of abstractions. Someone who either doesn’t have the funding to outsource administration, or believes “if you want it done right, do it yourself.”

And it also gives reasons some might not like Void. This one applies to me:

Some businesses and individual prioritize having a distro used by millions, so that when they have a problem, it’s likely that a simple web search can turn up instances of that same problem, and solutions that worked. And if need be, it’s easy to find and talk to others using that distro. This paragraph’s use case is best handled by Ubuntu, Debian, OpenSuSE, or Redhat.

And then there’s the risk of abandonment with smaller distros. The main dev of Void is apparently MIA and the resources are in limbo:
https://www.voidlinux.eu/news/2018/05/serious-issues.html

2 Likes

Working against systemd is working backwards against technology. It’s like wanting to use DOS instead of 7 or 10.

I know that people do it, and blah blah blah telemetry, but no thanks

1 Like

If I needed to avoid systemd, FreeBSD would be my first consideration.

While we’re hating on the work of Lennart Poettering, does anyone have a sane config for pulse audio? I’d like a config where the quality isn’t pegged at 48000/16.

Whenever I change the stock settings in daemon.conf, I get choppy garbage. I’m using a USB to SPDIF converter to a Denon receiver. Spec says it supports 96000/24.

I’m trying to setup vfio passthrough for my graphics card on NixOS and I’m having trouble getting the card to not bind to the Nvidia drivers. I have added both nouveau and nvidia to the blacklist in modprobe and also included it in my kernel command line:

Kernel command line: initrd=\efi\nixos\y93vpwgdf6b7j28yxn1bnq8y810x767b-initrd-initrd.efi systemConfig=/nix/store/nh7mcrhf1c8ij1v8sgdvaj40m1frvdk6-nixos-system-nixos-18.03.132687.14c248a4ab7 init=/nix/store/nh7mcrhf1c8ij1v8sgdvaj40m1frvdk6-nixos-system-nixos-18.03.132687.14c248a4ab7/init loglevel=4 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau rd.driver.blacklist=nvidia iommu=1 amd_iommu=on rd.driver.pre=vfio-pci

vfio does find and bind to my card during boot

[    5.188478] VFIO - User Level meta-driver version: 0.3
[    5.196157] vfio_pci: add [10de:1244[ffff:ffff]] class 0x000000/00000000
[    5.196163] vfio_pci: add [10de:0bee[ffff:ffff]] class 0x000000/00000000

but the Nvidia drivers are still loaded onto the card

0f:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF116 [GeForce GTX 550 Ti] [10de:1244] (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device [1043:83c2]
        Kernel driver in use: nvidia
        Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

Does anyone have an ideas on how to get the Nvidia drivers not to bind to the second GPU? I have this setup working on Fedora but it doesn’t on NixOS.

Also here is the boot config for NixOS that shows how I have vfio setup if it helps.

  boot = {
    loader = {
      # Use the systemd-boot EFI boot loader.
      systemd-boot.enable = true;
      efi.canTouchEfiVariables = true;
    };
    kernelPackages = pkgs.linuxPackages_4_16;
    kernelParams = [ "rd.driver.blacklist=nouveau" "modprobe.blacklist=nouveau" "rd.driver.blacklist=nvidia" "iommu=1" "amd_iommu=on" "rd.driver.pre=vfio-pci" ];
    blacklistedKernelModules = [ "nvidia" "nouveau" ];
    kernelModules = [ "kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
    extraModprobeConfig = ''options vfio-pci ids=10de:1244,10de:0bee'';
  };
1 Like

I have this is /etc/pulse/daemon.conf:

default-sample-rate = 96000
alternate-sample-rate = 48000

Works with my FiiO E17K.

If you don’t use the proprietary nvidia driver, I would start by ininstalling it.
As for the modules being loaded, that could be because your initramfs doesn’t know you’ve blacklisted the nvidia and nouveau modules. Check the NixOS documentation on how to do that, I’ve never used that distro myself.

thanks for the reply, I finally got this working. I was referencing the cards id directly but decided to switch to using a vfio override script that I use on Fedora and it seems to work much better.

I changed my boot config to include a postBootCommand to run the script and my modprobe config to reference it also:

postBootCommands = ''/usr/bin/vfio-pci-override.sh'';
extraModprobeConfig = ''install vfio-pci /usr/bin/vfio-pci-override.sh'';

then modified the vfio override script to include the PATH for my bin folder on NixOS and it binds to the vfio driver on boot now.

#!/bin/sh
export PATH='/run/current-system/sw/bin/'${PATH:+':'}$PATH
for i in $(find /sys/devices/pci* -name boot_vga); do
    if [ $(cat $i) -eq 0 ]; then
        GPU=$(dirname $i)
        AUDIO=$(echo $GPU | sed -e "s/0$/1/")
        echo "vfio-pci" > $GPU/driver_override
        if [ -d $AUDIO ]; then
            echo "vfio-pci" > $AUDIO/driver_override
        fi
    fi
done
modprobe -i vfio-pci
1 Like

you should be able to have postBootCommands setup like this. Its also the more proper “NixOS” way todo it since it doesnt rely on a external dependency that can change without nixs knowledge of it

postBootCommands = ''
export PATH='/run/current-system/sw/bin/'${PATH:+':'}$PATH
for i in $(find /sys/devices/pci* -name boot_vga); do
    if [ $(cat $i) -eq 0 ]; then
        GPU=$(dirname $i)
        AUDIO=$(echo $GPU | sed -e "s/0$/1/")
        echo "vfio-pci" > $GPU/driver_override
        if [ -d $AUDIO ]; then
            echo "vfio-pci" > $AUDIO/driver_override
        fi
    fi
done
modprobe -i vfio-pci
''
1 Like

Have a funny little problem where I don’t even know where to begin looking.
System: RPi 2 with Alpine linux 3.7 (Kernel 4.9.65) used as LTE router
Problem: In my LTE stick is a microSD card reader in which is a card but that card will not be detected on insertion or on reboot and will only be deteced when I run things like “blkid”. How is that even possible? So the kernel doesn’t probe/poll the card reader? How do I solve that or even look for a solution?

The kernel auto detects devices on insertion. I’m not sure if blkid/lsblk does a more aggressive poll or something that the card possibly responds to, but that would be my first bet.

Second bet is that the SD card isn’t available until the antenna is ready, so it may not get picked up by udev because of that.

Thanks thats a much cleaner solution, my only issue is that the Modprobe line also has to reference that same file and as far as I’m aware it can’t run the commands directly like postBootCommands can e.g.

extraModprobeConfig = ''install vfio-pci /usr/bin/vfio-pci-override.sh'';

which would still require an external dependency.

Thanks for answering, thought nobody ever would be :slight_smile:
Alpine linux doesn’t use “udev” nor “systemd” but “mdev” and “openrc” :heart:

But the fun thing is, that the kernel detects the LTE stick > modem > ncm interface > card reader (sda) and then stops detecting. But as soon as I run “blkid” it also detects “sda1”. Looks like this:

usb 1-1.4: new high-speed USB device number 6 using dwc_otg
usb 1-1.4: New USB device found, idVendor=12d1, idProduct=1506
usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.4: Product: MOBILE
usb 1-1.4: Manufacturer: MOBILE
option 1-1.4:1.0: GSM modem (1-port) converter detected
usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1.4:1.1: GSM modem (1-port) converter detected
usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB1
huawei_cdc_ncm 1-1.4:1.2: MAC-Address:
huawei_cdc_ncm 1-1.4:1.2: setting rx_max = 16384
huawei_cdc_ncm 1-1.4:1.2: NDP will be placed at end of frame for this device.
huawei_cdc_ncm 1-1.4:1.2: cdc-wdm0: USB WDM device
huawei_cdc_ncm 1-1.4:1.2 wwan0: register ‘huawei_cdc_ncm’ at usb-3f980000.usb-1.4, Huawei CDC NCM device,
usb-storage 1-1.4:1.3: USB Mass Storage device detected
scsi host0: usb-storage 1-1.4:1.3
scsi 0:0:0:0: Direct-Access TF CARD storage ffff PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] Attached SCSI removable disk

Nothing after that without running “blkid”
After running “blkid”:

sd 0:0:0:0: [sda] 124735488 512-byte logical blocks: (63.9 GB/59.5 GiB)
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn’t support DPO or FUA
sda: sda1

The card is available before the antenna is ready, so that isn’t the issue here.

On another distro (Arch) that doesn’t seem to be happening, though that is “systemd” and who knows what crap that does :smiley:

If I run i3 in Fedora 28 on a Lenovo ThinkPad Chromebook x131e, how would I go about changing the screen brightness?

Or in other words, if you run i3, how do you change your screen brightness on your laptop? Thanks in advance

You can use brightnessctl to control the backlight of your display. first install it from the repo

sudo dnf install brightnessctl

then edit your i3 configuration file to contain something like this:

bindsym XF86MonBrightnessUp exec brightnessctl s 20%+
bindsym XF86MonBrightnessDown exec brightnessctl s 20%-

XF86MonBrightnessUp and down will bind to the brightness control keys on your keyboard but you can set them to whatever you want and brightnessctl s 20%+/- will increase/decrease the backlight by 20%.

2 Likes