Friday, September 24, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Fedora 34 external monitors not detected with USB-C dock

Posted: 24 Sep 2021 09:58 AM PDT

I have a fairly fresh install of Fedora 34 that I use with a USB dock. The dock has been working great for data, power, audio, and usb for a month. I just added two monitors to the setup connected by DisplayPort and my laptop can't detect them.

HP Spectre x360 15 w/ GeForce GTX 1650 Ti
Lenovo ThinkPad USB-C Dock - 40A90090US
Two Planar PZN2410

inxi -G returns

Graphics:  Device-1: Intel CometLake-H GT2 [UHD Graphics] driver: i915 v: kernel              Device-2: NVIDIA TU117M [GeForce GTX 1650 Ti Mobile] driver: nvidia v: 470.63.01              Display: x11 server: X.Org 1.20.11 driver: loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa              resolution: 3840x2160              OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 21.1.8   

xrandr -q retuns

Screen 0: minimum 320 x 200, current 3840 x 2160, maximum 16384 x 16384  eDP-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 344mm x 194mm     3840x2160     60.00 +  59.98    59.97*        *other resolutions removed for simplicty*     DP-1 disconnected (normal left inverted right x axis y axis)  HDMI-1 disconnected (normal left inverted right x axis y axis)  DP-1-0 disconnected (normal left inverted right x axis y axis)  DP-1-1 disconnected (normal left inverted right x axis y axis)  HDMI-1-0 disconnected (normal left inverted right x axis y axis)  DP-1-2 disconnected (normal left inverted right x axis y axis)  DP-1-3 disconnected (normal left inverted right x axis y axis)  

lsusb returns

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub  Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub  Bus 001 Device 003: ID 06cb:00c9 Synaptics, Inc.   Bus 001 Device 010: ID 17ef:3063 Lenovo ThinkPad Dock Audio  Bus 001 Device 009: ID 17ef:1021 Lenovo ThinkPad Dock Hub [Cypress HX2VL]  Bus 001 Device 008: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)  Bus 001 Device 007: ID 17ef:1026 Lenovo   Bus 001 Device 006: ID 17ef:3060 Lenovo ThinkPad Dock  Bus 001 Device 004: ID 17ef:3062 Lenovo ThinkPad Dock Ethernet [Realtek RTL8153B]  Bus 001 Device 002: ID 17ef:1025 Lenovo   Bus 001 Device 005: ID 8087:0026 Intel Corp. AX201 Bluetooth  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  

I'm new to linux. Every solution I've found online involved updating to drivers, modes, or kernels that I seem to already be using. Any advice on a how to get the monitors detected would be greatly appreciated.

Extract numbers using grep command

Posted: 24 Sep 2021 09:35 AM PDT

I'm trying to extract numbers 21,9,231,1112,17 from the following content of a file;

some text is here       sometext(1,21);     sometext(2,9);     sometext(3,231);     sometext(10,1112);     sometext(11,17)  Some text is here  

I didn't find a suitable grep command for the above pattern.

Run command before suspend Debian 11

Posted: 24 Sep 2021 09:02 AM PDT

I need to run the sleep command to sleep for 2 seconds before my Debian 11 laptop is put to sleep, because there is an intermittent issue where the lockscreen does not appear before the system goes to sleep, but locks about a second after resume but still reveals the contents of the screen.

I had this issue before and I modified some script and put the sleep command before an hdparm command was issued, and this solved the issue. My problem is I don't know where the script is located on Debian 11, can anyone point me in the right direction?

Filter processes by state in htop

Posted: 24 Sep 2021 08:54 AM PDT

Is there a way to filter processes in htop by their state — e.g., only show running processes (state R)?

Anydesk zsh error in kali linux [duplicate]

Posted: 24 Sep 2021 08:31 AM PDT

In my kali linux while trying to access anydesk it is showing following error

└─$ anydesk  zsh: abort      anydesk  

Linux top command

Posted: 24 Sep 2021 08:03 AM PDT

Using top, what are the interactive commands that let you sort the output by

a) CPU usage?

b) memory usage?

c) time running?

I've tried the following:

For CPU usage, I use "top" and then "P". For memory usage, I use "top" and then "M". For time running, I use "top" and then "T".

Is there any ways that are more interactive? Thanks. :)

Ubuntu 20 with RAID 1 running Zabbix stuck on call trace error after forced shutdown

Posted: 24 Sep 2021 07:50 AM PDT

