#StackBounty: #linux #command-line #voip #raspberry-pi #lan Terminal-based VoIP over LAN on Linux

Bounty: 100

I’m looking for a way to do voice chatting over my LAN without an Internet connection. The two machines both run Linux (they are Raspberry Pis, with the latest Raspbian Stretch Lite installed).

Programs like Skype won’t do the job, because they require an Internet connection and only run with a GUI. TeamSpeak would probably run without an Internet connection, but I don’t think that there is a way to start it without a desktop environment.

Do you know a program that would meet these requirements? Preferably an open source solution?


Get this bounty!!!

#StackBounty: #java #linux #spring-boot #log4j How to Extern log4j.properties file with Spring Boot Microservice and Run It As a Linux …

Bounty: 100

Have a Spring Boot (1.5.4.RELEASE) based microservice which I deploy a jar to an AWS EC Instance (Linux environment). Now, I am also deploying an external log4j.properties file so I have to start the microservice like this:

java -jar myapp.jar -Dlogging.config=/path/to/log4j.properties

How can I configure this Spring Boot Microservice as a Linux service where I can start and stop it using these flags:

sudo service myapp start | stop | status | restart

Thank you very much.


Get this bounty!!!

#StackBounty: #linux #audio #voip #raspberry-pi #lan Terminal-based VoIP over LAN on Linux

Bounty: 100

I’m looking for a way to do voice chatting over my LAN without an Internet connection. The two machines both run Linux (they are Raspberry Pis, with the latest Raspbian Stretch Lite installed). Programs like Skype won’t do the job, because they require an Internet connection and only run with a GUI. TeamSpeak would probably run without an Internet connection, but I don’t think that there is a way to start it without a desktop environment.

Do you know a program that would meet these requirements? Preferably an open source solution?


Get this bounty!!!

#StackBounty: #linux #filesystems #lvm #qemu QEMU + KVM + LVM – performance of block device drive vs file image

Bounty: 50

I’m creating new setup for my virtual machines and testing which method for storage is most fastest. My test environment consists of HDD drive with LVM on LUKS. I created single LV for virtual machine drive and reused it for both tests to maintain same place on HDD drive to maintain consistent performance (HDD read/write speed depends on physical position).

  • Host: Arch Linux, kernel 4.12.8
  • Guest: Ubuntu Desktop 17.04

Performance tested with command:

    dd if=/dev/zero of=test bs=16M count=100 conv=sync

First test: using LV directly as virtual machine’s drive

Command:

qemu-system-x86_64 
  -drive format=raw,file=/dev/mapper/vg_vm-lv_vm_test,if=virtio,aio=native,cache.direct=on 
  -net nic,model=virtio 
  -net user 
  -vga virtio 
  -display gtk,gl=on 
  -smp 3 
  -cpu host 
  -machine type=pc,accel=kvm 
  -m 3G

Results (each value represents single run):

  • Creating new file: 98.4 MB/s ; 112 MB/s
  • Writing to existing file: 62.5 MB/s ; 68.7 MB/s ; 64.8 MB /s

Second test: creating ext4 on LV and putting raw image file on that

Command:

qemu-system-x86_64 
  -drive format=raw,file=./ubuntu_17,if=virtio,aio=native,cache.direct=on 
  -net nic,model=virtio 
  -net user 
  -vga virtio 
  -display gtk,gl=on 
  -smp 3 
  -cpu host 
  -machine type=pc,accel=kvm 
  -m 3G

Results (each value represents single run):

  • Creating new file: 254 MB/s ; 242 MB/s
  • Writing to existing file: 187 MB/s ; 189 MB/s ; 190 MB/s

Third test: using LV directly as virtual machine’s drive, different settings

Command:

qemu-system-x86_64 
  -drive format=raw,file=/dev/mapper/vg_vm-lv_vm_test,if=virtio,cache=none 
  -net nic,model=virtio 
  -net user 
  -vga virtio 
  -display gtk,gl=on 
  -smp 3 
  -cpu host 
  -machine type=pc,accel=kvm 
  -m 3G

Results (each value represents single run):

  • Creating new file: 129 MB/s ; 125 MB/s
  • Writing to existing file: 103 MB/s ; 97 MB/s ; 81.9 MB /s

Question

Clearly there is difference between these two solutions however I expected raw block device to be at least as fast as image file because there should be no overhead of host’s filesystem. I suppose that some caching occurs in between for file image or options for raw block device are not optimal. Why is raw LV slower in this case? What can I do to improve its performance? Or if it just should be slower, then why?

EDIT: I added third test case using settings from: http://www.linux-kvm.org/page/Tuning_KVM. Turns out to be a bit faster but still slower than file image. I observed also that with each run for existing file it is getting slower – however fragmentation shouldn’t occur for file overwrite so I am not sure why it happens.


