Sunday, May 23, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


overlayfs duplicating files across overlays via NFS

Posted: 23 May 2021 08:44 AM PDT

On Linux 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux

Problem: I am trying to use overlayfs and NFS to aggregate media files into a set of exported filesystems. When I export more than one overlayed directory all the directories show the same files.

What I did: I have a few directories full of mkv/flac files. Each directory tracks where I got the file from; eg flac from ProStudioMaster or HDTracks etc. I do not want to combine them.

using this command works fine locally.

mount -t overlay overlay -o ro -o lowerdir=/storage/music/ProStudioMaster:/storage/music/HDTracks -o nfs_export=on -o index=on -o redirect_dir=nofollow /exports/music  

Via nfs I can also see the files with this entry in /etc/exports.d

/exports/music a.b.c.0/24(ro,insecure,all_squash,anonuid=x,anongid=y)  

If I subsequently add another overlay directory to /exports (e.g. /exports/mkv) with matching entry in /etc/exports.d then locally the behavior is correct, /exports/music shows music and /exports/mkv shows mkv. Remotely via NFS the two directories list the same files, depending on whichever one is ls'd first.

That is, on the NFS client, ls /mnt/music shows the same files as ls /mnt/mkv even though on the server the set of files is different.

thanks in advance for any help in resolving this.

How to list total number of lines of every txt file

Posted: 23 May 2021 10:04 AM PDT

I'am trying to figure out how to get total number of lines from all txt files. I think the problem is on the line 6. -> let $((total = total + count )). Anybody knows whats to correct form of this?

#!/bin/bash  total=0  find /home -type f -name "*.txt" | while read -r FILE; do            count=$(grep -c ^ < "$FILE")             echo "$FILE has $count lines"             let $((total = total + count ))          done          echo TOTAL LINES COUNTED:  $total  

Thank you

What is hyperthreading? How single core act as multiple thread? [closed]

Posted: 23 May 2021 08:21 AM PDT

I want to understand what is hyperthreading? According to me in hyperthreading single core act as multiple thread logically appear as different core. So I want to understand What instant of time is utilized to boost performance and is there any hardware difference between CPU support hyperthreading and that does not? If yes, Whats that?

Sudoer inside schroot (on Debian)

Posted: 23 May 2021 07:05 AM PDT

This is a typical schroot.conf configuration I use:

[label]  description=whatever  type=directory  personality=linux  preserve-environment=true  directory=/wherever  users=UserForSchrootOnly  profile=desktop_no_tmp  

No root-users directive.
Separate home directories for schroot env, not using host's /home.

I login with host OS's UserForSchrootOnly user to these schroot environments. I usually add this user to the /etc/sudoers.d/someConf file inside schroot, with a line,

UserForSchrootOnly ALL=(ALL:ALL) ALL  

One of my goals of this setup is to have a quite isolated environment (not for audit kind of strict isolation, but efficient in practice), both through schroot and by using an OS user only for this purpose and nowhere else. On the other hand, for practical reasons it's much easier to have this dedicated user to be sudoer also, inside the schroot env of course.
A use case is to run an untrusted closed source app.

My concern is:
Since UserForSchrootOnly user is a sudoer inside the schroot env, is it possible to be any compromise of security for the host system due to this? Any way to use sudo elevation inside schroot env, to access something outside of schroot or outside UserForSchrootOnly's home dir on the host system?

Man page of schroot.conf mentions that root access to chroot is a serious risk; I'm not concerned about user's misbehaviour. My concern is about the untrusted, closed source app, taking advantage of the sudoer user it runs.

Run command after ssh connection, without disconnecting

Posted: 23 May 2021 06:56 AM PDT

I want to run a command automatically after I connect to another machine via ssh, without the ssh session being closed automatically.

After searching the internet I found some solutions but none of them work the way I need.

ssh bla@bla "ls"  

This runs the ls command on the remote machine, shows me the output and closes the connection.

I also tried editing the ssh config file with

Host bla          HostName bla          User bla          IdentityFile ~/.ssh/key          RemoteCommand ls          RequestTTY force   

Same issue, this connects via ssh, runs the ls command, shows me the output and then exits. Not even the RequestTTY option helped.

ssh bla@bla "ls ; bash"  

This doesn't disconnect after running ls, but I don't get a full terminal interface, just some bare bones command line that doesn't show the me@machine:~$ thing.

What I actually want:

Either some bash alias, or .ssh/config entry that will allow me to type in a simple command which will connect to the remote machine and then run a command there and leave the terminal open. Basically as if I did this by hand:

type

ssh blah@blah  

and then after it connects I would type

ls  

Sorting Names in file in Lexicographic Order [migrated]

Posted: 23 May 2021 06:30 AM PDT

You have a text file eg:dataBaseSmall.txt that has names of your N friends and their corresponding mobile numbers in the following format. (A name (without spaces) followed by a space and the corresponding phone number) as follows

Kalimohan +917555501305  Bhooshit +918555346394  Ahsan +919055511641  Duranjaya +919155578267  Jahan +919655526742  Bharat +918555026818  

Your task is to write a program that reads the given file and prints the names in lexicographical order.

Example:

Input: dataBaseSmall.txt

6  

where dataBaseSmall.txt contains details of N = 6 friends.

    Kalimohan +917555501305      Bhooshit +918555346394      Ahsan +919055511641      Duranjaya +919155578267      Jahan +919655526742      Bharat +918555026818  

Output:

Ahsan  Bharat  Bhooshit  Duranjaya  Jahan  Kalimohan  

Explanation: The names are printed in lexicographic (dictionary) order.

My code:

#include <stdio.h>  #include <stdlib.h>  #include <string.h>    struct Friend{      char name[20];      char mobile[20];  };  typedef struct Friend Friend;     //feel free to use string functions such as strlen, strcmp etc.  //create functions and modularize your solution.   //solving this problem should take you a good amount of time. Have patience and take it as a challenge.     int main(){      char filename[100], str[100];      int N;      FILE* fp;            Friend* myFriends = (Friend*)malloc(N*sizeof(Friend));            scanf("%s", filename);      scanf("%d", &N);            fp = fopen(filename, "r");            fscanf(fp, "%s", *myFriends);      fprintf            fclose(fp);      return 0;  }  

Why Does the Wifi Lag During Google Meetings[Debian 10]?

Posted: 23 May 2021 08:19 AM PDT

I recently noticed that the Google and Zoom meetings; that I attend using Chrome, Firefox, started to lag. The lag usually endures for 4 seconds. During the lag spikes, my screen doesn't freeze, and OS is responding as usual. The other speakers become muted, and their cameras freeze. All of this ends after ~4 seconds pass. The lag spikes happen every few minutes.

My wifi stats:

    ping          -         download speed        -         upload speed   

enter image description here

I'm not able to test the issue of laggy meetings on Windows. Are there any other ways to further investigate the cause? Why do my meetings lag?

Why my zsh script doesn't echo anything?

Posted: 23 May 2021 09:56 AM PDT

script:

#!/bin/zsh    IFS=$'\n' arr=($(alias | grep 'git' | grep "^[g|\'g]" | sed 's/=.*//' | sed "s/'//"))    echo $arr  

These two lines work in the normal command line:

~/test ·····································································································································  test-Cj2sK_tx  ❮ IFS=$'\n' arr=($(alias | grep 'git' | grep "^[g|\'g]" | sed 's/=.*//' | sed "s/'//"))    ~/test ·····································································································································  test-Cj2sK_tx  ❯ echo $arr  g ga gaa gam gama gamc gams gamscp gap gapa gapt gau gav gb gbD gba gbd gbda gbl gbnm gbr gbs gbsb gbsg gbsr gbss gc gc!' gca gca!' gcam gcan!' gcans!' gcas gcasm gcb gcd gcf gcl gclean gcm gcmsg gcn!' gco gcount gcp gcpa gcpc gcs gcsm gd gdca gdct gdcw gds gdt gdw gf gfa gfg gfo gg gga ggpull ggpush ggsup ghh gignore gignored git-svn-dcommit-push gk gke gl glg glgg glgga glgm glgp glo glod glods glog gloga glol glola glols glp glum gm gma gmom gmt gmtvim gmum gp gpd gpf gpf!' gpoat gpristine gpsup gpu gpv gr gra grb grba grbc grbd grbi grbm grbo grbs grev grh grhh grm grmc grmv groh grrm grs grset grss grst grt gru grup grv gsb gsd gsh gsi gsps gsr gss gst gsta gstaa gstall gstc gstd gstl gstp gsts gsu gsw gswc gtl gts gtv gunignore gunwip gup gupa gupav gupv gwch gwip  