enter image description here

After a forced shutdown of Ubuntu 20 that is being used to run Zabbix we encountered this looping error on restart. Any help would be appreciated.

enter image description here

/ gets remounted read-only, can't find original cause in dmesg because systemd spams it with "read-only" filesystem errors afterwards

Posted: 24 Sep 2021 08:22 AM PDT

During normal use, my Ubuntu laptop intermittently will encounter some I/O error and then remount / as read-only (yes I've checked SMART logs, nothing shows up; I've also replaced the drive, no luck). The problem is I can never read the underlying original error (if any is reported) because the filesystem is remounted read-only by then, so the error doesn't get recorded to disk anywhere, and if I run dmesg the circular buffer has been fully spammed by other processes complaining about read-only filesystem and that's all that's visible.

To reiterate, I can't look through /var/log because the filesystem has been mounted read-only by then, so rsyslog failed to record any errors at all.

I also have limited ability to start new tools because the disk subsystem reports generic I/O errors at this point. Only whatever is cache resident is runnable.

The only thing I can think of is turning /var/log into an in-memory tmpfs and restarting rsyslog, waiting for the error to happen, and hope I can find it in /var/log. Maybe even running some standard tools like cat, grep, less, etc. in a loop so they'll definitely be available after the disk subsystem fails.

Is there a simpler option?

How do I change "root" to another partition for Debian 11 Live LXDE image for bootable USB?

Posted: 24 Sep 2021 08:15 AM PDT

I want to create a bootable Debian Live OS with overlay partition (i.e. save changes on it). But I want to create multiple partitions, not one. I want to install syslinux to one partition, Debian OS-live Image files to another partition, and finally overlay partition to other one. To achieve this, I read official Debian pages for help description of preparing USB for boot of Debian OS and syslinux documents.

I create three partitions. They are (since my USB device is recognized as sdb):

  1. sdb1 - size = 50 MB, filesystem=ext4, boot flag is opened, mbr is copied
  2. sdb2 - size = 3100 MB, fileysystem=ext4, I copied all files inside Debian live iso file here
  3. sdb3 - size = 12000 MB, filesystem= ext4, it will be overlay partition

I used syslinux commands and I managed to get boot menu and I could load vmlinuz-5.10.0-8-amd64 image since I copied it into the same folder with syslinux in sdb1(boot partition, i.e. /mnt/sdb1/syslinux/vmlinuz-5.10.0-8-amd64). But I could not load initrd.img file which is located in sdb2(second partition i.e. /mnt/sdb2/live/initrd.img-5.10.0-8-amd64) with this command in menu.cfg in syslinux folder in sdb1. What I did is here in menu.cfg file which is under /dev/sdb1/syslinux/ folder :

  INCLUDE stdmenu.cfg    MENU title Main Menu    DEFAULT Debian GNU/Linux 64 bit    LABEL Debian GNU/Linux 64 bit       SAY "Booting Debian GNU/Linux Live (kernel 5.10.0-8-amd64)..."       LINUX vmlinuz-5.10.0-8-amd64       APPEND root=/dev/sdb2 fromhd=/dev/sdb initrd=/dev/sdb2/live/initrd.img-5.10.0-8-amd64 boot=live swap=true persistence persistence-storage=filesystem persistence-media=removable-usb union=overlay components locales=tr_TR.UTF-8 splash  

Result is :

enter image description here

The command root=/dev/sdb2 and initrd=/dev/sdb2/live/initrd.img-5.10.0-8-amd64 does not work, it gives ** No such file or directory ** error. Please help, why didn't it work? How can I make it work?

source command is not working inside a shell script

Posted: 24 Sep 2021 07:43 AM PDT

I am literally new to the scripting language.

I have to run source ~/.custom_rc command from within a shell script. When I run the shell script, It doesn't show any error. It run just fine.

Here is my install.sh file.

#!/usr/bin/env bash  #  # Some Comments  #  # End of Comments    echo ""  .  .  .  .  .  .  source ~/.custom_rc    echo "End Of Script..."  

I am executing the script from curl using sh -c like,

sh -c "$(curl -fsSL https://some.link/to/install.sh)"  

Why the command isn't running inside the script? How am I supposed to make them run inside shell scripting?

EDIT #1:

I am using alias commands inside the .custom_rc file.

Once the execution completed, I am unable to use the alias commands.

But, when I manually run source ~/.custom_rc, alias commands works fine.