Get this bounty!!!

#StackBounty: #linux #drivers #devices #device-tree #mips How to debug a driver failing to bind to a device on Linux?

Bounty: 50

I am trying to figure out why the following device is not setup to its driver on my Creator CI20. For reference I am using a Linux kernel v4.13.0 and doing the compilation locally:

make ARCH=mips ci20_defconfig
make -j8 ARCH=mips CROSS_COMPILE=mipsel-linux-gnu- uImage

From the running system I can see:

ci20@ci20:~# find /sys | grep rng
/sys/firmware/devicetree/base/jz4780-cgu@10000000/rng@d8
/sys/firmware/devicetree/base/jz4780-cgu@10000000/rng@d8/compatible
/sys/firmware/devicetree/base/jz4780-cgu@10000000/rng@d8/name
/sys/bus/platform/drivers/jz4780-rng
/sys/bus/platform/drivers/jz4780-rng/bind
/sys/bus/platform/drivers/jz4780-rng/unbind
/sys/bus/platform/drivers/jz4780-rng/uevent

So the device is seen by the kernel at runtime, now the missing piece is why the driver is never binded ? I would have expected something like this:

/sys/bus/platform/drivers/jz4780-rng/100000d8.rng

I did find some other posts explaining how to debug a running system, such as:

While the information is accurate on those posts, it is not very helpful for me. Since I am building locally my kernel (I added printk in the probe function of jz4780-rng driver), my question is instead:

  • what option should I turn on at compile time so that the kernel prints an accurate information on its failure to call the probe function for the jz4780-rng driver ?
  • In particular how do I print the complete list of the tested bus/driver for driver_probe_device ?

I am ok to add printk anywhere in the code to debug this. The question is rather: which function is traversing the device tree and calling the probe/init function ?

For reference:

$ dtc -I fs -O dts /sys/firmware/devicetree/base | grep -A 1 rng
              rng@d8 {
                      compatible = "ingenic,jz4780-rng";
              };

compatible string is declared as:

cgu: jz4780-cgu@10000000 {
    compatible = "ingenic,jz4780-cgu", "syscon";
    reg = <0x10000000 0x100>;

    clocks = <&ext>, <&rtc>;
    clock-names = "ext", "rtc";

    #clock-cells = <1>;

    rng: rng@d8 {
        compatible = "ingenic,jz4780-rng";
    };
};

And in the driver as:

static const struct of_device_id jz4780_rng_dt_match[] = {
    {
        .compatible = "ingenic,jz4780-rng",
    },
    { },
};
MODULE_DEVICE_TABLE(of, jz4780_rng_dt_match);

static struct platform_driver jz4780_rng_driver = {
    .driver     = {
        .name   = "jz4780-rng",
        .of_match_table = jz4780_rng_dt_match,
    },
    .probe      = jz4780_rng_probe,
    .remove     = jz4780_rng_remove,
};
module_platform_driver(jz4780_rng_driver);

Update1:

When I build my kernel with CONFIG_DEBUG_DRIVER=y, here is what I can see:

# grep driver_probe_device syslog
Sep  6 10:08:07 ci20 kernel: [    0.098280] bus: 'platform': driver_probe_device: matched device 10031000.serial with driver ingenic-uart
Sep  6 10:08:07 ci20 kernel: [    0.098742] bus: 'platform': driver_probe_device: matched device 10033000.serial with driver ingenic-uart
Sep  6 10:08:07 ci20 kernel: [    0.099209] bus: 'platform': driver_probe_device: matched device 10034000.serial with driver ingenic-uart
Sep  6 10:08:07 ci20 kernel: [    0.106945] bus: 'platform': driver_probe_device: matched device 1b000000.nand-controller with driver jz4780-nand
Sep  6 10:08:07 ci20 kernel: [    0.107282] bus: 'platform': driver_probe_device: matched device 134d0000.bch with driver jz4780-bch
Sep  6 10:08:07 ci20 kernel: [    0.107470] bus: 'platform': driver_probe_device: matched device 16000000.dm9000 with driver dm9000
Sep  6 10:08:07 ci20 kernel: [    0.165618] bus: 'platform': driver_probe_device: matched device 10003000.rtc with driver jz4740-rtc
Sep  6 10:08:07 ci20 kernel: [    0.166177] bus: 'platform': driver_probe_device: matched device 10002000.jz4780-watchdog with driver jz4740-wdt
Sep  6 10:08:07 ci20 kernel: [    0.170930] bus: 'platform': driver_probe_device: matched device 1b000000.nand-controller with driver jz4780-nand

But only:

# grep rng syslog
Sep  6 10:08:07 ci20 kernel: [    0.166842] bus: 'platform': add driver jz4780-rng
Sep  6 10:08:42 ci20 kernel: [   54.584451] random: crng init done