However, it doesn't work when these two commands are in the script file...

~/test ·····································································································································  test-Cj2sK_tx  ❯ /bin/zsh ./d-alias.sh  # nothing here...  

Thank you for any help. Many thanks.

chromium: change scrollbar color

Posted: 23 May 2021 06:16 AM PDT

Is it possible to change color of the scrollbar in Chromium browser, without having to install yet another extension?

Perhaps by modifying some css file somewhere?

I am using chromium 83 on Debian 10.

I know how to achieve this in Firefox. I just added following lines to userContent.css

html,body{      scrollbar-color: #B63C29 #555555 !important;  }  

Is there something similar I can do to achieve same for Chromium?

Invert screen and invert mouse on my Kali Linux live(debian) latest

Posted: 23 May 2021 06:27 AM PDT

After installing Kali Linux live (debian) on my USB drive/on running it the display was invert same as the mouse I have tried some basc commands like xrandr but to no avail.

Create new set of aliases based on current set of aliases (eg. gst -> dst)?

Posted: 23 May 2021 09:49 AM PDT

I'm using git aliases from zsh plugins: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git

So it has git aliases like:

gst # git status  ga # git add  gc "commit" # git commit -v "commit"  ...  

...and I'm also using git bare repo to backup all my dotfiles: https://github.com/Anthonyive/dotfiles/blob/0706bc81daa3aeb7899b506cd89d4ab78fc7b176/USAGE.md

In particular, the git bare repo technique aliases the git command to dotfiles:

alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'  alias d='dotfiles'  

So then how do I map the all the git alias command to d? Like:

dst # similar to gst, but uses the dotfiles alias  da # similar to ga  dc "commit" # similar to gc "commit"  ...  

Mapping them one by one seems very tedious...

format output of xdotool window geometry

Posted: 23 May 2021 07:58 AM PDT

I have the following xdotool output from the shell:

Window 98566146    Position: 5,279 (screen: 0)    Geometry: 960x480  

I want it to be :

 x=5   y=279   width=960   height=480  

with awk, sed, or other tools.

CLARIFICATION: I want to format output of xdotool search --sync --class mpv getwindowgeometry the way I described above using regular expression replace techniques via awk, sed or other tools. There is an example in the following link sed/awk replace a specific pattern under another pattern.

Such as

echo -e "Window 98566146\n  Position: 5,279 (screen: 0)\n  Geometry: 960x480\n" | awk ....  

EDIT2:

Actually I could try the following awk line:

  echo -e "Window 98566146\n  Position: 5,279 (screen: 0)\n  Geometry: 960x480\n" |  awk -F'[:]' '{if (NR>1) print $2}'  

Why sh has a symbolic link to dash or bash?

Posted: 23 May 2021 05:51 AM PDT

I found that sh is a symbolic link to bash

lrwxrwxrwx 1 root root 4 May  9 15:23 /bin/sh -> bash  

I tried to find a reason and i found out that bash is a implementation of sh and can behave like sh or POSIX. So scripts with #!/bin/sh are invoked by bash with a try to mimic behaviour of sh. And there are other impletations too like dash, csh etc. While reading this answer when invoked with /bin/sh bash moves to POSIX mode after reading startup files. I don't have much experience with shells but as these answers are stating : there is no sh by default in some systems and bash or any other shell is doing the homework for sh. And i want some expert opinion on this matter.

  1. When invoked with sh Bash enters POSIX mode after reading startup files. But what are these startup files?
  2. So the point is if bash is doing the work of sh in my system than does this means that there is no sh in my system and all the scripts with sh is invoked by bash or any other shell to which sh points to.

Why is OpenVPN Client Failing to Connect on Linux?

Posted: 23 May 2021 07:03 AM PDT

This VPN works fine in Windows however trying to start it in CentOS works for a few seconds and eventually stops with no message in error logs. Also the server instantly stops responding to pings whilst connecting where as the Windows machine keeps going.

client  dev tun  proto udp  remote 151.80.xxx.xxx 1194  resolv-retry infinite  nobind  persist-key  persist-tun  remote-cert-tls server  auth SHA512  cipher AES-256-CBC  ignore-unknown-option block-outside-dns  block-outside-dns  verb 3  

ip r without VPN active

default via 51.195.234.254 dev eth0   51.195.234.254 dev eth0 scope link  

With it active

0.0.0.0/1 via 10.8.0.1 dev tun0   default via 51.195.234.254 dev eth0   10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.2   51.195.234.254 dev eth0 scope link   128.0.0.0/1 via 10.8.0.1 dev tun0   151.80.xxx.xx via 51.195.234.254 dev eth0  

Log

Fri May 21 19:42:19 2021 OpenVPN 2.4.11 x86_64-redhat-linux-gnu [Fedora EPEL patched] [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Apr 21 2021  Fri May 21 19:42:19 2021 library versions: OpenSSL 1.0.2k-fips  26 Jan 2017, LZO 2.06  Fri May 21 19:42:19 2021 Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key  Fri May 21 19:42:19 2021 Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication  Fri May 21 19:42:19 2021 Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key  Fri May 21 19:42:19 2021 Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication  Fri May 21 19:42:19 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]151.80.xxx.xxx:1194  Fri May 21 19:42:19 2021 Socket Buffers: R=[212992->212992] S=[212992->212992]  Fri May 21 19:42:19 2021 UDP link local: (not bound)  Fri May 21 19:42:19 2021 UDP link remote: [AF_INET]151.80.xxx.xxx:1194  Fri May 21 19:42:19 2021 TLS: Initial packet from [AF_INET]151.80.xxx.xxx:1194, sid=3b917597 2f279e15  Fri May 21 19:42:19 2021 VERIFY OK: depth=1, CN=ChangeMe  Fri May 21 19:42:19 2021 VERIFY KU OK  Fri May 21 19:42:19 2021 Validating certificate extended key usage  Fri May 21 19:42:19 2021 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication  Fri May 21 19:42:19 2021 VERIFY EKU OK  Fri May 21 19:42:19 2021 VERIFY OK: depth=0, CN=server  Fri May 21 19:42:19 2021 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA  Fri May 21 19:42:19 2021 [server] Peer Connection Initiated with [AF_INET]151.80.xxx.xxx:1194  Fri May 21 19:42:20 2021 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)  Fri May 21 19:42:20 2021 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 213.186.33.99,dhcp-option DNS 213.186.33.199,route-gateway 10.8.0.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.8.0.2 255.255.255.0,peer-id 0,cipher AES-256-GCM'  Fri May 21 19:42:20 2021 OPTIONS IMPORT: timers and/or timeouts modified  Fri May 21 19:42:20 2021 OPTIONS IMPORT: --ifconfig/up options modified  Fri May 21 19:42:20 2021 OPTIONS IMPORT: route options modified  Fri May 21 19:42:20 2021 OPTIONS IMPORT: route-related options modified  Fri May 21 19:42:20 2021 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified  Fri May 21 19:42:20 2021 OPTIONS IMPORT: peer-id set  Fri May 21 19:42:20 2021 OPTIONS IMPORT: adjusting link_mtu to 1624  Fri May 21 19:42:20 2021 OPTIONS IMPORT: data channel crypto options modified  Fri May 21 19:42:20 2021 Data Channel: using negotiated cipher 'AES-256-GCM'  Fri May 21 19:42:20 2021 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key  Fri May 21 19:42:20 2021 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key  Fri May 21 19:42:20 2021 ROUTE_GATEWAY 51.195.234.254  Fri May 21 19:42:20 2021 TUN/TAP device tun0 opened  Fri May 21 19:42:20 2021 TUN/TAP TX queue length set to 100  Fri May 21 19:42:20 2021 /sbin/ip link set dev tun0 up mtu 1500  Fri May 21 19:42:20 2021 /sbin/ip addr add dev tun0 10.8.0.2/24 broadcast 10.8.0.255  Fri May 21 19:42:20 2021 /sbin/ip route add 151.80.xxx.xxx/32 via 51.195.234.254  Fri May 21 19:42:20 2021 /sbin/ip route add 0.0.0.0/1 via 10.8.0.1  Fri May 21 19:42:20 2021 /sbin/ip route add 128.0.0.0/1 via 10.8.0.1  Fri May 21 19:42:20 2021 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this  Fri May 21 19:42:20 2021 Initialization Sequence Completed  