Using Kate text editor, how to compare two files and find differences

Posted: 24 Sep 2021 08:39 AM PDT

I am using Kate text editor, and I would like to compare two files, and find (highlight) their differences. Maybe there is a plugin to do that? I would be open to solutions other than using Kate, e.g. a shell script, but I would like to integrate that somehow with Kate.

Remove the last rows with no data but just commas from a CSV file through shell script

Posted: 24 Sep 2021 09:35 AM PDT

I am generating a CSV file which ideally should have 1-row or 2-row data but it is coming like

11,ABC,3,4,5,6  ,,,,,  

I have tried sed and awk commands to remove that empty row but it didn't work out

sed -i 's/,,//g' fileName.csv  

(as this isn't a dynamic solution when we have odd number of commas)

awk -F, 'length>NF+1' fileName.csv > fileName.csv  

(when I try to put that into the file it's removing all the rows from the file. Maybe my inexperience with sed and awk commands is the issue).

Running jobs on HPC cluster using SLURM

Posted: 24 Sep 2021 08:08 AM PDT

Suppose I have two Python scripts: test1.py and test2.py

How do I write a SLURM script to run these files on two different nodes simultaneously?

Note that: test1.py and test2.py are independent of each other.

How do I get sed to delete the second block of lines in a file?

Posted: 24 Sep 2021 09:54 AM PDT

I have hundreds of badly-written HTML files that have two HTML sections, like this:

<HTML>  <HEAD>  several header lines  </HEAD>  <BODY>  hundreds of lines of content  </BODY>  </HTML>  <HTML>  dozens of lines  </HTML>  

I want to delete the entire second HTML section using GNU sed 4.7 on Linux. I've tried things like:

sed '0,/<HTML>/! /<HTML>/,/<\/HTML>/d'  

but that doesn't work. I'd like to do something like this but it's not syntactically correct:

sed '/<HTML>/2,/<\/HTML>/d'  

Help please.

Shift+Insert on terminal copies from clipboard, not primary

Posted: 24 Sep 2021 07:43 AM PDT

Up until recently whenever I pressed Shift+Insert on my Linux terminal (whether Bash or Fish) it pasted my terminal selection ("primary"). Now all of a sudden it started pasting from my clipboard, the same as Ctrl+Shift+v.

I checked with xsel and it also seems to point to the clipboard and not to the primary. Why has this changed, and how can I revert it?

I'm using Ubuntu 18.04 with i3.

Thanks!

ls -a shows no folder on Desktop but in GUI, i can see three folders

Posted: 24 Sep 2021 08:01 AM PDT

I am on Desktop and here three folders are listed, Trash, File System and Home (in GUI .

I opened terminal and typed ls -a in /home/kali/Desktop and here it is showing nothing. Why?

Unpack multiple files from .tar.gz to multiple different directories

Posted: 24 Sep 2021 08:03 AM PDT

I have a .tar.gz file that contains a backup of files across many directories.

Is it possible to unpack the single .tar.gz file and have those files moved to their intended directories?

If I run tar -ztvf filename.tar.gz I see all the files with the full directory. That is /etc/path/file, /usr/path.file ... etc. is returned for many (over 1,000) files. So the archive was created with the path to file preserved if that helps.

I know that tar –xvzf filename.tar.gz –C /path/to/directory will allow me to move a specific file. But can this be done with multiple files going to multiple different locations?

Exim4 segfault using AUTH LOGIN

Posted: 24 Sep 2021 08:01 AM PDT

My exim4 vis causing a segfault error on sending an email message whenever I use AUTH LOGIN authentication. However, sending the email using AUTH PLAIN works like a charm. Both auth methods connect to Dovecot authenticator.

Exim4 info:

Exim version 4.92 #3 built 09-Sep-2021 16:25:33  Copyright (c) University of Cambridge, 1995 - 2018  (c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2018  Berkeley DB: Berkeley DB 5.3.28: (September  9, 2013)  Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc GnuTLS move_frozen_messages Content_Scanning DANE DKIM DNSSEC Event OCSP PRDR PROXY SOCKS SPF TCP_Fast_Open Experimental_ARC Experimental_DCC Experimental_DMARC Experimental_DSN_info  Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz dbmnz dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql sqlite  Authenticators: cram_md5 cyrus_sasl dovecot plaintext spa tls  Routers: accept dnslookup ipliteral iplookup manualroute queryprogram redirect  Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp  Malware: f-protd f-prot6d drweb fsecure sophie clamd avast sock cmdline  Fixed never_users: 0  Configure owner: 0:0  Size of off_t: 8  Configuration file search path is /etc/exim4/exim4.conf:/var/lib/exim4/config.autogenerated  Configuration file is /var/lib/exim4/config.autogenerated  

Here is the segfault message:

Sep 13 12:57:36 tornavacas kernel: exim4[12679]: segfault at 0 ip 00007fdd2d854206 sp 00007ffe23909ac8 error 4 in libc-2.28.so[7fdd2d7de000+148000]  Sep 13 12:57:36 tornavacas kernel: Code: 0f 1f 40 00 66 0f ef c0 66 0f ef c9 66 0f ef d2 66 0f ef db 48 89 f8 48 89 f9 48 81 e1 ff 0f 00 00 48 81 f9 cf 0f 00 00 77 6a <f3> 0f 6f 20 66 0f 74 e0 66 0f d7 d4 85 d2 74 04 0f bc c2 c3 48 83  

And here is the last lines of a strace output:

[pid 16595] munmap(0x7f5e7f800000, 2097152) = 0  [pid 16595] munmap(0x7f5e7df65000, 331776) = 0  [pid 16595] munmap(0x7f5e7fb1a000, 135168) = 0  [pid 16595] exit_group(1)               = ?  [pid 16595] +++ exited with 1 +++  [pid 16592] <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 16595  [pid 16592] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=16595, si_uid=106, si_status=1, si_utime=2, si_stime=1} ---  [pid 16592] alarm(0)                    = 30  [pid 16592] rt_sigaction(SIGCHLD, {sa_handler=SIG_IGN, sa_mask=[CHLD], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f5c6ba6b840}, {sa_handler=SIG_DFL, sa_mask=[CHLD], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f5c6ba6b840}, 8) = 0  [pid 16592] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---  [pid 16592] +++ killed by SIGSEGV +++  <... select resumed> )                  = ? ERESTARTNOHAND (To be restarted if no handler)  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=16592, si_uid=106, si_status=SIGSEGV, si_utime=0, si_stime=1} ---  rt_sigaction(SIGCHLD, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f5c6bc07730}, NULL, 8) = 0  rt_sigreturn({mask=[]})                 = -1 EINTR (Interrupted system call)  wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV}], WNOHANG, NULL) = 16592  wait4(-1, 0x7fff60755674, WNOHANG, NULL) = -1 ECHILD (No child processes)  rt_sigaction(SIGCHLD, {sa_handler=0x55cf02123500, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f5c6bc07730}, NULL, 8) = 0  select(11, [3 4 5 6 7 8 9 10], NULL, NULL, NULL  

Here is how I am reproducing the problem:

#!/usr/bin/expect    set timeout 30  proc abort {} { exit 2 }    spawn nc tornavacas.domain.com 587  expect default abort "220 "  send "EHLO mypc\r"  expect default abort "\n250 "  send "AUTH LOGIN\r"  expect default abort "\n334 "  send "ZGlzZ3Vpc2VkQGRvbWFpbi5jb20=\r"  expect default abort "\n334 "  send "cGFzc3dvcmQ=\r"  send "MAIL FROM:disguised@domain.com\r"  expect default abort "\n250 "  send "RCPT TO:disguised@domain.com\r"  expect default abort "\n250 "  send "DATA\r"  expect default abort "\n354 "  send "Subject: Mensaje de prueba de Microsoft Outlook\r"  send "\r"  send "This is a multipart message in MIME format.\r"  send ".\r"  expect default abort "\n250 "  send "QUIT\r"  

On executing this script, I get the following output:

../..  DATA  354 Enter message, ending with "." on a line by itself  Subject: Mensaje de prueba de Microsoft Outlook    This is a multipart message in MIME format.  .  

Nonetheless, if I send the same message using AUTH PLAIN, it works:

#!/usr/bin/expect    set timeout 30  proc abort {} { exit 2 }    spawn nc tornavacas.domain.com 587  expect default abort "220 "  send "EHLO mypc\r"  expect default abort "\n250 "  send "AUTH PLAIN AGRpc2d1aXNlZEBkb21haW4uY29tAHBhc3N3b3Jk\r"  expect default abort "\n235 "  send "MAIL FROM:disguised@domain.com\r"  expect default abort "\n250 "  send "RCPT TO:disguised@domain.com\r"  expect default abort "\n250 "  send "DATA\r"  expect default abort "\n354 "  send "Subject: Mensaje de prueba de Microsoft Outlook\r"  send "\r"  send "This is a multipart message in MIME format.\r"  send ".\r"  expect default abort "\n250 "  send "QUIT\r"  

The output for the above command is this:

DATA  354 Enter message, ending with "." on a line by itself  Subject: Mensaje de prueba de Microsoft Outlook    This is a multipart message in MIME format.  .  250 OK id=1mPk9v-0004O2-Bp  

As you can see, now the email server replies with the 250 code, whereas before it did not replied at all as it died.

The thing is authentication is working in both cases, but something changes when the user authenticates himself using LOGIN method instead of PLAIN one.

I would like to support both methods. Do you have any idea about what could be the cause of the segfault error after using AUTH LOGIN?

Update

I have been investigating a little bit more, and I have found that the cause of the problem is in the check_data ACL, particularly in the following snippet:

  warn add_header = :at_start: ${authresults {$primary_hostname}}  

Theoretically, that line should only add to the email a header with the authresults expansion item. However, on commenting it out, the segfault did not happen whereas it does if the warn directive is active.

Warm regards,

How to resolve libatomic missing error, or more generally, install nodejs

Posted: 24 Sep 2021 08:44 AM PDT

I'm trying to install node/npm (and ideally I'd like to do it with nvm) on my BananaPi, but when I run nvm install v12.18.4, I get the error:

