tc traffic shaping with HTB and CQB causes packet transmission gap inconsistencies Posted: 06 Sep 2021 10:38 AM PDT I am sorry if this is duplicate of https://serverfault.com/q/1076769/822163. I created that first and then realized the Linux and Unix stack exchange is the right place. Problem: When the tc HTB or CQB is used to do traffic shaping, first two packet that are sent after some time gap are sent back to back as recorded in the pcap log. I have a intermediate computer with ubuntu 18.4 with network forwarding enabled. I run the tc with HTB to shape the traffic to have constant bitrate output on egress port. Client requests the chunks with variable sizes from the sever. Server sends the chunk transfer encoded data with gap of 200ms between each chunk to client. With my setup having the intermediate computer, These packets are passed through the traffic shaper on intermediate computer to obtain fixed bitrate of 500kbps. As I disable offload (TSO and GRO) each n bytes are split into frames by pcap. Most of 1448B packets have time gap close to 24.224ms which is expected at 500kbps Issue: Although the frames arrive in the sequence, their time gap of arrival is not consistent. Second large packet (1448B) after gap of 200ms always comes almost back to back with first packet. Last packet in chunk ( 654B) arrives with delay (24.224ms instead of 10.464ms in example in the picture attached) Screen shot of the timings Timing gaps between the packets. TC command with HTB: tc qdisc del dev enx00e04c080ecf root 2> /dev/null > /dev/null tc qdisc add dev enx00e04c080ecf root handle 1:0 htb default 2 tc class add dev enx00e04c080ecf parent 1:1 classid 1:2 htb rate 500kbit ceil 500kbit burst 10 cburst 10 prio 2 tc filter add dev enx00e04c080ecf protocol ip parent 1:0 u32 match ip dst 192.168.2.103 flowid 1:2 If I am not doing any mistake in calculation I think the issue could be due to the token handling in tc that I am using for trafic shaping. I think the tokens are accumulated in the idle time and when the next packet is received it sends the two packets back to back. from third packet token consumtion rate settles down. If this is what is happenning, I would like to know if there is a way to avoid using the accumulated tokens for second packet in the chunk. I tried various options in tc command I also tried using CQB - command below Reference : https://lartc.org/lartc.html#AEN2233 Observation: reducing the burst = 10 slightly increases the gap between first and second packet. tc With CQB: tc qdisc del dev enx00e04c080ecf root 2> /dev/null > /dev/null tc qdisc add dev enx00e04c080ecf root handle 1: cbq avpkt 5000 bandwidth 10mbit tc class add dev enx00e04c080ecf parent 1: classid 1:1 cbq rate 500kbit allot 5000 prio 5 bounded isolated tc class add dev enx00e04c080ecf parent 1:1 classid 1:10 cbq rate 500kbit allot 5000 prio 1 avpkt 5000 bounded tc class add dev enx00e04c080ecf parent 1:1 classid 1:20 cbq rate 500kbit allot 5000 avpkt 5000 prio 2 tc filter add dev enx00e04c080ecf protocol ip parent 1:0 u32 match ip dst 192.168.2.103 flowid 1:10 tc filter add dev enx00e04c080ecf parent 1: protocol ip prio 13 u32 match ip dst 0.0.0.0/0 flowid 1:20 |
sudo tail -f /var/log/tor/log does not have output Posted: 06 Sep 2021 10:18 AM PDT I install tor with sudo apt install tor in debian 11. Than enter following commands to start tor: sudo systemctl enable tor.service sudo systemctl start tor.service When I execute sudo tail -f /var/log/tor/log for printing tor logs, the command sayed /var/log/tor/log file is not exists. I made the file and did execute the command again, but it does not have any outputs. What is the problem? How can I solve it? |
Intel modesetting driver screen tearing Posted: 06 Sep 2021 09:20 AM PDT I am facing tearing issue when XORG using Intel modesetting driver, Can anyone face this issue ? If anyone has solution please help me out. I have also tried intel driver with /etc/X11/xorg.conf.d/20-intel.conf Section "Device" Identifier "Intel Graphics" Driver "intel" Option "TearFree" "true" EndSection but it end-up having crash. [141003.247] (EE) Backtrace: [141003.248] (EE) 0: /usr/bin/Xorg (xorg_backtrace+0x4d) [0x555cafab98fd] [141003.248] (EE) 1: /usr/bin/Xorg (0x555caf8fc000+0x1c1a1a) [0x555cafabda1a] [141003.248] (EE) 2: /lib/libpthread.so.0 (0x7fc07c202000+0x13340) [0x7fc07c215340] [141003.248] (EE) 3: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7fc07ba02000+0x6d882) [0x7fc07ba6f882] [141003.249] (EE) 4: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7fc07ba02000+0xb3f91) [0x7fc07bab5f91] [141003.249] (EE) 5: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7fc07ba02000+0xb20cc) [0x7fc07bab40cc] [141003.249] (EE) 6: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7fc07ba02000+0x7e45d) [0x7fc07ba8045d] [141003.250] (EE) 7: /usr/bin/Xorg (AddScreen+0x8e) [0x555caf94b8fe] [141003.250] (EE) 8: /usr/bin/Xorg (InitOutput+0x670) [0x555caf9904c0] [141003.250] (EE) 9: /usr/bin/Xorg (0x555caf8fc000+0x53708) [0x555caf94f708] [141003.251] (EE) 10: /lib/libc.so.6 (__libc_start_main+0xeb) [0x7fc07c068b5b] [141003.251] (EE) 11: /usr/bin/Xorg (_start+0x2a) [0x555caf93893a] [141003.251] (EE) [141003.251] (EE) Segmentation fault at address 0x11 |
os-prober fails to report my current OS, thus update-grub missed it Posted: 06 Sep 2021 09:18 AM PDT os-prober fails to report my current OS, thus update-grub missed the very OS I need when generating the boot menu entries. What's the fix? The detailed background is here, basically my system was initial setup in BIOS/MBR/CSM mode, Windows 10 is refusing to be installed there, so I have to converted my MBR disk to GPT. But I've lost my Windows 8 boot option then. Now I have my Windows 8 in os-prober output thus need to regenerate the boot menu entries again. However, the very OS I'm currently using is missing: $ os-prober /dev/sda13@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi /dev/sda6:Ubuntu 18.04 LTS (18.04):Ubuntu:linux /dev/sda7:Ubuntu 19.04 (19.04):Ubuntu1:linux /dev/sda8:Ubuntu 17.04 (17.04):Ubuntu2:linux $ update-grub Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found Windows Boot Manager on /dev/sda13@/EFI/Microsoft/Boot/bootmgfw.efi Found Ubuntu 18.04 LTS (18.04) on /dev/sda6 Found Ubuntu 19.04 (19.04) on /dev/sda7 Found Ubuntu 17.04 (17.04) on /dev/sda8 Adding boot menu entry for UEFI Firmware Settings done $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal $ mount | head -6 sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=3973480k,nr_inodes=993370,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=803528k,mode=755) /dev/sda3 on / type ext4 (rw,noatime,nodiratime) What's the problem and the fix? BTW, the previous boot menu entries were generated directly under grml64-full release 2020.06. |
CentOS7 yum - NSS error -8179/curl: (60) Peer's Certificate issuer is not recognized. with self signed Certificate Posted: 06 Sep 2021 09:06 AM PDT I've set up an CentOS-Server with an internal Repository. Nginx with https is set up and running. I'm able to see the content of the Repo. However at first opening of the https://192.168.10.1 I'm getting an error in the browser and have to accept the certificate. The idea is that the client in the same network should use this as a repo-server. The .repo-file is adjusted and correct. With http its working, but not with https. yum repoinfo says: Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile https://repo.local/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate issuer is not recognized." ... failure: repodata/repomd.xml from repo: [Errno 256] No more mirrors to try. https://repo.local/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate issuer is not recognized." (The output is shortened) Of course I have certificate and the key. So I tried to install the certificate (copy it to /etc/pki/... and call update-ca-trust) but the error remains. What did I do wrong? |
How can I paste an .eml file into Instagram? Posted: 06 Sep 2021 08:46 AM PDT I have a file consisting of a whole bunch of JPEGs saved in Thunderbird as an .eml file. I'd like to be able to paste it into Instagram but Instagram only accepts individual JPEGs. Can this be accomplished somehow? Perhaps the individual images can somehow be combined? Or is there some other solution? |
Changing which program responds to media keys Posted: 06 Sep 2021 08:11 AM PDT When I start a VLC instance, I can control it with media keys (Fn, BT headphones, etc.). But if I then start a second VLC instance simultaneously, I cannot control that one with media keys. That's probably intended, it would usually be pretty annoying if both reacted. But if I then close the first VLC instance, nothing reacts to media keys. And sometimes I simply want to decide that from now on, media keys should control a different program. PulseAudio has so crazy many features, surely I can somehow switch my media keys over to another program or instance, right? How do I do this? (Having a command line method for scripting would be nice as well.) |
Bash script producing "syntax error near unexpected token 'done'" Posted: 06 Sep 2021 08:34 AM PDT The shell script looks like this: #!/bin/bash while [ true ]; do clear date who sleep 5 done If I run int, I get the following: yuikus@DESKTOP-VTJ0OG4:~$ cd /mnt/d/lab_oc_1/lab_oc_2/ yuikus@DESKTOP-VTJ0OG4:/mnt/d/lab_oc_1/lab_oc_2/$ sh bag.sh bag.sh: 7: Syntax error: "done" unexpected (expecting "do") yuikus@DESKTOP-VTJ0OG4:/mnt/d/lab_oc_1/lab_oc_2/$ bash bag.sh bag.sh: line 7: syntax error near unexpected token `done' bag.sh: line 7: `done ' Why doesn't it work? I run with Ubuntu, from Windows. |
Remove adjacent duplicated words from string Posted: 06 Sep 2021 10:35 AM PDT I have a string like this string: one one tow tow three three tow one three How can i remove duplicated words to make it like this: one tow three tow one three The point is that I want to write a script that remove duplicated words if they are adjacent only I have tried: echo "$string" | awk '{for (i=1;i<=NF;i++) if (!a[$i]++) printf("%s%s",$i,FS)}{printf("\n")}' but it removes non-adjacent duplicated words also. |
Trying to install TestU01 with Linux Posted: 06 Sep 2021 07:28 AM PDT I want to install TestU01 for my research on pseudorandom number generators. I tried the technique that is used here with the following commands mkdir TestU01 cd TestU01 basedir='pwd' curl -OL http://simul.iro.umontreal.ca/testu01/TestU01.zip unzip -q TestU01.zip cd TestU01-1.2.3 ./configure --prefix="$basedir" make -j 6 make -j 6 install cd .. but when I type the command ./configure --prefix="$basedir" I get configure: error: expected an absolute directory name for --prefix: pwd Is the given code wrong? Also, I am using a Windows subsystem for Linux. |
Debian 10 is somehow completely broken apt-get update / upgrade does not work Posted: 06 Sep 2021 08:17 AM PDT Debian 10 is somehow completely broken apt-get update / upgrade does not work the ca-certificates do not work I try to fix it for too long now but nothing works. that's why I hope someone can help me here. I'm new to Linux Debian and don't know exactly what I did ._. Thank you already :D apt-get update Err:2 https://packages.sury.org/php buster Release Certificate verification failed: The certificate is NOT trusted. The certifica te issuer is unknown. Could not handshake: Error in the certificate verificatio n. [IP: 172.67.182.150 443] Reading package lists... Done W: https://packages.sury.org/php/dists/buster/InRelease: No system certificates available. Try installing ca-certificates. W: https://packages.sury.org/php/dists/buster/Release: No system certificates av ailable. Try installing ca-certificates. E: The repository 'https://packages.sury.org/php buster Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disa bled by default. N: See apt-secure(8) manpage for repository creation and user configuration deta ``` |
Change mirror repository in terminal to fix cinnamon dependencies Posted: 06 Sep 2021 08:26 AM PDT Can someone please walk me through a safe and newbie-friendly way to change/replace my mirror - evowise (now defunct) in terminal with a secure repository so that I can fix deleted dependencies to launch cinnamon and have an operating OS again? Is this even possible or is there a better solution without reformatting and losing all my user files ? I'm completely lost here and I'm in way over my head. |
Move filesystem to the left after expanding partition to the left Posted: 06 Sep 2021 07:17 AM PDT TL;DR I have a dd image disk.dd which has multiple partitions. The end goal is to reduce the size of this dd image file. After deleting and recreating a higher numbered partition with a start sector offset lower than it was before, (i.e expanding the partition to the left) I have a partition which has a filesystem in it and whose primary superblock is somewhere inside this partition, and I know the sector at which this primary superblock resides. How can I e2fsck this filesystem so that it moves to the beginning of the partition ? So that afterwards I can shrink this filesystem with resize2fs and then shrink this partition from right, i.e (recreating this partition with a lower end sector offset ) Then I'll repeat this process with the partitions after that until the last partition, effectively shrinking all partitions and hence reducing the size of dd image Please do not suggest gparted . I'm looking for a command line solution Also, I know this would've been easier with LVM . But this legacy system Long version I have a dd image disk.dd that I took using the following dd if=/dev/sda of=/path/to/disk.dd of a system which has the following layout Disk /dev/loop15: 465.78 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x54093dd5 Device Boot Start End Sectors Size Id Type /dev/loop15p1 * 2048 81922047 81920000 39.1G 83 Linux /dev/loop15p2 81922048 143362047 61440000 29.3G 82 Linux swap / Solaris /dev/loop15p3 143362048 163842047 20480000 9.8G 83 Linux /dev/loop15p4 163842048 976773167 812931120 387.7G 5 Extended /dev/loop15p5 163844096 976773119 812929024 387.7G 83 Linux Now, on a different system, I'm accessing disk.dd through a loop device using losetup --find --partscan disk.dd I resized all of the ext4 filesystems with resize2fs -M /dev/loopNpartX resize2fs /dev/loopNpartX FSsize i.e the partitions p1 , p3 and p5 With dumpe2fs , I can see logical block size of filesystem which is 4096 bytes for all ext4 filesystems which in my case as I shown above are hosted on 3 partitions Now if I'm verbally reading this correctly (correct me if I'm wrong here) The primary superblock of a filesystem is "usually expected" to be located at block 0 of the partition So, I can dump superblock information with dumpe2fs -h -o superblock=0 -o blocksize=4096 /dev/loopNpartX Now it's time to shrink partitions in order to reduce the size of disk.dd file I got the block count for each file system again using dumpe2fs fdisk works on physical block size OR sectors of device which in my case is 512 bytes So, in order to find how many sectors should be enough to accommodate the filesystem, I used the following formula Required Sectors = ( ( Block Count + 100 ) * Logical Block Size ) / Physical Block Size 100 acting as a buffer just in case I'm missing something about the organization of filesystem which should be enough I did this for every filesystem Now With lsblk -f , I get the UUIDs of existing filesystems With fdisk -l , I get which partition to keep the boot flag on Now to shrink partitions, I would delete and recreate them using fdisk -- First partition start sector offset = 2048 last sector offset = 2048 + "Required Sectors" for this filesystem -- Second partition Second partition on existing disk is swap , so I'll not shrink it, just move it left start sector offset = "last sector offset" of first partition + 1 last sector offset = "start sector offset" + Total sectors as as on existing partition I then change it's type to Swap And then with tune2fs -U change the UUID back to what was on dd image -- Third partition start sector offset = "last sector offset" of second partition + 1 last sector offset = "start sector offset" + "Required Sectors" for this filesystem Here is where I'm stuck After expanding third partition to the left, this partition has a filesystem whose starting sector I know (i.e sector having the primary superblock ) But I don't know how to e2fsck this filesystem to correct it on the partition so that the filesystem is moved left to the beginning of the partition |
what happens after I have entered log in password and before the shell prompt comes up? and how to reduce time for that interval? Posted: 06 Sep 2021 10:13 AM PDT I'm doing some experiment on a virtual machine (guest machine is ubuntu 20.04 on arm64) and I'm doing this on a x86_64 host machine (ubuntu 20.04). Right after I login, it takes about a minute until I see the shell prompt. Here is the log. Ubuntu 20.04.2 LTS ab21q-ubuntu-20 ttyAMA0 ab21q-ubuntu-20 login: ckim Password: Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-77-generic aarch64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage System information as of Mon 06 Sep 2021 02:40:15 PM KST System load: 0.28 Usage of /: 32.5% of 19.07GB Memory usage: 11% Swap usage: 0% Processes: 115 Users logged in: 0 IPv4 address for enp0s1: 10.0.2.15 IPv6 address for enp0s1: fec0::5054:ff:fe12:3456 * Super-optimized for small spaces - read how we shrank the memory footprint of MicroK8s to make it the smallest full K8s around. https://ubuntu.com/blog/microk8s-memory-optimisation 114 updates can be applied immediately. 45 of these updates are standard security updates. To see these additional updates run: apt list --upgradable Last login: Mon Sep 6 12:01:44 KST 2021 on ttyAMA0 Because the qemu is emulating arm64 on x86_64 it's basically slow, but I wonder what the OS or startup procedure is doing after I entered the password and before the shell prompt comes up. From the log, it looks like it had checked what packages can be updated through the network. and it also takes some time (~30 secs?) after Last login: Mon Sep 6 12:01:44 KST 2021 on ttyAMA0 is printed. Is there any way I can skip this long time consuming procedure? (like by setting something in /etc/sysctl.config file) |
Backup my EFI boot entry for easy restore Posted: 06 Sep 2021 09:46 AM PDT Giving that Windows 10 would most likely wipe my Linux EFI boot entry, See the comment after the answer here: Windows 10 will usually "self-heal" its firmware boot entry if you manage to get Windows booting even once. In the process, if there is no existing Windows boot entry in the firmware (i.e. in the efibootmgr list), it will usually usurp Boot0000 for itself, regardless of whether or not it is already in use. I'd like to backup my EFI boot entry before so that I can then easily restore it even Windows 10 wipes it. Seems there is no existing tools that can do it, though https://github.com/rhboot/efibootmgr/issues/10 mentioned the efivar utility, with somewhat manual process. However, I cannot find any further info into that direction. Hence the question. Or, if I have a EFI boot entry like this: Boot0000* debian HD(13,GPT,007a058a-8e5e-45df-8d97-6575b66b5355,0x1afa9000,0x113000)/File(\EFI\debian\grubx64.efi) How to recreate it next time? |
Fixing EFI Windows boot from Linux Posted: 06 Sep 2021 08:10 AM PDT Basically I've lost my Windows 8 boot option and the boot repair from Windows installation media doesn't fix the problem. I know this is more-or-less a Windows' problem but I'm seeking a efibootmgr solution rather than a solution that uses the much more awkward Windows based bcdedit command. Hence I ask here instead of super user. The detailed background is here, basically my system was initial setup in BIOS/MBR/CSM mode, Windows 10 is refusing to be installed there, so I have to converted my MBR disk to GPT. I got everything on the Linux side working afterward, but fixing Windows boot via Windows installation media failed. - All my Linux OS/partitions were found by
update-grub , but my Windows 8 is missing from the GRUB menu. - The
os-prober was not able to list/find my Windows 8 either. I hope the fix is simply adding my Windows 8 back as an boot entry using efibootmgr , but this is where I got lost and need help. Again further detailed like current partition schema can be found here. Thx. Maybe my Windows 8 was installed in BIOS/MBR/CSM mode, and has no EFI booting capability as I don't see a /EFI directory within it? Here are all root level directories in my Windows 8 partition: $Recycle.Bin/ ProgramData/ $WINDOWS.~BT/ Programs/ $Windows.~WS/ Recovery/ BOOTNXT Recovery.txt BOOTSECT.BAK System Volume Information/ Boot/ Tmp/ Documents and Settings/ Users/ ESD/ Windows/ Intel/ bootmgr Program Files/ pagefile.sys Program Files (x86)/ swapfile.sys Or maybe I don't need efibootmgr at all, just a custom entry in /etc/grub.d/40_custom like the following? menuentry "Windows 8 BIOS MBR" { insmod part_msdos insmod ntldr insmod ntfs ntldr (hd0,msdos1)/bootmgr } |
Can't write to guest cifs partition Posted: 06 Sep 2021 07:48 AM PDT When I try to write to a network CIFS drive I consistently get ~/RetroPie/roms $ touch test touch: cannot touch 'test': Permission denied The network drive is an LVM volume mounted on one raspberry pi as so: pi@Pi4:~$ cat /etc/fstab /dev/mapper/mediaFiles-mediaFilesLV /media/lvm ext4 defaults 0 2 With these permissions pi@Pi4:~$ ls -lh /media/lvm/ drwxr-xr-x 32 pi pi 4.0K Sep 4 18:26 roms It's shared via samba with the following /etc/samba/smb.conf: [global] # Basic Samba configuration server role = standalone server passdb backend = tdbsam ;obey pam restrictions = yes security = user ;printcap name = /dev/null ;load printers = no ;socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=524288 SO_SNDBUF=524288 server string = Samba Server %v map to guest = bad user ;dns proxy = no ;wide links = yes ;follow symlinks = yes ;unix extensions = no ;acl allow execute always = yes log file = /var/log/samba/%m.log max log size = 1000 log level = 2 mdns name = mdns ea support = yes # Special configuration for Apple's Time Machine vfs objects = catia fruit streams_xattr fruit:aapl = yes fruit:model = MacSamba fruit:encoding = native [PiMedia] comment = Pi4 shared folder path = /media/lvm read only = no guest ok = yes only guest = yes I then mount it on another raspberry pi with systemd pi@RemotePi:~ $ cat /etc/systemd/system/home-pi-RetroPie-roms.mount [Unit] Description=ROMs folder [Mount] What=//Pi4.local/PiMedia/roms Where=/home/pi/RetroPie/roms Type=cifs Options=rw,file_mode=0777,dir_mode=0777,uid=1000,gid=1000,guest,noperm,noauto,x-systemd.automount,x-systemd.mount-timeout=30,_netdev [Install] WantedBy=multi-user.target And it looks like the permissions are fine pi@RemotePi:~ $ ls -lh /home/pi/RetroPie/roms/ total 0 drwxrwxrwx 2 pi pi 0 Sep 4 17:26 amstradcpc drwxrwxrwx 2 pi pi 0 Sep 4 17:26 arcade drwxrwxrwx 2 pi pi 0 Sep 4 17:26 atari2600 drwxrwxrwx 2 pi pi 0 Sep 4 17:26 atari5200 drwxrwxrwx 2 pi pi 0 Sep 4 17:26 atari7800 ... But when I try to write pi@RemotePi:~ $ touch RetroPie/roms/test touch: cannot touch 'RetroPie/roms/test': Permission denied It won't let me. Where have I gone wrong? |
What method will determine why systemd failed to load a "Wanted" target? Posted: 06 Sep 2021 08:55 AM PDT I have an Ubuntu 20.04 system that uses systemd with a default target of graphical.target : $ systemctl get-default graphical.target If I follow the chain of "Requires" and "Wants", I find that graphical.target ends up "Wanting" a unit file widget.target . I notice that sometimes widget.target loads at startup, and sometimes it doesn't. This is verified by the output of $ systemctl list-units --type target , which doesn't include widget.target on those instances where it fails to load. The machine is currently in a state where widget.target failed to load on the last boot. If I examine the logs for this unit since the last boot using $ journalctl -u widget.target -b , journalctl returns -- No entries -- . If I extend the search beyond the last boot, the only entries are routine ones that are not errors and don't refer to widget.target at all. Does systemd provide any other method for explaining to me why it wouldn't load a "Wanted" target? More info widget.target wants only one other unit, another target, via a "WantedBy" in that target's unit file (which manifests as a file in /etc/systemd/system/widget.target.wants/ ). The other target loads whether or not widget.target loads. In addition, widget.target is itself wanted by four services. Whether or not widget.target loads, one of these services loads and three do not, according to the output of $ systemctl list-units --type service . That is, widget.target wants one target and is wanted by four services; nothing differs about the loading of any of these five units between cases where widget.target loads and when it doesn't. |
kworker hogging CPU after getting additional SSD - high acpi interrupts on gpe11, masking or disabling causes system freeze Posted: 06 Sep 2021 09:43 AM PDT Mine is a 7 year old Dell Inspiron 3542 (Intel i5), have been running Linux for about 5 years now. Recently I got an additional SSD fitted in the HDD slot and moved the HDD into the place of DVD Drive using a caddy. Then I did a fresh install of Xubuntu 20.04 onto the SSD. I noticed high CPU usage on CPU 0 (~75%) even when nothing much is running on the PC. top command shows me a kworker process hogging CPU: 184 root 20 0 0 0 0 I 75.7 0.0 17:31.07 kworker/0:2-kacpid The usual solution with other similar problems posted here is to figure out which GPE is causing too many interrupts and disable that. Output of grep . -r /sys/firmware/acpi/interrupts shows the below lines with high values: /sys/firmware/acpi/interrupts/gpe11:11640215 EN STS enabled unmasked /sys/firmware/acpi/interrupts/sci:11640301 Disabling or masking gpe11 with echo mask > /sys/firmware/acpi/interrupts/gpe11 causes the system to freeze (monitor, keyboard and mouse become unresponsive, if any sound was playing the sound starts looping like a DJ did something) Disabling or masking sci resets the gpe11 and sci interrupts to zero, but they start increasing again. No effect on cpu usage, which is still high Other experiments and observations: - The usual kernel parameter changes such as
acpi=off and acpi_mask_gpe=0x11 caused a blank screen at boot - The problem persists on OS booted from Live USB too
- The problem persists on Xubuntu 18.04, and Arch Linux latest release Live USB too
- Output of
cat /proc/interrupts is below (truncated till acpi): CPU0 CPU1 CPU2 CPU3 0: 6 0 0 0 IO-APIC 2-edge timer 1: 9379 0 0 0 IO-APIC 1-edge i8042 8: 0 1 0 0 IO-APIC 8-edge rtc0 9: 0 21362967 0 0 IO-APIC 9-fasteoi acpi - Relevant Output of
echo l > /proc/sysrq-trigger onto dmesg is below [ 2174.058304] CPU: 0 PID: 184 Comm: kworker/0:2 Not tainted 5.11.0-27-generic #29~20.04.1-Ubuntu [ 2174.058305] Hardware name: Dell Inc. Inspiron 3542/0926J6, BIOS A03 05/27/2014 [ 2174.058307] Workqueue: kacpid acpi_os_execute_deferred [ 2174.058309] RIP: 0010:acpi_ns_search_one_scope+0x16a/0x208 [ 2174.058310] Code: 49 89 1f 45 31 c0 b9 10 00 00 00 bf 74 00 00 00 48 c7 c2 b0 e8 ca a0 48 c7 c6 90 e8 ca a0 e8 f3 d9 00 00 31 c0 e9 8f 00 00 00 <48> 8b 5b 20 e9 4c ff ff ff f6 05 7d dc 19 01 04 74 55 f6 05 c3 34 [ 2174.058312] RSP: 0018:ffffb5850051fb80 EFLAGS: 00000212 [ 2174.058313] RAX: 0000000037314547 RBX: ffff8947808f57b0 RCX: 0000000000000010 [ 2174.058314] RDX: ffffffffa0cae8b0 RSI: ffffffffa0cae890 RDI: 0000000000000042 [ 2174.058315] RBP: ffffb5850051fbb0 R08: 0000000000000005 R09: 0000000000000003 [ 2174.058317] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa1a7e880 [ 2174.058318] R13: ffff8947801d1b40 R14: 0000000000000000 R15: ffffb5850051fc60 [ 2174.058319] FS: 0000000000000000(0000) GS:ffff8947aba00000(0000) knlGS:0000000000000000 [ 2174.058320] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2174.058321] CR2: 00007f4c9b5e4d9c CR3: 0000000069074001 CR4: 00000000001706f0 [ 2174.058322] Call Trace: [ 2174.058323] acpi_ns_search_and_enter+0x347/0x4ca [ 2174.058325] acpi_ns_lookup+0x63e/0x866 [ 2174.058326] acpi_ps_get_next_namepath+0xbc/0x35a [ 2174.058327] acpi_ps_get_next_arg+0x69d/0x79a [ 2174.058328] ? acpi_ut_trace_ptr+0x2b/0x71 [ 2174.058329] acpi_ps_parse_loop+0x4be/0x924 [ 2174.058330] acpi_ps_parse_aml+0x1af/0x550 [ 2174.058331] acpi_ps_execute_method+0x208/0x2ca [ 2174.058332] acpi_ns_evaluate+0x34e/0x4f0 [ 2174.058333] acpi_ev_asynch_execute_gpe_method+0xc0/0x15e [ 2174.058334] acpi_os_execute_deferred+0x1a/0x30 [ 2174.058335] process_one_work+0x220/0x3c0 [ 2174.058336] worker_thread+0x4d/0x3f0 [ 2174.058337] kthread+0x114/0x150 [ 2174.058338] ? process_one_work+0x3c0/0x3c0 [ 2174.058339] ? kthread_park+0x90/0x90 [ 2174.058340] ret_from_fork+0x22/0x30 - Output of
sudo dmidecode for 0x0011 is below. Not sure if 0x0011 corresponds to gpe11 . If that's not how the GPE numbering works, I can provide full output. Handle 0x0011, DMI type 10, 6 bytes On Board Device Information Type: Video Status: Enabled Description: Mobile Intel HD Graphics - Tried removing HDD Caddy, system won't boot at all (stuck at kernel panic) - from both SSD and Live USB
- Tried flipping the switch on Caddy, same result as removing the caddy
- Tried doing BIOS Update but the update failed. That is a separate issue because Dell provides only EXE files for updating
|
Repair Grub on dual-boot system Posted: 06 Sep 2021 07:08 AM PDT Installed Reborn OS (Arch) alongside Windows 10. I can boot both systems by pressing F12 while the computer logo shows up. I then get something like a boot loader and can choose the system to boot. However if I don't press F12, I will end up in grub-rescue. I cannot access the BIOS, only get a white underscore when pressing F2 at startup. Repair disk tells me to: sudo chroot "/mnt/boot-sav/sda5" pacman -R grub*-common shim-signed This gives me: error: target not found: grub*-common error: target not found: shim-signed ============================== Boot Info Summary =============================== => No boot loader is installed in the MBR of /dev/sda. sda1: __________________________________________________________________________ File system: vfat Boot sector type: Windows 8/2012: FAT32 Boot sector info: No errors found in the Boot Parameter Block. Operating System: Boot files: /efi/Boot/bootx64.efi /efi/RebornOS/grubx64.efi /efi/antergos_grub_jtsw/grubx64.efi /efi/Microsoft/Boot/bootmgfw.efi /efi/Microsoft/Boot/bootmgr.efi /efi/Microsoft/Boot/memtest.efi /efi/OEM/Boot/bootmgfw.efi /efi/OEM/Boot/bootmgr.efi /efi/OEM/Boot/memtest.efi fdisk -l (filtered): ___________________________________________________________ Disk sda: 477 GiB, 512110190592 bytes, 1000215216 sectors Start End Sectors Size Type sda1 2048 206847 204800 100M EFI System sda2 206848 239615 32768 16M Microsoft reserved sda3 239616 170270719 170031104 81.1G Microsoft basic data sda4 998117376 1000214527 2097152 1G Windows recovery environment sda5 500330496 597986745 97656250 46.6G Linux filesystem sda6 597986746 609705495 11718750 5.6G Linux filesystem sda7 609705496 998117375 388411880 185.2G Linux filesystem sda8 170270720 500330495 330059776 157.4G Microsoft basic data ==================== sda5: Location of files loaded by Grub ==================== GiB - GB File Fragment(s) 250.711067200 = 269.198958592 boot/grub/grub.cfg 1 243.880855560 = 261.865074688 boot/vmlinuz-linux 2 243.873043060 = 261.856686080 boot/vmlinuz-linux-lts 2 250.422828674 = 268.889464832 boot/initramfs-linux-fallback.img 1 250.371334076 = 268.834172928 boot/initramfs-linux-lts-fallback.img 1 250.338001251 = 268.798382080 boot/initramfs-linux-lts.img 1 250.385433197 = 268.849311744 boot/initramfs-linux.img 1 ===================== sda5: ls -l /etc/grub.d/ (filtered) ====================== -rwxr-xr-x 1 root root 11782 Jun 30 13:55 10_antergos -rw-r--r-- 1 root root 12036 Jun 10 21:41 10_linux -rwxr-xr-x 1 root root 13327 Jun 10 21:41 20_linux_xen -rwxr-xr-x 1 root root 12152 Jun 10 21:41 30_os-prober -rwxr-xr-x 1 root root 1372 Jun 10 21:41 30_uefi-firmware -rwxr-xr-x 1 root root 630 Aug 10 12:35 35_fwupd -rwxr-xr-x 1 root root 214 Jun 10 21:41 40_custom -rwxr-xr-x 1 root root 215 Jun 10 21:41 41_custom |
Errors when trying to get kubectl completion working Posted: 06 Sep 2021 09:11 AM PDT My question is why do I see this error when trying to get kubectl autocomplete working in my terminal. I really only care about getting the zsh one working. I'm simply using some other examples of other strange issues in the bash version as well for troubleshooting purposes. Here are some basic contexts. OS: Arch Linux Kernel: 5.13.9-arch1-1 Terminal: alacritty, kitty, urxvt Shell: zsh (oh-my-zsh) Kubectl version: 1.21.3 I would also like to note, I have been trying this across many different kubectl versions all the way going back from 1.17, and across many arch kernel releases, terminal version, and zsh versions. It has been the same issue/error. If it matters or not, I am usually in a tmux session, but I experience this in or out of a tmux session. Now, the error $ source <(kubectl completion zsh) __kubectl_type:cd:11: no such file or directory: 0 It's the same in any terminal I run this in. Now, in bash # first I run `/bin/bash` from my `zsh` prompt to switch, maybe there is a better way to test this? $ /bin/bash $ source <(kubectl completion bash) $ kubectl get [tab twice] # on the same line with no line break, it turns my current line into $ kubectl get bash: _get_comp_words_by_ref: command not found bash: _get_comp_words_by_ref: command not found Display all 153 possibilities? (y or n) ... At first I think; "Cool, maybe it kinda worked?". So I type y and it just outputs all of my home dir. I would like to note in my testing this. I've tried all combinations of zsh and bash in and out of tmux and in all three terminals (alacritty, kitty, and urxvt). The results are identical. How do I even troubleshoot this? |
How to exclude paths from being extracted when extracting an iso using xorriso Posted: 06 Sep 2021 08:38 AM PDT As an example I'm trying to extract all the files from the ubuntu live iso except the path /casper/filesystem.squashfs . According to the man page: Normally xorriso only writes to disk files which were given as stdio: pseudo-drives or as log files. But its alter ego osirrox is able to extract file objects from ISO images and to create, overwrite, or delete file objects on disk. Disk file exclusions by -not_mgt, -not_leaf, -not_paths apply. I can extract all paths on the iso fine using: xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -extract / extract_dir But I've been attempting to use the disk file exclusions but to no avail. I've tried different variations or not_leaf and not_paths in different orders both before and after the -extract action. They all extract all paths. Here's a few that I've tried. Using not_leaf : xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -not_leaf 'filesystem.squashfs' -extract / extracted_dir xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -extract / extracted_dir -not_leaf 'filesystem.squashfs' xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -not_mgt on -not_leaf 'filesystem.squashfs' -extract / extracted_dir xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -not_mgt on -extract / extracted_dir -not_leaf 'filesystem.squashfs' Using not_paths with reorderings as above: xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -not_mgt on -not_paths 'casper/filesystem.squashfs' -- -extract / extracted_dir xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -not_mgt on -not_paths '/casper/filesystem.squashfs' -- -extract / extracted_dir xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -not_mgt on -not_paths 'extracted_dir/casper/filesystem.squashfs' -- -extract / extracted_dir I would accept an answer with not_leaf or not_paths , but would prefer both. And an explanation of the logic behind how this is supposed to work (ie why am I not getting it?) would be nice. |
Launcher sshfs mount disappears after terminal is closed Posted: 06 Sep 2021 09:42 AM PDT I want to make a launcher in my MATE desktop that executes script for sshfs mount: #!/bin/bash sshfs login@server:/ /media/user/MOUNT_FOLDER/ This script is called by my launcher: #!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=Application Terminal=true Icon=/usr/share/icons/mate/scalable/devices/drive-harddisk-ieee1394-symbolic.svg Icon[cs]=/usr/share/icons/mate/scalable/devices/drive-harddisk-ieee1394-symbolic.svg Name[cs]=MOUNT MOUNT_NAME Name=MOUNT MOUNT_NAME Exec=/home/USER/mount_scripts/mount_MOUNT_NAME.sh After entering my password, the mounting is correctly established, but when the opened terminal is closed, the mount point disappears. Because the terminal is closed right after the mount point is created, I make just for test purpose another script: #!/bin/bash sshfs login@server:/ /media/user/MOUNT_FOLDER/ $SHELL When I use this script the terminal remains open, but again right after I manually close it, the mounting point disappears. If I manually open terminal window (not by the launcher) and run the original script, the mount point remains open even after closing the opened terminal. So using the script itself should be ok. |
Unable to chroot /mnt/sysimage Posted: 06 Sep 2021 10:01 AM PDT I'm working on a RH 7.3 with some issues on the partitions so It doesn't boot properly and goes in emergency mode. I booted the machine from an RH 7.3 iso and I need to extract an sosreport in Rescue mode but I have the following errors: chroot /mnt/sysimage chroot: failed to run command '/bin/sh': No such file or directory So I use the following command as in the page https://access.redhat.com/solutions/43133: ln -s bash /mnt/sysimage/bin/sh but I'm getting the error message: ln: failed to create symbolic link /mnt/sysimage/bin/sh: No such file or directory Could you help me please? |
Bind/Unbind Linux Module Automatically Posted: 06 Sep 2021 09:05 AM PDT I'm currently trying to create my own USB HID mouse driver as an override of the standard generic USB, which always gets in the way. How can I unbind the generic driver and rebind it to my specific automatically? My Zuoya MMR6 module/driver: https://github.com/vladipus/zuoya-mmr6 |
How to resolve 'System has not been booted with systemd as init system (PID 1). Can't operate' Posted: 06 Sep 2021 08:40 AM PDT When I use this command: root:~# systemctl Output is: System has not been booted with systemd as init system (PID 1). Can't operate This problem occurred in "Kali Linux" and "Debian 9" How can I resolve this problem? |
How to determine the name of a running QEMU virtual machine? Posted: 06 Sep 2021 07:08 AM PDT I would like to determine the name of a QEMU VM I started with: qemu-system-x86_64 -m 4096 -smp 1 \ -net user -net nic,model=virtio -boot menu=on \ -drive file=guixsd-usb-install-0.13.0.x86_64-linux.img \ -drive file=guixsd.img (per the GuixSD VM installation guide). The reason for my desire to determine the VM's name is so that I can save its machine state (similarly to how one can for a VirtualBox VM) using the savevm command. I have tried using: virsh -c qemu:///system list but this returns: Id Name State ---------------------------------------------------- likewise running: ps -ef | grep qemu-system-x86_64 (per this AskUbuntu answer) isn't helpful because of the command I used to start the VM. If it is somehow relevant I am running Gentoo Linux as my host OS. |
screen command cannot find java executable Posted: 06 Sep 2021 07:07 AM PDT I'm trying to execute java from screen : screen -S my-java-app -d -m 'java -jar -Xms512m -Xmx2048m my-java-app.jar' but seems that screen does not know the java command. Running java without screen works just fine. java -jar -Xms512m -Xmx2048m my-java-app.jar I'm using RHEL5. |
NVidia drivers on Macbook Pro (2008) Linux Mint? Posted: 06 Sep 2021 08:02 AM PDT Ok. I am literally installing it from scratch and tracking my process here and now. I've been fighting this for so long. Macbook Pro, 2008 I believe. ~200GB HD. I'm not dual booting. Mint and only Mint. Linux Mint 17 Cinnamon x64 w/ Codecs. In order to boot from USB, I have to edit boot options to include nomodeset . I get live desktop up and running. Looks normal. Double click "Install Linux Mint" > "Erase disk and install Linux Mint" (no encryption, no LVM) > "Require Password to Login" (yes Encrypt home folder). Installer finishes without problem. I don't reboot yet. Still on the Live Desktop from the USB, since the laptop uses EFI, I know I need to install efibootmgr. sudo apt-get install efibootmgr . Success. Running sudo efibootmgr prints out BootCurrent: 0000 BootOrder: 0000,0000,0000,0000,0000,0000,0000,0000,0000 Boot0000* ubuntu BootFFFF* sudo poweroff , pull out USB, boot holding F6 to get efibootmgr's boot menu. I haven't touched nvidia drivers yet, so I still need to add nomodeset to the boot script. Not setting nomodeset will get me to a black screen and nothing ever happens. Booting from the HD and the display is off a little. The Mint splash icon is off center, there's a 1/4 to 1/2 inch gap at the top of the screen where the mouse can't go and nothing is drawn (it's solid black) and the screen generally thinks that it is bigger than it really is. After signing in, the task bar is off the bottom of the screen and there's a couple inches of missing screen off the right hand side as well. Everything else seems to function fine, no discoloration. Need an internet connection. I guess my way to the menu button and click on System Settings > Device Drivers. I insert my USB drive that I previously booted from. I go down to broadcom and click bcmwl-kernel-source then Apply Changes. Remove USB. Shutdown, and start back up holding F6 (still need nomodeset ). Screen is still oversized and off center. I connect to my home network and successfully ping 8.8.8.8 . On a different computer, I pull up this forum post and run: sudo add-apt-repository -y ppa:ubuntu-x-swat/x-updates && sudo apt-get -y update && sudo apt-get -y install nvidia-current nvidia-settings It finishes successfully. During previous trials, I found that I need an xorg.conf for xserver to start. So I run sudo nvidia-xconfig and then sudo reboot hoping it works. No F6 this time. I shouldn't have to. Now here's the problem I can't fix. After the linux splash, I get the blue background old school dialog saying "Failed to start the X server." The short version of the log is NVIDIA: could not open the device file /dev/nvidia0 (Input/output error) no screens found I can login to a tty console after getting through the blue dialog and I pushed the long version of the log to my other computer's ftp. Maybe it can shed some light. Oh, and /dev/nvidia0 does exist. I have tried setting the BusID to PCI:1:0:0 in xorg.conf as some people have claimed that fixed it for them, but not for me. Running lspci | grep VGA lists that my graphics card is NVIDIA Corporation G84M [GeForce 8600M] (rev a1) . I've tried running without an xorg.conf, I still get the same error. Running 'sudo startx' is no different. I'm officially out of ideas. If I didn't mention anything above, then I left it at it's default value. I've spent dozens of hours and learned a lot as I've gone, but I'm at my wit's end. Any clue what to try next? EDIT: Here's my xorg.conf generated by sudo nvidia-xconfig when I have nvidia-331 drivers installed. |
Why do I get "screen is terminating" without root? Posted: 06 Sep 2021 09:15 AM PDT I have installed screen on Fedora 19. When I test the command as root remotely through SSH, it works perfectly. For instance, if I enter screen a new terminal emulator is started and waits for commands. I can detach it, etc. However when I try to do the same once I am logged remotely through SSH as a standard user, the command terminates immediately. The only message I see is [screen is terminating] . Does someone have already had this problem? Is it related to bad permissions? Update: $ strace -e trace=file screen execve("/usr/bin/screen", ["screen"], [/* 23 vars */]) = 0 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 open("/lib64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 3 open("/lib64/libutempter.so.0", O_RDONLY|O_CLOEXEC) = 3 open("/lib64/libcrypt.so.1", O_RDONLY|O_CLOEXEC) = 3 open("/lib64/libpam.so.0", O_RDONLY|O_CLOEXEC) = 3 open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 open("/lib64/libfreebl3.so", O_RDONLY|O_CLOEXEC) = 3 open("/lib64/libaudit.so.1", O_RDONLY|O_CLOEXEC) = 3 open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3 open("/usr/lib/locale/UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) access("/home/steam/.nethackrc", F_OK) = -1 ENOENT (No such file or directory) readlink("/proc/self/fd/0", "/dev/pts/0", 4095) = 10 stat("/dev/pts/0", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 lstat("/dev/pts/0", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 open("/var/run/utmp", O_RDONLY) = 3 open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 open("/lib64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3 open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3 open("/etc/shadow", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied) readlink("/proc/self/fd/0", "/dev/pts/0", 4095) = 10 stat("/dev/pts/0", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 stat("/dev/pts/0", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 lstat("/dev/pts/0", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 stat("/var/run/screen", {st_mode=S_IFDIR|0775, st_size=60, ...}) = 0 Directory '/var/run/screen' must have mode 777. +++ exited with 1 +++ I have tried to change permissions to 777 but then when I execute screen , I get: Directory '/var/run/screen' must have mode 775. Therefore, I have reverted my changes. |
No comments:
Post a Comment