Windows ipconfig /all

Unknown adapter OpenVPN TAP-Windows6:       Connection-specific DNS Suffix  . :     Description . . . . . . . . . . . : TAP-Windows Adapter V9     Physical Address. . . . . . . . . : 00-FF-18-08-1B-04     DHCP Enabled. . . . . . . . . . . : Yes     Autoconfiguration Enabled . . . . : Yes     Link-local IPv6 Address . . . . . : fe80::5185:de54:7498:6c08%4(Preferred)     IPv4 Address. . . . . . . . . . . : 10.8.0.2(Preferred)     Subnet Mask . . . . . . . . . . . : 255.255.255.0     Lease Obtained. . . . . . . . . . : Friday, May 21, 2021 8:55:25 PM     Lease Expires . . . . . . . . . . : Saturday, May 21, 2022 8:55:25 PM     Default Gateway . . . . . . . . . :     DHCP Server . . . . . . . . . . . : 10.8.0.254     DHCPv6 IAID . . . . . . . . . . . : 184614680     DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-28-38-63-9A-02-00-00-F8-D9-D4     DNS Servers . . . . . . . . . . . : 213.186.33.99                                         213.186.33.199     NetBIOS over Tcpip. . . . . . . . : Enabled  

Debian 10:

0.0.0.0/1 via 10.8.0.1 dev tun0   default via 51.195.234.254 dev eth0 onlink   10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.2   128.0.0.0/1 via 10.8.0.1 dev tun0  

Windows ping when connected:

C:\Users\Administrator>ping 10.8.0.1

Pinging 10.8.0.1 with 32 bytes of data:  Reply from 10.8.0.1: bytes=32 time=4ms TTL=64  Reply from 10.8.0.1: bytes=32 time=4ms TTL=64  Reply from 10.8.0.1: bytes=32 time=4ms TTL=64  Reply from 10.8.0.1: bytes=32 time=4ms TTL=64    Ping statistics for 10.8.0.1:      Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),  Approximate round trip times in milli-seconds:      Minimum = 4ms, Maximum = 4ms, Average = 4ms  

Linux Ping:

ping 10.8.0.1  PING 10.8.0.1 (10.8.0.1) 56(84) bytes of data.    --- 10.8.0.1 ping statistics ---  5 packets transmitted, 0 received, 100% packet loss, time 3999ms  

Bash input loop with conditions

Posted: 23 May 2021 05:31 AM PDT

I'm trying to create a program that would take input from a user and then repeat questions based on that variable.

How the code should work: User receives a question, user has to input a valid participant number between 5-20. Then, this participant number should be used in a second loop to ask each user once for their name and country. If the name is longer than 10 characters, or the country isn't Italy, then a warning message should appear to ask the user to repeat the question correctly.

Finally, after the applicant has input the correct information, both name and country inputs should be sent to an external file. This should repeat for each applicant.

I've tried to implement this, but the loop seems to keep on going, even if the user has incorrectly input the name/state. Any help would be very much appreciated.

#!/bin/sh    i=0    read -p "Welcome to the lottery program. Please enter a number of participants between 5-20." input    while [ $input -lt 5 ] || [ $input -gt 20 ]  do      read -rp "Number of people must be 5-20" input  done    while [ $i -lt $input ]  do      read -p "Enter name(max 10 characters)" name      read -p "Enter country(only for people outside of Italy)" country        if [ ${#name} -le 10 ] && [ "$country" != "Italy" ]      then          i=$((i+1))          echo $name $country >>echo.txt      elif [ ${#name} -gt 10 ]          read -rp "Your name is too long. Please try again"      else          echo "Italy isn't accepted. Please enter another country"      fi  done    echo "All $input records have been saved"  

Bluetooth Issues on PopOS 21.04

Posted: 23 May 2021 05:39 AM PDT

I am on PopOS 21.04. Until recently, everything was working perfectly, but after some updates, I could not enable bluetooth from the Settings panel. I tried enabling bluetooth from the command line with bluetoothctl scan on and got an error saying the following:

$ bluetoothctl scan on  Connection ":1.116" is not allowed to own the service "org.bluez" due to security policies in the configuration file  

I added the -d flag to the bluetooth.service's ExecStart parameter and got the following debug logs after a coldboot:

$ journalctl --unit=bluetooth -f  May 20 10:25:08 nilanjan-mitra bluetoothd[915]: src/profile.c:ext_adapter_probe() ":1.124/org/bluez/obex/00005005_0000_1000_8000_0002ee000001/00005005-0000-1000-8000-0002ee000001" probed  May 20 10:25:08 nilanjan-mitra bluetoothd[915]: src/adapter.c:adapter_service_add() /org/bluez/hci0  May 20 10:25:08 nilanjan-mitra bluetoothd[915]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10010  May 20 10:25:08 nilanjan-mitra bluetoothd[915]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000003-0000-1000-8000-00805f9  May 20 10:25:08 nilanjan-mitra bluetoothd[915]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000008-0000-1000-8000-00805f9  May 20 10:25:08 nilanjan-mitra bluetoothd[915]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9  May 20 10:25:08 nilanjan-mitra bluetoothd[915]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9  May 20 10:25:08 nilanjan-mitra bluetoothd[915]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00005005-0000-1000-8000-0002ee0  May 20 10:25:08 nilanjan-mitra bluetoothd[915]: src/adapter.c:adapter_service_insert() /org/bluez/hci0  May 20 10:25:08 nilanjan-mitra bluetoothd[915]: src/adapter.c:add_uuid() sending add uuid command for index 0  

These are the dmesg logs:

$ dmesg | grep Bluetooth  [    6.558671] Bluetooth: Core ver 2.22  [    6.558691] Bluetooth: HCI device and connection manager initialized  [    6.558694] Bluetooth: HCI socket layer initialized  [    6.558696] Bluetooth: L2CAP socket layer initialized  [    6.558699] Bluetooth: SCO socket layer initialized  [    6.704062] Bluetooth: hci0: Firmware revision 0.1 build 6 week 12 2021  [    7.781114] Bluetooth: BNEP (Ethernet Emulation) ver 1.3  [    7.781117] Bluetooth: BNEP filters: protocol multicast  [    7.781121] Bluetooth: BNEP socket layer initialized  [  285.103971] Bluetooth: RFCOMM TTY layer initialized  [  285.103979] Bluetooth: RFCOMM socket layer initialized  [  285.103985] Bluetooth: RFCOMM ver 1.11  

Also, this is the output of bluetoothd:

$ bluetoothd  D-Bus setup failed: Connection ":1.126" is not allowed to own the service "org.bluez" due to security policies in the configuration file  

When I run systemctl restart bluetooth, bluetooth is switched on but when I turn it off from the Settings panel, I have to restart the service again for bluetooth to turn back on. The BlueZ version is 5.55.

I also rebooted into the recovery partition and performed a clean install, everything was working perfectly up until I ran upgraded the packages with apt update && apt upgrade.

Any ideas on how to fix this, or why this is happening? I tried searching for Connection ":1.126" is not allowed to own the service "org.bluez" due to security policies error but couldn't find anything.

Where is the Linux (beta) option on my Acer Chromebook 15?

Posted: 23 May 2021 08:52 AM PDT

I have searched every single video and photo on google, and couldn't find an answer. Usually the Linux (Beta) option would be in the settings..

Like in this photo:

lok

and sometimes it would be under a developers tab..

Like in this photo:

bro

But for me, there was no Linux(Beta) option, and no developers tab..

So my question is, is there another tab/option that I need to click on to find the Linux (Beta) option? Is it hiding in some section that I don't know about?

Blocking internet of an DHCP assigned static IP, but allowing internal LAN network to get to device

Posted: 23 May 2021 05:56 AM PDT