As a side note, the rng toplevel node: cgu is not referenced here, but there is a jz4780-cgu driver.


Update2:

If I move the rng node declaration outside the toplevel cgu node, I can at least see some binding happening at last:

# grep rng /var/log/syslog 
Sep  6 10:30:57 ci20 kernel: [    0.167017] bus: 'platform': add driver jz4780-rng
Sep  6 10:30:57 ci20 kernel: [    0.167033] bus: 'platform': driver_probe_device: matched device 10000000.rng with driver jz4780-rng
Sep  6 10:30:57 ci20 kernel: [    0.167038] bus: 'platform': really_probe: probing driver jz4780-rng with device 10000000.rng
Sep  6 10:30:57 ci20 kernel: [    0.167050] jz4780-rng 10000000.rng: no pinctrl handle
Sep  6 10:30:57 ci20 kernel: [    0.167066] devices_kset: Moving 10000000.rng to end of list
Sep  6 10:30:57 ci20 kernel: [    0.172774] jz4780-rng: probe of 10000000.rng failed with error -22
Sep  6 10:31:32 ci20 kernel: [   54.802794] random: crng init done

Using:

    rng: rng@100000d8 {
        compatible = "ingenic,jz4780-rng";
    };

I can also verify:

# find /sys/ | grep rng
/sys/devices/platform/10000000.rng
/sys/devices/platform/10000000.rng/subsystem
/sys/devices/platform/10000000.rng/driver_override
/sys/devices/platform/10000000.rng/modalias
/sys/devices/platform/10000000.rng/uevent
/sys/devices/platform/10000000.rng/of_node
/sys/firmware/devicetree/base/rng@100000d8
/sys/firmware/devicetree/base/rng@100000d8/compatible
/sys/firmware/devicetree/base/rng@100000d8/status
/sys/firmware/devicetree/base/rng@100000d8/reg
/sys/firmware/devicetree/base/rng@100000d8/name
/sys/bus/platform/devices/10000000.rng
/sys/bus/platform/drivers/jz4780-rng
/sys/bus/platform/drivers/jz4780-rng/bind
/sys/bus/platform/drivers/jz4780-rng/unbind
/sys/bus/platform/drivers/jz4780-rng/uevent


Get this bounty!!!

#StackBounty: #linux #bluetooth #docker How to emulate Bluetooth inside a Docker container?

Bounty: 50

I’m trying to run a Linux application inside a docker container that expects the machine to support Bluetooth connections so it crashes with a “Can’t open HCI socket” error.

Now, the Bluetooth functionality is actually not needed for my specific use-case so I could manage with some sort of dummy Bluetooth driver that, for example, just acts like there are no other Bluetooth devices in range.

Is there any easy way to create such a virtual Bluetooth device inside a docker container? I cannot run the container in privileged mode or use the host’s Bluetooth resources.


Get this bounty!!!

#StackBounty: #linux #ubuntu #audio Ubuntu 16.10 no sound whatsoever

Bounty: 50

Audio used to work on my Ubuntu system (not as it should have, but it worked). Something happened recently, I have no idea what, but now I’ve completely lost sound.

I’ve basically tried everything that you can find looking at Google results for this problem. Here are some commands and their outputs:

Trying to open alsamixer:

bertalanp99@watermelon:~$ alsamixer
cannot open mixer: No such file or directory

Running lspci:

bertalanp99@watermelon:~$ lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation 8 Series/C220 Series Chipset Family KT Controller (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d4)
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d4)
00:1f.0 ISA bridge: Intel Corporation H87 Express LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 770] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio Controller (rev a1)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
04:00.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 41)

inxi output:

bertalanp99@watermelon:~$ inxi -Fxz
System:    Host: watermelon Kernel: 4.10.0-33-generic x86_64 (64 bit gcc: 6.3.0)
           Desktop: Gnome 3.24.2 (Gtk 3.22.11-0ubuntu3) Distro: Ubuntu 17.04
Machine:   Device: desktop Mobo: Gigabyte model: H87M-D3H v: x.x UEFI: American Megatrends v: F11 date: 08/18/2015
CPU:       Quad core Intel Core i5-4570 (-MCP-) cache: 6144 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 25540
           clock speeds: max: 3600 MHz 1: 3535 MHz 2: 3600 MHz 3: 3600 MHz 4: 3600 MHz
Graphics:  Card: NVIDIA GK104 [GeForce GTX 770] bus-ID: 01:00.0
           Display Server: X.Org 1.19.3 drivers: nvidia (unloaded: modesetting,fbdev,vesa,nouveau)
           Resolution: 1920x1080@60.00hz
           GLX Renderer: GeForce GTX 770/PCIe/SSE2 GLX Version: 4.5.0 NVIDIA 375.66 Direct Rendering: Yes