node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory  

Trying to apt install libatomic didn't find a package.

"You may not install to this volume because it is a Mac in target disk mode" error when installing Catalina on a mac in TDM

Posted: 24 Sep 2021 10:07 AM PDT

Hello Unix/Linux community, looking for your help. I am running into an issue where I am trying to install Catalina 10.15.2 on a machine that has been wiped. The machine is in target disk mode and I am using the "Install macOS Catalina" app to image this mac. When I launch the app I see all of my mounted devices including the machine that is in TDM but when I select it as the disk where I want Catalina installed I get a message that states that: "You may not install to this volume because it is a Mac in target disk mode". Is it not possible to image a mac that is in TDM? BTW I have tried imaging the disk as APFS and Mac Os Extended (Journaled). Any help/guidance is appreciated. Thank you.

How to use my existing custom GTK theme (Arc) with gtk-window-decorator when using Compiz?

Posted: 24 Sep 2021 09:04 AM PDT

I'm currently using Compiz 0.8 to get blur effects and transparency, in place of xfwm4. I had been using Emerald to provide window borders, but I was unhappy with the selection available there. I would prefer to use my GTK theme window borders (the ones I get when I run xfwm4 --replace in the terminal).

It turns out you can pass the command gtk-window-decorator --replace to use the standard GTK window borders. However, these use some sort of default theme that looks really out of place. I have no idea how to change it.