I have a Rasberry Pi that DHCP assigns a static IP address (Based on it's MAC address) at 192.168.2.12 with the Local gateway at 192.168.2.1, I want to block internet traffic to it and from it, but I do want local LAN network traffic access to the Rasberry Pi (only internally) . How can I do this in iptables and the AdvanceTomato router script? (If this is the best / easiest way).

Router screen

I tried the commands below:

######## block all internet to ip address but give access to LAN   iptables -I FORWARD -s 192.168.2.12 -j REJECT       ####### Restarts the firewall to update iptables without reboot of router  service firewall restart  

But it seems to leak out to the internet

$ ping att.com    PING att.com (144.160.36.42) 56(84) bytes of data.  From unknown (192.168.2.1) icmp_seq=1 Destination Port Unreachable  From unknown (192.168.2.1) icmp_seq=2 Destination Port Unreachable  From unknown (192.168.2.1) icmp_seq=3 Destination Port Unreachable  From unknown (192.168.2.1) icmp_seq=4 Destination Port Unreachable  64 bytes from att.com (144.160.36.42): icmp_seq=5 ttl=241 time=87.5 ms  From unknown (192.168.2.1) icmp_seq=6 Destination Port Unreachable  64 bytes from att.com (144.160.36.42): icmp_seq=7 ttl=241 time=64.8 ms  From unknown (192.168.2.1) icmp_seq=8 Destination Port Unreachable  64 bytes from att.com (144.160.36.42): icmp_seq=9 ttl=241 time=93.3 ms  

Am I using the correct commands / syntax to block the internet of a DHCP assigned static IP, but allow internal LAN network to get to the device?

Deepin 20 - HDMI not working

Posted: 23 May 2021 06:34 AM PDT

I installed Deepin 20 (Community) and HDMI port not working.

I've already check ISO MD5 and everything is ok. Also, i tried to install in these following OS and the results are:

  • Deepin 15.10: HDMI Not working, NVIDIA not detected
  • Deepin 15.11: HDMI Not working, NVIDIA not detected
  • Deepin 20 beta: HDMI not working, NVIDIA detected
  • Elementary OS: HDMI works, NVIDIA detected
  • Ubuntu >=15: HDMI works and NVIDIA detected

My PC setup:

  • Laptop Lenovo ideapad L340 Gamer
  • NVIDIA GeForce GTX 1050 3GB

xrandr

$ xrandr --listmonitors    Monitors: 1  0: +*eDP-1 1920/344x1080/194+0+0  eDP-1  
$ xrandr --verbose    Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384  eDP-1 connected primary 1920x1080+0+0 (0x44) normal (normal left inverted right x axis y axis) 344mm x 194mm          Identifier: 0x42          Timestamp:  287232          Subpixel:   unknown          Gamma:      1.0:1.0:1.0          Brightness: 1.0          Clones:              CRTC:       0          CRTCs:      0 1 2          Transform:  1.000000 0.000000 0.000000                      0.000000 1.000000 0.000000                      0.000000 0.000000 1.000000                     filter:           EDID:                   00ffffffffffff0009e5000700000000                  011a0104a522137802c9a0955d599429                  24505400000001010101010101010101                  0101010101019c3b803671383c403020                  360058c21000001a0000000000000000                  00000000000000000000000000fe0042                  4f452043510a202020202020000000fe                  004e5631353646484d2d4e34380a007c          scaling mode: Full aspect                   supported: Full, Center, Full aspect          max bpc: 12                   range: (6, 12)          Broadcast RGB: Automatic                   supported: Automatic, Full, Limited 16:235          link-status: Good                   supported: Good, Bad          CONNECTOR_ID: 86                   supported: 86          non-desktop: 0                   range: (0, 1)    1920x1080 (0x44) 152.600MHz +HSync -VSync *current +preferred          h: width  1920 start 1968 end 2000 total 2230 skew    0 clock  68.43KHz          v: height 1080 start 1083 end 1089 total 1140           clock  60.03Hz    1920x1080 (0x45) 356.375MHz -HSync +VSync DoubleScan          h: width  1920 start 2080 end 2288 total 2656 skew    0 clock 134.18KHz          v: height 1080 start 1081 end 1084 total 1118           clock  60.01Hz    1920x1080 (0x46) 266.500MHz +HSync -VSync DoubleScan          h: width  1920 start 1944 end 1960 total 2000 skew    0 clock 133.25KHz          v: height 1080 start 1081 end 1084 total 1111           clock  59.97Hz    1920x1080 (0x47) 173.000MHz -HSync +VSync          h: width  1920 start 2048 end 2248 total 2576 skew    0 clock  67.16KHz          v: height 1080 start 1083 end 1088 total 1120           clock  59.96Hz    1920x1080 (0x48) 138.500MHz +HSync -VSync          h: width  1920 start 1968 end 2000 total 2080 skew    0 clock  66.59KHz          v: height 1080 start 1083 end 1088 total 1111           clock  59.93Hz    1680x1050 (0x49) 146.250MHz -HSync +VSync          h: width  1680 start 1784 end 1960 total 2240 skew    0 clock  65.29KHz          v: height 1050 start 1053 end 1059 total 1089           clock  59.95Hz    1680x1050 (0x4a) 119.000MHz +HSync -VSync          h: width  1680 start 1728 end 1760 total 1840 skew    0 clock  64.67KHz          v: height 1050 start 1053 end 1059 total 1080           clock  59.88Hz    1600x1024 (0x4b) 103.125MHz +HSync +VSync          h: width  1600 start 1600 end 1656 total 1664 skew    0 clock  61.97KHz          v: height 1024 start 1024 end 1029 total 1030           clock  60.17Hz    1400x1050 (0x4c) 122.000MHz +HSync +VSync          h: width  1400 start 1488 end 1640 total 1880 skew    0 clock  64.89KHz          v: height 1050 start 1052 end 1064 total 1082           clock  59.98Hz    1600x900 (0x4d) 246.000MHz -HSync +VSync DoubleScan          h: width  1600 start 1728 end 1900 total 2200 skew    0 clock 111.82KHz          v: height  900 start  901 end  904 total  932           clock  59.99Hz    1600x900 (0x4e) 186.500MHz +HSync -VSync DoubleScan          h: width  1600 start 1624 end 1640 total 1680 skew    0 clock 111.01KHz          v: height  900 start  901 end  904 total  926           clock  59.94Hz    1600x900 (0x4f) 118.250MHz -HSync +VSync          h: width  1600 start 1696 end 1856 total 2112 skew    0 clock  55.99KHz          v: height  900 start  903 end  908 total  934           clock  59.95Hz    1600x900 (0x50) 97.500MHz +HSync -VSync          h: width  1600 start 1648 end 1680 total 1760 skew    0 clock  55.40KHz          v: height  900 start  903 end  908 total  926           clock  59.82Hz    1280x1024 (0x51) 108.000MHz +HSync +VSync          h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz          v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz    1440x900 (0x52) 106.500MHz -HSync +VSync          h: width  1440 start 1520 end 1672 total 1904 skew    0 clock  55.93KHz          v: height  900 start  903 end  909 total  934           clock  59.89Hz    1400x900 (0x53) 103.500MHz -HSync +VSync          h: width  1400 start 1480 end 1624 total 1848 skew    0 clock  56.01KHz          v: height  900 start  903 end  913 total  934           clock  59.96Hz    1400x900 (0x54) 86.500MHz +HSync -VSync          h: width  1400 start 1448 end 1480 total 1560 skew    0 clock  55.45KHz          v: height  900 start  903 end  913 total  926           clock  59.88Hz    1280x960 (0x55) 108.000MHz +HSync +VSync          h: width  1280 start 1376 end 1488 total 1800 skew    0 clock  60.00KHz          v: height  960 start  961 end  964 total 1000           clock  60.00Hz    1440x810 (0x56) 198.125MHz -HSync +VSync DoubleScan          h: width  1440 start 1548 end 1704 total 1968 skew    0 clock 100.67KHz          v: height  810 start  811 end  814 total  839           clock  60.00Hz    1440x810 (0x57) 151.875MHz +HSync -VSync DoubleScan          h: width  1440 start 1464 end 1480 total 1520 skew    0 clock  99.92KHz          v: height  810 start  811 end  814 total  833           clock  59.97Hz    1368x768 (0x58) 85.250MHz -HSync +VSync          h: width  1368 start 1440 end 1576 total 1784 skew    0 clock  47.79KHz          v: height  768 start  771 end  781 total  798           clock  59.88Hz    1368x768 (0x59) 72.250MHz +HSync -VSync          h: width  1368 start 1416 end 1448 total 1528 skew    0 clock  47.28KHz          v: height  768 start  771 end  781 total  790           clock  59.85Hz    1360x768 (0x5a) 84.750MHz -HSync +VSync          h: width  1360 start 1432 end 1568 total 1776 skew    0 clock  47.72KHz          v: height  768 start  771 end  781 total  798           clock  59.80Hz    1360x768 (0x5b) 72.000MHz +HSync -VSync          h: width  1360 start 1408 end 1440 total 1520 skew    0 clock  47.37KHz          v: height  768 start  771 end  781 total  790           clock  59.96Hz    1280x800 (0x5c) 174.250MHz -HSync +VSync DoubleScan          h: width  1280 start 1380 end 1516 total 1752 skew    0 clock  99.46KHz          v: height  800 start  801 end  804 total  829           clock  59.99Hz    1280x800 (0x5d) 134.250MHz +HSync -VSync DoubleScan          h: width  1280 start 1304 end 1320 total 1360 skew    0 clock  98.71KHz          v: height  800 start  801 end  804 total  823           clock  59.97Hz    1280x800 (0x5e) 83.500MHz -HSync +VSync          h: width  1280 start 1352 end 1480 total 1680 skew    0 clock  49.70KHz          v: height  800 start  803 end  809 total  831           clock  59.81Hz    1280x800 (0x5f) 71.000MHz +HSync -VSync          h: width  1280 start 1328 end 1360 total 1440 skew    0 clock  49.31KHz          v: height  800 start  803 end  809 total  823           clock  59.91Hz    1152x864 (0x60) 81.620MHz -HSync +VSync          h: width  1152 start 1216 end 1336 total 1520 skew    0 clock  53.70KHz          v: height  864 start  865 end  868 total  895           clock  60.00Hz    1280x720 (0x61) 156.125MHz -HSync +VSync DoubleScan          h: width  1280 start 1376 end 1512 total 1744 skew    0 clock  89.52KHz          v: height  720 start  721 end  724 total  746           clock  60.00Hz    1280x720 (0x62) 120.750MHz +HSync -VSync DoubleScan          h: width  1280 start 1304 end 1320 total 1360 skew    0 clock  88.79KHz          v: height  720 start  721 end  724 total  740           clock  59.99Hz    1280x720 (0x63) 74.500MHz -HSync +VSync          h: width  1280 start 1344 end 1472 total 1664 skew    0 clock  44.77KHz          v: height  720 start  723 end  728 total  748           clock  59.86Hz    1280x720 (0x64) 63.750MHz +HSync -VSync          h: width  1280 start 1328 end 1360 total 1440 skew    0 clock  44.27KHz          v: height  720 start  723 end  728 total  741           clock  59.74Hz    1024x768 (0x65) 133.475MHz -HSync +VSync DoubleScan          h: width  1024 start 1100 end 1212 total 1400 skew    0 clock  95.34KHz          v: height  768 start  768 end  770 total  794           clock  60.04Hz    1024x768 (0x66) 65.000MHz -HSync -VSync          h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz          v: height  768 start  771 end  777 total  806           clock  60.00Hz    960x720 (0x67) 117.000MHz -HSync +VSync DoubleScan          h: width   960 start 1024 end 1128 total 1300 skew    0 clock  90.00KHz          v: height  720 start  720 end  722 total  750           clock  60.00Hz    928x696 (0x68) 109.150MHz -HSync +VSync DoubleScan          h: width   928 start  976 end 1088 total 1264 skew    0 clock  86.35KHz          v: height  696 start  696 end  698 total  719           clock  60.05Hz    896x672 (0x69) 102.400MHz -HSync +VSync DoubleScan          h: width   896 start  960 end 1060 total 1224 skew    0 clock  83.66KHz          v: height  672 start  672 end  674 total  697           clock  60.01Hz    1024x576 (0x6a) 98.500MHz -HSync +VSync DoubleScan          h: width  1024 start 1092 end 1200 total 1376 skew    0 clock  71.58KHz          v: height  576 start  577 end  580 total  597           clock  59.95Hz    1024x576 (0x6b) 78.375MHz +HSync -VSync DoubleScan          h: width  1024 start 1048 end 1064 total 1104 skew    0 clock  70.99KHz          v: height  576 start  577 end  580 total  592           clock  59.96Hz    1024x576 (0x6c) 46.500MHz -HSync +VSync          h: width  1024 start 1064 end 1160 total 1296 skew    0 clock  35.88KHz          v: height  576 start  579 end  584 total  599           clock  59.90Hz    1024x576 (0x6d) 42.000MHz +HSync -VSync          h: width  1024 start 1072 end 1104 total 1184 skew    0 clock  35.47KHz          v: height  576 start  579 end  584 total  593           clock  59.82Hz    960x600 (0x6e) 96.625MHz -HSync +VSync DoubleScan          h: width   960 start 1028 end 1128 total 1296 skew    0 clock  74.56KHz          v: height  600 start  601 end  604 total  622           clock  59.93Hz    960x600 (0x6f) 77.000MHz +HSync -VSync DoubleScan          h: width   960 start  984 end 1000 total 1040 skew    0 clock  74.04KHz          v: height  600 start  601 end  604 total  617           clock  60.00Hz    960x540 (0x70) 86.500MHz -HSync +VSync DoubleScan          h: width   960 start 1024 end 1124 total 1288 skew    0 clock  67.16KHz          v: height  540 start  541 end  544 total  560           clock  59.96Hz    960x540 (0x71) 69.250MHz +HSync -VSync DoubleScan          h: width   960 start  984 end 1000 total 1040 skew    0 clock  66.59KHz          v: height  540 start  541 end  544 total  555           clock  59.99Hz    960x540 (0x72) 40.750MHz -HSync +VSync          h: width   960 start  992 end 1088 total 1216 skew    0 clock  33.51KHz          v: height  540 start  543 end  548 total  562           clock  59.63Hz    960x540 (0x73) 37.250MHz +HSync -VSync          h: width   960 start 1008 end 1040 total 1120 skew    0 clock  33.26KHz          v: height  540 start  543 end  548 total  556           clock  59.82Hz    800x600 (0x74) 81.000MHz +HSync +VSync DoubleScan          h: width   800 start  832 end  928 total 1080 skew    0 clock  75.00KHz          v: height  600 start  600 end  602 total  625           clock  60.00Hz    800x600 (0x75) 40.000MHz +HSync +VSync          h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz          v: height  600 start  601 end  605 total  628           clock  60.32Hz    800x600 (0x76) 36.000MHz +HSync +VSync          h: width   800 start  824 end  896 total 1024 skew    0 clock  35.16KHz          v: height  600 start  601 end  603 total  625           clock  56.25Hz    840x525 (0x77) 73.125MHz -HSync +VSync DoubleScan          h: width   840 start  892 end  980 total 1120 skew    0 clock  65.29KHz          v: height  525 start  526 end  529 total  544           clock  60.01Hz    840x525 (0x78) 59.500MHz +HSync -VSync DoubleScan          h: width   840 start  864 end  880 total  920 skew    0 clock  64.67KHz          v: height  525 start  526 end  529 total  540           clock  59.88Hz    864x486 (0x79) 32.500MHz -HSync +VSync          h: width   864 start  888 end  968 total 1072 skew    0 clock  30.32KHz          v: height  486 start  489 end  494 total  506           clock  59.92Hz    864x486 (0x7a) 30.500MHz +HSync -VSync          h: width   864 start  912 end  944 total 1024 skew    0 clock  29.79KHz          v: height  486 start  489 end  494 total  500           clock  59.57Hz    800x512 (0x7b) 51.562MHz +HSync +VSync DoubleScan          h: width   800 start  800 end  828 total  832 skew    0 clock  61.97KHz          v: height  512 start  512 end  514 total  515           clock  60.17Hz    700x525 (0x7c) 61.000MHz +HSync +VSync DoubleScan          h: width   700 start  744 end  820 total  940 skew    0 clock  64.89KHz          v: height  525 start  526 end  532 total  541           clock  59.98Hz    800x450 (0x7d) 59.125MHz -HSync +VSync DoubleScan          h: width   800 start  848 end  928 total 1056 skew    0 clock  55.99KHz          v: height  450 start  451 end  454 total  467           clock  59.95Hz    800x450 (0x7e) 48.750MHz +HSync -VSync DoubleScan          h: width   800 start  824 end  840 total  880 skew    0 clock  55.40KHz          v: height  450 start  451 end  454 total  463           clock  59.82Hz    640x512 (0x7f) 54.000MHz +HSync +VSync DoubleScan          h: width   640 start  664 end  720 total  844 skew    0 clock  63.98KHz          v: height  512 start  512 end  514 total  533           clock  60.02Hz    720x450 (0x80) 53.250MHz -HSync +VSync DoubleScan          h: width   720 start  760 end  836 total  952 skew    0 clock  55.93KHz          v: height  450 start  451 end  454 total  467           clock  59.89Hz    700x450 (0x81) 51.750MHz -HSync +VSync DoubleScan          h: width   700 start  740 end  812 total  924 skew    0 clock  56.01KHz          v: height  450 start  451 end  456 total  467           clock  59.96Hz    700x450 (0x82) 43.250MHz +HSync -VSync DoubleScan          h: width   700 start  724 end  740 total  780 skew    0 clock  55.45KHz          v: height  450 start  451 end  456 total  463           clock  59.88Hz    640x480 (0x83) 54.000MHz +HSync +VSync DoubleScan          h: width   640 start  688 end  744 total  900 skew    0 clock  60.00KHz          v: height  480 start  480 end  482 total  500           clock  60.00Hz    640x480 (0x84) 25.175MHz -HSync -VSync          h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz          v: height  480 start  490 end  492 total  525           clock  59.94Hz    720x405 (0x85) 22.500MHz -HSync +VSync          h: width   720 start  744 end  808 total  896 skew    0 clock  25.11KHz          v: height  405 start  408 end  413 total  422           clock  59.51Hz    720x405 (0x86) 21.750MHz +HSync -VSync          h: width   720 start  768 end  800 total  880 skew    0 clock  24.72KHz          v: height  405 start  408 end  413 total  419           clock  58.99Hz    684x384 (0x87) 42.625MHz -HSync +VSync DoubleScan          h: width   684 start  720 end  788 total  892 skew    0 clock  47.79KHz          v: height  384 start  385 end  390 total  399           clock  59.88Hz    684x384 (0x88) 36.125MHz +HSync -VSync DoubleScan          h: width   684 start  708 end  724 total  764 skew    0 clock  47.28KHz          v: height  384 start  385 end  390 total  395           clock  59.85Hz    680x384 (0x89) 42.375MHz -HSync +VSync DoubleScan          h: width   680 start  716 end  784 total  888 skew    0 clock  47.72KHz          v: height  384 start  385 end  390 total  399           clock  59.80Hz    680x384 (0x8a) 36.000MHz +HSync -VSync DoubleScan          h: width   680 start  704 end  720 total  760 skew    0 clock  47.37KHz          v: height  384 start  385 end  390 total  395           clock  59.96Hz    640x400 (0x8b) 41.750MHz -HSync +VSync DoubleScan          h: width   640 start  676 end  740 total  840 skew    0 clock  49.70KHz          v: height  400 start  401 end  404 total  415           clock  59.88Hz    640x400 (0x8c) 35.500MHz +HSync -VSync DoubleScan          h: width   640 start  664 end  680 total  720 skew    0 clock  49.31KHz          v: height  400 start  401 end  404 total  411           clock  59.98Hz    576x432 (0x8d) 40.810MHz -HSync +VSync DoubleScan          h: width   576 start  608 end  668 total  760 skew    0 clock  53.70KHz          v: height  432 start  432 end  434 total  447           clock  60.06Hz    640x360 (0x8e) 37.250MHz -HSync +VSync DoubleScan          h: width   640 start  672 end  736 total  832 skew    0 clock  44.77KHz          v: height  360 start  361 end  364 total  374           clock  59.86Hz    640x360 (0x8f) 31.875MHz +HSync -VSync DoubleScan          h: width   640 start  664 end  680 total  720 skew    0 clock  44.27KHz          v: height  360 start  361 end  364 total  370           clock  59.83Hz    640x360 (0x90) 18.000MHz -HSync +VSync          h: width   640 start  664 end  720 total  800 skew    0 clock  22.50KHz          v: height  360 start  363 end  368 total  376           clock  59.84Hz    640x360 (0x91) 17.750MHz +HSync -VSync          h: width   640 start  688 end  720 total  800 skew    0 clock  22.19KHz          v: height  360 start  363 end  368 total  374           clock  59.32Hz    512x384 (0x92) 32.500MHz -HSync -VSync DoubleScan          h: width   512 start  524 end  592 total  672 skew    0 clock  48.36KHz          v: height  384 start  385 end  388 total  403           clock  60.00Hz    512x288 (0x93) 23.250MHz -HSync +VSync DoubleScan          h: width   512 start  532 end  580 total  648 skew    0 clock  35.88KHz          v: height  288 start  289 end  292 total  299           clock  60.00Hz    512x288 (0x94) 21.000MHz +HSync -VSync DoubleScan          h: width   512 start  536 end  552 total  592 skew    0 clock  35.47KHz          v: height  288 start  289 end  292 total  296           clock  59.92Hz    480x270 (0x95) 20.375MHz -HSync +VSync DoubleScan          h: width   480 start  496 end  544 total  608 skew    0 clock  33.51KHz          v: height  270 start  271 end  274 total  281           clock  59.63Hz    480x270 (0x96) 18.625MHz +HSync -VSync DoubleScan          h: width   480 start  504 end  520 total  560 skew    0 clock  33.26KHz          v: height  270 start  271 end  274 total  278           clock  59.82Hz    400x300 (0x97) 20.000MHz +HSync +VSync DoubleScan          h: width   400 start  420 end  484 total  528 skew    0 clock  37.88KHz          v: height  300 start  300 end  302 total  314           clock  60.32Hz    400x300 (0x98) 18.000MHz +HSync +VSync DoubleScan          h: width   400 start  412 end  448 total  512 skew    0 clock  35.16KHz          v: height  300 start  300 end  301 total  312           clock  56.34Hz    432x243 (0x99) 16.250MHz -HSync +VSync DoubleScan          h: width   432 start  444 end  484 total  536 skew    0 clock  30.32KHz          v: height  243 start  244 end  247 total  253           clock  59.92Hz    432x243 (0x9a) 15.250MHz +HSync -VSync DoubleScan          h: width   432 start  456 end  472 total  512 skew    0 clock  29.79KHz          v: height  243 start  244 end  247 total  250           clock  59.57Hz    320x240 (0x9b) 12.587MHz -HSync -VSync DoubleScan          h: width   320 start  328 end  376 total  400 skew    0 clock  31.47KHz          v: height  240 start  245 end  246 total  262           clock  60.05Hz    360x202 (0x9c) 11.250MHz -HSync +VSync DoubleScan          h: width   360 start  372 end  404 total  448 skew    0 clock  25.11KHz          v: height  202 start  204 end  206 total  211           clock  59.51Hz    360x202 (0x9d) 10.875MHz +HSync -VSync DoubleScan          h: width   360 start  384 end  400 total  440 skew    0 clock  24.72KHz          v: height  202 start  204 end  206 total  209           clock  59.13Hz    320x180 (0x9e)  9.000MHz -HSync +VSync DoubleScan          h: width   320 start  332 end  360 total  400 skew    0 clock  22.50KHz          v: height  180 start  181 end  184 total  188           clock  59.84Hz    320x180 (0x9f)  8.875MHz +HSync -VSync DoubleScan          h: width   320 start  344 end  360 total  400 skew    0 clock  22.19KHz          v: height  180 start  181 end  184 total  187           clock  59.32Hz  

Deepin Device Manager

NVIDIA Controller

enter image description here

Intel Controller

enter image description here

Linux mint: Installing Recommended Nvidia Drivers results black screen

Posted: 23 May 2021 09:01 AM PDT

I've installed the latest Linux Mint 19.2 on my system, but I'm facing a problem when trying to install Nvidia drivers. All i did was to open the Device Manager and select the recommended ndivia-340 driver and i got a black screen after reboot.

To solve the issue I had to purge the driver and get back to nouneau.

Device Manager

sudo apt purge nvidia*

My notebook has a GeForce GT 720M Nvidia GPU. Any ideas on how to successfully install the Nvidia drivers?

Bind CapsLock+hjkl to arrow keys

Posted: 23 May 2021 10:03 AM PDT

I want to bind Caps Lock + H / J / K / L to arrow keys.  I found two ways that each have some issues:

Solution 1

Using xkb: Edit /usr/share/X11/xkb/symbols/us first block.

            # replace Caps with AltGr              key <CAPS> { [ ISO_Level3_Shift            ] };              # Add vim cursor keys to be accessed with AltGr              key <AB02> { [ x, X, Delete, Delete        ] };              key <AC02> { [ s, S, KP_Enter, KP_Enter    ] };              key <AC03> { [ d, D, Next, Next            ] };              key <AC04> { [ f, F, BackSpace, BackSpace  ] };              key <AC06> { [ h, H , Left, Left           ] };              key <AC07> { [ j, J, Down, Down            ] };              key <AC08> { [ k, K, Up, Up                ] };              key <AC09> { [ l, L, Right, Right          ] };              key <AD07> { [ u, U, Prior, Prior          ] };              key <AE03> { [ 3, section, Home, Home      ] };              key <AE04> { [ 4, dollar, End, End         ] };  

but this answer doesn't work in Java programs (e.g., IntelliJ), so I should use solution 2.

Solution 2

Using xmodmap: Create ~/.xmodmap file with following content:

keycode 66 = Mode_switch  keysym h = h H Left  keysym l = l L Right  keysym k = k K Up  keysym j = j J Down  keysym u = u U Prior  keysym i = i I Home  keysym o = o O End  keysym p = p P Next  

and then run xmodmap ~/.xmodmap command.

Problem: This solution breaks other layouts. It works in English, but when I switch other layout, e.g., to Russian, I cannot type letters on these keys and Caps + H / J / K / L also don't work until I switch back to English. How can I solve this problem?

how linux cannot see more than half my ram ? (64bits)

Posted: 23 May 2021 07:00 AM PDT

I've had 8Gb out of 4*4Gb sticks. I've installed some new memory sticks to upgrade to the host to 4*8Gb. However I still have only 16Gb available (out of physical 32GB installed). Whatever the setup is, Linux appears to only see half the installed ram.

There is no hardware issues (the memory has been tested on two other machines)

bios = 32Gb detected Linux just sees 16GB ram dmidecode sees all of my 4 sticks

# dmidecode -t 17                               # dmidecode 3.1                                                    Getting SMBIOS data from sysfs.                          SMBIOS 2.7 present.                                                Handle 0x000E, DMI type 17, 34 bytes  Memory Device          Array Handle: 0x000D          Error Information Handle: Not Provided          Total Width: 64 bits          Data Width: 64 bits          Size: 8192 MB          Form Factor: SODIMM          Set: None          Locator: DIMM0          Bank Locator: BANK 0          Type: DDR3          Type Detail: Synchronous          Speed: 1600 MT/s          Manufacturer: Unknown          Serial Number: E09028A6          Asset Tag: Unknown          Part Number: CT102464BF160B.C16          Rank: 2          Configured Clock Speed: 1600 MT/s  Handle 0x000F, DMI type 17, 34 bytes          Memory Device                                         Array Handle: 0x000D                                                                      Error Information Handle: Not Provided                                                    Total Width: 64 bits                          Data Width: 64 bits                           Size: 8192 MB                                 Form Factor: SODIMM                           Set: None                                     Locator: DIMM1                                Bank Locator: BANK 1                          Type: DDR3                                    Type Detail: Synchronous                      Speed: 1600 MT/s                              Manufacturer: Unknown                         Serial Number: E0902887                       Asset Tag: Unknown                            Part Number: CT102464BF160B.C16               Rank: 2                                       Configured Clock Speed: 1600 MT/s       Handle 0x0010, DMI type 17, 34 bytes          Memory Device                                         Array Handle: 0x000D                          Error Information Handle: Not Provided                                                    Total Width: 64 bits                          Data Width: 64 bits                           Size: 8192 MB                                 Form Factor: SODIMM                           Set: None                                     Locator: DIMM1                                Bank Locator: BANK 2                          Type: DDR3                                    Type Detail: Synchronous                      Speed: 1600 MT/s                              Manufacturer: Unknown                         Serial Number: E09027D2                       Asset Tag: Unknown                            Part Number: CT102464BF160B.C16               Rank: 2                                       Configured Clock Speed: 1600 MT/s       Handle 0x0011, DMI type 17, 34 bytes          Memory Device                                         Array Handle: 0x000D                          Error Information Handle: Not Provided                                                    Total Width: 64 bits                          Data Width: 64 bits                           Size: 8192 MB                                 Form Factor: SODIMM                           Set: None                                     Locator: DIMM3                                Bank Locator: BANK 3                          Type: DDR3                                    Type Detail: Synchronous                      Speed: 1600 MT/s                              Manufacturer: Unknown                         Serial Number: E0902882                       Asset Tag: Unknown                            Part Number: CT102464BF160B.C16               Rank: 2                                       Configured Clock Speed: 1600 MT/s   

Any idea why, as well as any suggestions on how to activate all of it? (currently runs Fedora26/64bits also tested on Debian/64bits)

meminfo :

bash-4.4$ cat  /proc/meminfo  MemTotal:       16307964 kB  MemFree:         2589188 kB  MemAvailable:    9856496 kB  Buffers:          428964 kB  Cached:          4553096 kB  SwapCached:          132 kB  Active:          7578520 kB  Inactive:        4187932 kB  Active(anon):    3926432 kB  Inactive(anon):   745528 kB  Active(file):    3652088 kB  Inactive(file):  3442404 kB  Unevictable:       24328 kB  Mlocked:           24328 kB  SwapTotal:      15569916 kB  SwapFree:       15528188 kB  Dirty:              3060 kB  Writeback:             0 kB  AnonPages:       6806540 kB  Mapped:          1573064 kB  Shmem:            363464 kB  Slab:             645716 kB  SReclaimable:     513068 kB  SUnreclaim:       132648 kB  KernelStack:       11552 kB  PageTables:        55452 kB  NFS_Unstable:          0 kB  Bounce:                0 kB  WritebackTmp:          0 kB  CommitLimit:    23723896 kB  Committed_AS:   12692532 kB  VmallocTotal:   34359738367 kB  VmallocUsed:           0 kB  VmallocChunk:          0 kB  HardwareCorrupted:     0 kB  AnonHugePages:         0 kB  ShmemHugePages:        0 kB  ShmemPmdMapped:        0 kB  CmaTotal:              0 kB  CmaFree:               0 kB  HugePages_Total:       0  HugePages_Free:        0  HugePages_Rsvd:        0  HugePages_Surp:        0  Hugepagesize:       2048 kB  DirectMap4k:      832256 kB  DirectMap2M:    15822848 kB  DirectMap1G:     1048576 kB  

free -m results on coherence with /proc/meminfo but dmidecode still confirm there are 4 distincts 8Gb ram sticks

              total        used        free      shared  buff/cache   available  Mem:          15920        4074        5169         204        6675       12038  

BIOS is so limited I can just manage boot order. There are no options about memory or anything else. On the BIOS side it confirms 32Gb are present

Machine model : Aspire V3-772G The last bios is loaded : V1.15

That's all I can give useful information dmesg analysis did not permit to get anything useful .

Only a warning in loop about kvm/virsh setup : block like this one in loop no other informations at all

[12341.196455] set_target_expiration: 30 callbacks suppressed  [12341.196459] kvm: vcpu 0: requested 100012 ns lapic timer period limited to 500000 ns  [12341.306246] kvm: vcpu 0: requested 292092 ns lapic timer period limited to 500000 ns  [12341.704421] kvm: vcpu 0: requested 473064 ns lapic timer period limited to 500000 ns  [12341.914420] kvm: vcpu 0: requested 468345 ns lapic timer period limited to 500000 ns  [12341.924470] kvm: vcpu 0: requested 405938 ns lapic timer period limited to 500000 ns  [12341.996356] kvm: vcpu 0: requested 100012 ns lapic timer period limited to 500000 ns  [12342.096905] kvm: vcpu 0: requested 106350 ns lapic timer period limited to 500000 ns  [12342.135880] kvm: vcpu 0: requested 424319 ns lapic timer period limited to 500000 ns  [12342.406376] kvm: vcpu 0: requested 113630 ns lapic timer period limited to 500000 ns  [12342.474998] kvm: vcpu 0: requested 271348 ns lapic timer period limited to 500000 ns  

my distrib & kernel :

[root@h2g2w ~]# cat /etc/*release*  Fedora release 26 (Twenty Six)  NAME=Fedora  VERSION="26 (Server Edition)"  ID=fedora  VERSION_ID=26  PRETTY_NAME="Fedora 26 (Server Edition)"  ANSI_COLOR="0;34"  CPE_NAME="cpe:/o:fedoraproject:fedora:26"  HOME_URL="https://fedoraproject.org/"  BUG_REPORT_URL="https://bugzilla.redhat.com/"  REDHAT_BUGZILLA_PRODUCT="Fedora"  REDHAT_BUGZILLA_PRODUCT_VERSION=26  REDHAT_SUPPORT_PRODUCT="Fedora"  REDHAT_SUPPORT_PRODUCT_VERSION=26  PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy  VARIANT="Server Edition"  VARIANT_ID=server  Fedora release 26 (Twenty Six)  ROS fuerte (Fuerte Turtle)  Fedora release 26 (Twenty Six)  cpe:/o:fedoraproject:fedora:26  [root@h2g2w ~]# uname -a  Linux h2g2w.local 4.14.11-200.fc26.x86_64 #1 SMP Wed Jan 3 13:58:53 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux  [root@h2g2w ~]#   

but this is useless as I said in commentaries exchanges I tried other distributions even BSD

constructor specs :

    Overview      Specifications    Acer Aspire V3-772G-9829 - 17.3" - Core i7 4702MQ - 8 GB RAM - 1 TB HDD    Part Number: NX.M74AA.002  General        Packaged Quantity      1      Notebook type      Gaming, HD display, Desktop replacement      Manufacturer      Acer    Processor / Chipset        CPU      Intel Core i7 (4th Gen) 4702MQ / 2.2 GHz      Max Turbo Speed      3.2 GHz      Number of Cores      Quad-Core      Cache      L3 - 6 MB      64-bit Computing      Yes      Chipset Type      Mobile Intel HM86 Express      Features      Hyper-Threading Technology, Intel Smart Cache, Intel Turbo Boost Technology 2.0    Cache Memory        Type      L3 cache      Installed Size      6 MB    Memory        Max Supported Size      32 GB      Technology      DDR3L SDRAM      Speed      1600 MHz / PC3-12800 - 1600 MHz      Form Factor      SO-DIMM 204-pin      Slots Qty      4    Storage        Interface      Serial ATA-300      Optical Drive      DVD±RW (±R DL) / DVD-RAM fixed  

So why Linux (or any other OSes like BSD and so on) detects/activate only 16GB? How can I use the full ram?

how to use bluetooth device with HSP/HFP profile using pulseaudio >=6 and bluez >= 5.24

Posted: 23 May 2021 07:48 AM PDT

I'd like to receive/record audio from bluetooth device on my linux box. The one I have works properly as a headset (microphone works properly in particular) i.e. on macOS yet I cannot get it working with linux - raspbian jessy in particular - yet from what I can see it affects other distros as well.

  • the device is paired and connected properly using bluetoothctl
  • A2DP profile works correctly
  • pactl ls reports among others headset_head_unit: Headset Head Unit (HSP/HFP) (priority 20, available: no)
  • while trying to switch to headset_head_unit pulseaudio reports [pulseaudio] module-bluez5-device.c: Refused to switch profile to headset_head_unit: Not connected

I've found and tried various suggestions as for upgrading bluez, pulseaudio, use ofono etc. yet without any success. Most common comments are that HSP/HFP support has been dropped in recent bluez and the ofono should be used (yet I'm not sure how ofono is supposed to help here as AFAIK it is related when BT susystem is being used as a client i.e. connected to mobile phone). I can see a number of unresolved bugs i.e. for freedesktop here and here, redhat, ubuntu and debian and also similar questions asked on stackexchange. While there are some successes reported, I was not able to move forward trying i.e.

  • use pulseaudio config load-module module-bluetooth-discover headset=ofono (and auto, native variants as well), versions 7, 8, 10
  • bluez 5.24, 5.42, 5.43 (was not able to found other versions for debian as i.e. there is some success reported with bluez 5.35)
  • re-pairing and reconnecting the headset device with bluetoothctl