Audio:     Card-1 Intel 8 Series/C220 Series High Definition Audio Controller bus-ID: 00:1b.0
           Card-2 NVIDIA GK104 HDMI Audio Controller bus-ID: 01:00.1
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: d000 bus-ID: 03:00.0
           IF: enp3s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 4000.8GB (1.8% used)
           ID-1: /dev/sda model: WDC_WD10EZRX size: 1000.2GB
           ID-2: /dev/sdb model: WDC_WD10EZRX size: 1000.2GB
           ID-3: /dev/sdc model: WDC_WD20EZRX size: 2000.4GB
Partition: ID-1: / size: 98G used: 15G (16%) fs: ext4 dev: /dev/sda2
           ID-2: /home size: 98G used: 47G (50%) fs: ext4 dev: /dev/sda7
           ID-3: swap-1 size: 8.59GB used: 0.00GB (0%) fs: swap dev: /dev/dm-0
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 29.8C mobo: 27.8C gpu: 0.0:37C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 254 Uptime: 36 min Memory: 2805.4/7930.9MB Init: systemd runlevel: 5 Gcc sys: 6.3.0
           Client: Shell (bash 4.4.71) inxi: 2.3.8

I would be very grateful for any kind of help!


Get this bounty!!!

#StackBounty: #python #linux #process #multiprocessing #spawn Multiprocessing on linux works with "spawn" only?

Bounty: 50

Problem description
I adjusted the code from this answer a little bit (see below). However when running this script on Linux (so command line: python script_name.py) it will print jobs running: x for all the jobs but then just seems to stuck after that. However when I use the spawn method (mp.set_start_method('spawn')) it works out fine and immediately starts printing the value of the counter variable (see listener method).

Question

  • Why does it work only when spawning processes?
  • How can I adjust the code so it works with forc (because it’s probably faster)

Code

import io
import csv
import multiprocessing as mp

NEWLINE = 'n'

def file_searcher(file_path):
    parsed_file = csv.DictReader(io.open(file_path, 'r', encoding='utf-8'), delimiter='t')

    manager = mp.Manager()
    q = manager.Queue()
    pool = mp.Pool(mp.cpu_count())

    # put listener to work first
    watcher = pool.apply_async(listener, (q,))

    jobs = []
    for row in parsed_file:
        print('jobs running: ' + str(len(jobs) + 1))
        job = pool.apply_async(worker, (row, q))
        jobs.append(job)

  # collect results from the workers through the pool result queue
    for job in jobs:
        job.get()

    #now we are done, kill the listener
    q.put('kill')
    pool.close()
    pool.join()

def worker(genome_row, q):
    complete_data = []
    #data processing
    #ftp connection to retrieve data
    #etc.
    q.put(complete_data)
    return complete_data

def listener(q):
    '''listens for messages on the q, writes to file. '''
    f = io.open('output.txt', 'w', encoding='utf-8')
    counter = 0
    while 1:
        m = q.get()
        counter +=1
        print(counter)
        if m == 'kill':
            break
        for x in m:
            f.write(x + NEWLINE)
        f.flush()
    f.close()

if __name__ == "__main__":
   file_searcher('path_to_some_tab_del_file.txt')


Get this bounty!!!

#StackBounty: #windows #linux #c++ #ide #game-development Which IDE to use for C++ game development on windows and on Linux?

Bounty: 50

I am a java developer and I want to learn game programming in C++. I have been using Eclipse, Intellij(recently) for java development.

Please suggest which IDE is best for C++ development.
There are many out there like Visual Studio, CLion, Eclipse, etc.
Which one to use (Not based on ease of use but the best/rich for long run) ?

Also as I have heard that Linux environment is best to C++ developers, please suggest the best IDE for windows and Linux both.

Thanks !


Get this bounty!!!

#StackBounty: #linux #usb #external-hard-drive #fedora Fedora: Low disk space, use USB-Flashdrive for system updates?

Bounty: 50

I am using Fedora 24 on a Chromebook. Since Fedora 25 is out for quite a while, my applications won’t get the required updates until I update to Fedora 25.

I cannot update to Fedora 25 because I am limited to a 32GB Flash Memory that does not offer enough space, even if I empty all cache-directories etc.

I thought of using my 128GB USB-Flashdrive to extend the system space for the update. To not mess around with my setup, I’d like to ask what’s the preferred approach for my situation. Should I make symlinks for (which?) specific directories on the external USB-Drive that will be used to store the downloaded system-update files? This was my first thought but the longer I think about, the more it sounds like a dirty workaround to me.

What would you do?

Bonus: What directories could one store on the external USB permanently without requiring the USB to be plugged for the system to boot/work?

 -

;TLDR

My Harddrive is full but I need a system update. Can I use an external USB drive to update the system anyway?


Get this bounty!!!