enter image description here

I'm running Arch Linux with XFCE. The Arch Linux wiki provided me with the same answer that a lot of other pages did - to use gsettings to change some entries. This didn't work, probably because (as the wiki page says, albeit without any elaboration) that Compiz-reloaded, the project that represents the continued maintenance of the Compiz 0.8 project, have switched to using Marco instead of Metacity.

So that leaves me at a loss. The change was rather recent, and Compiz is pretty far past its prime, so I can't find much on how to deal with this issue with the recent changes.

libvirt: command to start up all guest virtual machines which have auto-start enabled

Posted: 24 Sep 2021 08:09 AM PDT

I'm using Debian Jessie as a virtual machine host using libvirt/qemu/kvm.

I've set some of the guest virtual machines to automatically start when the host OS boots up, this is working fine.

For maintenance purposes, I'm running "service libvirt-guests stop" to shut all the guests down (but not the host).

Once I've done my maintenance, I want to easily boot all the guests up again (without rebooting the host).

Is there a single command that will start all the guest VMs up again? I'm interested in knowing about both:

  1. a command to start all the autostart-marked guests up again

  2. a command to start all the guests up again that were running before I ran "service libvirt-guests stop"

Rebooting the host OS would achieve #1, but I don't want to reboot the host.

I tried, "service libvirt-guests start" but it doesn't seem to do it.

How to find the pci slot of an usb controller in Linux?

Posted: 24 Sep 2021 09:40 AM PDT