Also there is some confusion in the reports as probably some people are mixing using linux bluetooth stack as client/server - at least this is my understanding of using ofono.

While there are also some problem reports regarding bluetooth on RPI 3 in particular, I would like to find first any sign if the HFP/HSP is ever possible with current bluez/pulseaudio. Having any success report with clear steps i.e. on debian (and even better on raspbian) would help me a lot. Even any successful setup on any other distro may help me to build the same on my box. Looks like the problem affects pulseaudio/bluez stack for more then a year and it is hard to believe people cannot use their BT headsets i.e. for VOiP calls for so long... Not sure if I've provided all the important details from my investigation so in case of comments I can update this question.

Also wonder if there is some bug report with some active development and chances for solution.

UPDATE: Most probably after removing ofono I've finally managed to be able to switch the connection to headset_head_unit yet while trying to record or play sound the device shows some activity (i.e. pulsating builtin led) but no data is being received/send (i.e. parec creates empty wav of size 44b which is just wav header). I've tested same device using a2dp_sink profile and can play sound without any problem. I wonder how it can be debugged.

How to copy and paste with a mouse with tmux

Posted: 23 May 2021 07:19 AM PDT

I'm using tmux and OSX. When copying and pasting from the terminal with tmux I'm able to hold down Option and select text. However I can't get the text to stay inside the pane. So when I want to copy text I either need to cycle the pane to the far left, or zoom the pane, as shown below.

This in addition to having to hold down the Option key is a pain. I know I can enter visual mode and use vim movements to get there, but I'd rather have a way to use my mouse. Has anyone found a workaround for this?

enter image description here enter image description here

How to pass arguments to command through Desktop shortcut without having to open a terminal?

Posted: 23 May 2021 08:36 AM PDT

I'm using a LXDE desktop.

I created a shortcut in the desktop to a python program, which can be passed files to, which are then opened in the GUI.

I mean passing files (file absolute paths) to the command by drag'n'dropping them over the shortcut on the desktop.

In fact this is already working, but only if I set Terminal=true in the Desktop Entry, which obviously makes the terminal be opened. I wanted to know if there's a way to pass the arguments to the command without the need to open the terminal.

I'm creating the shortcut like this:

[Desktop Entry]  Name=TBOPlayer  Comment=UI for omxplayer  Exec=python /path/to/tboplayer/tboplayer.py "%F"  Icon=/usr/share/pixmaps/python.xpm  Terminal=true  Type=Application  

Is there a way to do this?

How create a temporary file in shell script?

Posted: 23 May 2021 10:00 AM PDT

While running a script, I want to create a temporary file in /tmp directory.

After execution of that script, that will be cleaned by that script.

How to do that in shell script?

Difference between /dev and /sys