I have a nearly common Linux machine here. So, it has a PCI (*-X, etc) bus, on that some USB controllers, and I have USB devices on these USB controllers. Similar to this:

$ lspci|grep USB  00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller  00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller  00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller  00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller  00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller  00:16.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller  00:16.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller  02:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)  

And, there is also an usb device tree, as this:

$ lsusb -t  /:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/4p, 12M  /:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/2p, 12M  /:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/5p, 12M      |__ Port 5: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M  /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/5p, 12M      |__ Port 2: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M      |__ Port 2: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M      |__ Port 3: Dev 12, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M      |__ Port 4: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M      |__ Port 4: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M  /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/4p, 480M  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M      |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M          |__ Port 1: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M          |__ Port 1: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M          |__ Port 4: Dev 11, If 0, Class=Vendor Specific Class, Driver=r8712u, 480M      |__ Port 3: Dev 3, If 0, Class=Vendor Specific Class, Driver=MOSCHIP usb-ethernet driver, 480M  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M      |__ Port 1: Dev 6, If 0, Class=Video, Driver=uvcvideo, 480M      |__ Port 1: Dev 6, If 1, Class=Video, Driver=uvcvideo, 480M      |__ Port 1: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 480M      |__ Port 1: Dev 6, If 3, Class=Audio, Driver=snd-usb-audio, 480M  

So, I see my USB controllers on the PCI bus, and also my USB devices on the USB controllers.

But I don't know, which USB controller number (on the USB bus) belongs to which PCI bus number!

How to find that?

A stop job is running for Session c2 of user

Posted: 24 Sep 2021 10:00 AM PDT

The following message appears almost every time I shutdown my computer:

A stop job is running for Session c2 of user ... (1min 30s)  

It waits for 1min30s then continues the shutdown process. I follow this systemd shutdown diagnosis guide and get the shutdown-log.txt (I can't paste directly the log here because it's very long). Unfortunately, I don't understand the log by myself. Could anyone help me to find out what makes my system doesn't shutdown properly?

I run Arch Linux with kernel 4.4.5-1-ARCH, my systemd version is 229-3.

Addition 1: I observe that every time I logout, and then shutdown my computer from the login screen, it doesn't get the message A stop job is running.... I tried to logout before shutdown for many times, so I think it doesn't occur by chance. Hope that information could help.

Addition 2: It is always session c2 that causes shutdown hanging. So as @n.st suggest, I looked at Diagnosing Shutdown Problems again and stored loginctl session-status c2 instead of dmesg, but then there is nothing on the shutdown-log.txt. I replaced loginctl session-status c2 by systemd-cgls and got the following log:

Control group /:  -.slice  └─init.scope    ├─   1 /usr/lib/systemd/systemd-shutdown reboot --log-level 6 --log-target ...    ├─1069 /usr/lib/systemd/systemd-shutdown reboot --log-level 6 --log-target ...    ├─1071 /bin/sh /usr/lib/systemd/system-shutdown/debug.sh reboot    └─1074 systemd-cgls  

Any ideas?

Note: After I updated to kernel 4.6.4-1-ARCH and systemd 230-7, the error no longer happened.

Linux Mint 14.1 with Cinnamon - Mouse Sensitivity not Working

Posted: 24 Sep 2021 08:02 AM PDT

64-bit if that matters. My mouse sensitivity slider does nothing, but my acceleration slider works. I'd like acceleration off and sensitivity how I like it, but it refuses to work. I have tested the option on two computers, and both do not change the sensitivity. Any help?

How to copy qemu raw images?

Posted: 24 Sep 2021 08:04 AM PDT

I want to backup kvm virtual machines and copy machine's images another path or usb disk? How to copy " qemu raw images"?

GTK - Enable/set dark theme on a per-application basis

Posted: 24 Sep 2021 07:40 AM PDT

Is there a way to set gtk-application-prefer-dark-theme for an application?

This is normally set in the code by the application. Apps such as Eye of Gnome and Totem turn it on. I want to, as a user turn it on, on a per application bases.

For gnome-terminal, I normally use a white text on black background color scheme, and having the dark window border would improve the overall look.

I also want to turn it on for vlc.

What is the smallest possible Linux implementation? [closed]

Posted: 24 Sep 2021 08:48 AM PDT

What are the bare minimum components for a Linux OS to be functional, and that I can use as a base to expand and improve as I learn Linux and my understanding and needs grow?

No comments:

Post a Comment