Posted: 23 May 2021 07:17 AM PDT

Exactly what is the difference between devfs and sysfs? Both seem to maintain a list of hardwares attached to the system. Then why the need for 2 separate fs even arose? As far as I can get /sys maintains somewhat "raw" list of devices(like "ser0"). Udev acts on those devices, gets various informations and applies various rules to present them as recognizable names which are then mapped onto /dev(like "camera"). Is this the only reason? And then we mount the corresponding devices from the /dev fs(can't we do that from the /sys fs) into the /media fs.

I have read the answer at Difference between /dev and /sys/class?. But I cannot get the sys fs part where it states that

Sysfs contain the hierarchy of devices, as they are attached to the computer

Are the files in /sys not device node files? Then what type of files are they?

Accounting for /proc/net/dev reported traffic

Posted: 23 May 2021 08:03 AM PDT

I noticed that according to /proc/net/dev I am constantly receiving around 6Kb/s on my wireless usb interface. But I can't account for anything even close to that with the individual connections that I get with iptraf, iftop, and nethogs. Investigations with netstat, lsof, and tcpdump didn't help either.

So, what else could contribute to /proc/net/dev values? I can speculate that, while only IP based traffic is reported by the applications I mentioned, /proc/net/dev probably accounts for other link-layer/internet-layer stuff too (arp? icmp? wireless management stuff?). Or maybe other transport/application protocols. Can anyone confirm this?

How else would you proceed to find out: through what sockets are the 6Kb/s coming through? What processes are receiving the traffic?


[EDIT]

The 2 consistent results across all the tools:

  1. the totals of Rx are around a few Kb/s
    • confirmed with /proc/net/dev, dstat, bmw-ng, cbm, iptraf, ifstat, gnome-system-monitor
  2. no connection/packet stream justifies that
    • confirmed with netstat, tcpdump, iftop, nethogs, iptraf

All of this with a Netgear WDNA 4100 wireless usb adapter using a custom driver from some git (the only way I got it to work). I asked the devs about it here.

This might be malware, but I suspect the driver is simply reporting wrong totals. Nevertheless, I cannot explain what's going on for sure.

No comments:

Post a Comment