XFCE 4.12: desktop taking ages to appear when dual monitor is on - gentoo

i'm using an Gentoo (3.18.9 / Graphic card: ATI Trinity Radeon HD 7660D, details below) with XFCE 4.12 on top. Note that i'm to help isolate the problem, i'm not using any login manager, i'm logging from console and then running "startx".
If i start with one monitor, then log in and add the second, XFCE does a great job at configuring it, deciding which one is primary, and everything works fine.
However, if I then restart (with both monitor on), they both start in mirror mode up to the login, i login ok, then "startx", and i'm then seeing a sort of white screen with the cursor waiting, for nearly 2 minutes. Ultimately the desktop appears on both screen with the correct dual monitor setting. But there's obviously something wrong happening during those 2 minutes every time I open start XFCE.
Unfortunately I don't have many logs. The /var/log/* don't log anything, just the fact that I correctly logged in.
the Xorg in my home directory have a bit more stuff but no obvious error message. In a nutshell, if I try to compare those between a start with one screen, and a start with 2 screens, i have similar sequence, with one extra section when starting with 2 screens:
[ 94.961] (II) RADEON(0): EDID for output HDMI-0
[ 94.961] (II) RADEON(0): Manufacturer: ACI Model: 2493 Serial#: 16843009
[ 94.961] (II) RADEON(0): Year: 2014 Week: 50
[ 94.961] (II) RADEON(0): EDID Version: 1.3
(...)
The two outputs identified as follow:
[ 95.049] (II) RADEON(0): Output HDMI-0 using initial mode 1920x1080
[ 95.049] (II) RADEON(0): Output DVI-0 using initial mode 1920x1080
Then here is the big timelag (see the timestamps jump):
[ 95.290] (II) XINPUT: Adding extended input device "KB USB Keyboard" (type: KEYBOARD, id 9)
[ 95.290] (**) Option "xkb_rules" "evdev"
[ 95.290] (**) Option "xkb_model" "pc104"
[ 95.290] (**) Option "xkb_layout" "us"
[ 153.096] (II) RADEON(0): EDID vendor "ACI", prod id 9363
[ 153.096] (II) RADEON(0): Using EDID range info for horizontal sync
[ 153.096] (II) RADEON(0): Using EDID range info for vertical refresh
[ 153.096] (II) RADEON(0): Printing DDC gathered Modelines:
[ 153.096] (II) RADEON(0): Modeline "1920x1080"x0.0 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (67.5 kHz eP)
While in with one screen I have:
[ 147.475] (II) XINPUT: Adding extended input device "KB USB Keyboard" (type: KEYBOARD, id 9)
[ 147.475] (**) Option "xkb_rules" "evdev"
[ 147.475] (**) Option "xkb_model" "pc104"
[ 147.475] (**) Option "xkb_layout" "us"
[ 148.151] (II) RADEON(0): EDID vendor "ACI", prod id 9363
[ 148.151] (II) RADEON(0): Using EDID range info for horizontal sync
[ 148.151] (II) RADEON(0): Using EDID range info for vertical refresh
I have tried asking on the XFCE forum and elsewhere and couldn't find any help... so this is pretty much my last try before I need to do more drastic changes (like moving to Gnome)...
So any help is appreciated (maybe even just to add extra-logging if that's feasible).
Config:
(--) RADEON(0): Chipset: "ARUBA" (ChipID = 0x9901)
...
(II) Module exa: vendor="X.Org Foundation"
[ 94.757] compiled for 1.16.4, module version = 2.6.0
[ 94.757] ABI class: X.Org Video Driver, version 18.0

Related

Remote backup of Raspberry Pi sd card from Windows

This references details a procedure for backing up the SD card on a running Raspberry Pi from and to a file on another computer (https://johnatilano.com/2016/11/25/use-ssh-and-dd-to-remotely-backup-a-raspberry-pi/)
To do this from a Windows PC it is necessary to install a new "DD tool" for Windows, also referenced above. I've done all of this and thought I had the process figured out, the following command run from a Windows CMD window does create a file on my Windows PC, but shows an error message which I can not figure out.
c:\Windows\System32>ssh me#192.168.xxx.yyy “sudo dd if=/dev/mmcblk0 bs=1M | gzip -” | dd of=\\.\c:/Users/me/Desktop/rPi_backup.gz –progress
I have run this on my LAN to two different Pi's (3B and 4B), Here is the output from the later after about 30 minutes:
c:\Windows\System32>ssh me#192.168.xxx.yyy “sudo dd if=/dev/mmcblk0
bs=1M | gzip -” | dd of=\.\c:/Users/me/Desktop/rPi_backup.gz
–progress
rawwrite dd for windows version 0.5. Written by John Newbigin This
program is covered by the GPL. See copying.txt for details
0me#192.168.xxx.yyy‘s password:
11,754,655,23215193+1 records in 15193+1 records out 15931539456 bytes
(16 GB, 15 GiB) copied, 2528.86 s, 6.3 MB/s 11,755,209,216Error
reading file: 109 The pipe has been ended
22959393+0 records in 22959393+0 records out
I got the same Error 109 for both Pi's. I have checked the SD cards and they are functional, not corrupted nor have any "dirty bits". I have tried to find the error code description, but nothing I see seems to apply to this situation.
Can anyone help me with this problem. I posted it to the above reference, but have not gotten any meaningful replies....RDK
EDIT after using Maxim Sagaydachny's suggestion (in comments). It worked and I got a .gz file on my desktop. I used BalenaEtcher to expand and copy it to an SD card, same size as that of the source. The Pi booted up but it appears that the restored version is a bit crippled, the Pi boots ok, I can log on (console and SSH) but I get this message just after I log on:
-bash: /etc/profile.d/magnum_path.sh: line 1: syntax error near unexpected token
$'sʧ\237\376\351\370'' -bash: /etc/profile.d/magnum_path.sh: line 1: MA▒$▒g▒p▒[▒kh▒▒▒▒▒D(sʧ▒▒▒▒|▒Kq/t
▒▒▒ ▒9▒$A▒6▒▒f▒▒V▒▒▒Y▒▒ UX▒O:▒▒35▒▒1z▒׎▒YC#▒ȓ!▒ӪW▒▒GM▒
<▒▒'▒▒▒`W=|k▒▒▒V ▒9▒▒R▒[j▒
*▒▒ֈ▒▒
I also noted a message in the bootup screen but it went by too fast to fully read so the following i s a stab at what it really said. Something about the expected number of ?? was, for example, 273 and it only sees 272. And I think it was referencing mmcblk0p2....RDK

MacOS - detect when camera is turned on/off

I want to automate a personal workflow that is based on camera usage on my MBP.
Basically I want to know if any of the cameras (built-in or USB) has been turned on or off, so I can run a program or script I'll create.
I think it's OK if I need to poll for the cameras statuses but an event or callback based solution would be ideal
This seems to work.
❯ log stream | grep "Post event kCameraStream"
2020-12-01 14:58:53.137796-0500 0xXXXXXX Default 0x0 XXX 0 VDCAssistant: [com.apple.VDCAssistant:device] [guid:0xXXXXXXXXXXXXXXXX] Post event kCameraStreamStart
2020-12-01 14:58:56.431147-0500 0xXXXXXX Default 0x0 XXX 0 VDCAssistant: [com.apple.VDCAssistant:device] [guid:0xXXXXXXXXXXXXXXXX] Post event kCameraStreamStop
2020-12-01 14:58:56.668970-0500 0xXXXXXX Default 0x0 XXX 0 VDCAssistant: [com.apple.VDCAssistant:device] [guid:0xXXXXXXXXXXXXXXXX] Post event kCameraStreamStart
Some of the numbers in the output are redacted with Xs because I don't know what they mean. :)
log stream --predicate 'eventMessage contains "Post event kCameraStream"' works up to macOS Big Sur, but not in macOS Monterey. You'll have to use a slightly different predicate:
$ log stream --predicate 'subsystem contains "com.apple.UVCExtension" and composedMessage contains "Post PowerLog"'
Filtering the log data using "subsystem CONTAINS "com.apple.UVCExtension" AND composedMessage CONTAINS "Post PowerLog""
Timestamp Thread Type Activity PID TTL
2021-10-27 12:21:13.366628+0200 0x147c5 Default 0x0 353 0 UVCAssistant: (UVCExtension) [com.apple.UVCExtension:device] UVCExtensionDevice:0x1234005d7 [0x7fe3ce008ca0] Post PowerLog {
"VDCAssistant_Device_GUID" = "00000000-1432-0000-1234-000022470000";
"VDCAssistant_Power_State" = On;
}
2021-10-27 12:21:16.946379+0200 0x13dac Default 0x0 353 0 UVCAssistant: (UVCExtension) [com.apple.UVCExtension:device] UVCExtensionDevice:0x1234005d7 [0x7fe3ce008ca0] Post PowerLog {
"VDCAssistant_Device_GUID" = "00000000-1432-0000-1234-000022470000";
"VDCAssistant_Power_State" = Off;
}
As far as I know, you can poll for the camera usage with:
$ lsof -n | grep "AppleCamera"
or change "AppleCamera" with the driver name of an external camera.
Other relevant names to try are: "USBVDC" or "VDCAssistant" or "FaceTime" (or "iSight" in older Macs).
You should get one line with the name and pid of the process using the webcam or nothing, which means that it is not in use.
You could check for all of the keywords and decide that the camera is in use if any of these keywords give you something back.
The -n option is to skip resolving DNS names of IP connections and this speeds the command a lot.
As a side note, I use this app to know when any app is using the microphone and/or webcam: OverSight
In macOS Ventura I find this incantation works:
log stream --predicate 'sender contains "appleh13camerad" and (composedMessage contains "PowerOnCamera" or composedMessage contains "PowerOffCamera")'

Unable to start the startxwin cygwin

I was using Cygwin download by some one in our organization and the xterm worked fine, I recently updated the xterm version, since then I lost the ability to use the xwindow/start the xserver. The bash console where I ran the startxwin shows the following and does not open the xterm window. I manually opened the xterm window and it does not open the xwindows when I ssh'd into the remote machine.
$ startxwin
:0" in "list" command display name "6175
xauth: (stdin):1: bad "add" command line
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.19.3.0
OS: CYGWIN_NT-6.1 6175 2.8.0(0.309/5/3) 2017-04-01 20:47 x86_64
OS: Windows 7 Service Pack 1 [Windows NT 6.1 build 7601] (Win64)
Package: version 1.19.3-2 built 2017-04-23
XWin was started with the following command line:
/usr/bin/XWin :0 -multiwindow -auth
/home/usrpao/.serverauth.13204
(II) xorg.conf is not supported
(II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
LoadPreferences: /home/usrpao/.XWinrc not found
LoadPreferences: Loading /etc/X11/system.XWinrc
LoadPreferences: Done parsing the configuration file...
winDetectSupportedEngines - RemoteSession: no
winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL
winDetectSupportedEngines - Returning, supported engines 00000005
winSetEngine - Multi Window or Rootless => ShadowGDI
winScreenInit - Using Windows display depth of 32 bits per pixel
winAllocateFBShadowGDI - Creating DIB with width: 2560 height: 1024 depth: 32
winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
MIT-SHM extension disabled due to lack of kernel support
XFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in the kernel
glWinSelectGLimplementation: Loaded 'cygnativeGLthunk.dll'
(II) AIGLX: Testing pixelFormatIndex 1
GL_VERSION: 4.3.0 - Build 10.18.14.4280
GL_VENDOR: Intel
GL_RENDERER: Intel(R) HD Graphics 4600
(II) GLX: enabled GLX_SGI_make_current_read
(II) GLX: enabled GLX_SGI_swap_control
(II) GLX: enabled GLX_MESA_swap_control
(II) GLX: enabled GLX_SGIX_pbuffer
(II) GLX: enabled GLX_ARB_multisample
(II) GLX: enabled GLX_SGIS_multisample
(II) GLX: enabled GLX_ARB_fbconfig_float
(II) GLX: enabled GLX_EXT_fbconfig_packed_float
(II) GLX: enabled GLX_ARB_create_context
(II) GLX: enabled GLX_ARB_create_context_profile
(II) GLX: enabled GLX_ARB_create_context_robustness
(II) GLX: enabled GLX_EXT_create_context_es2_profile
(II) GLX: enabled GLX_ARB_framebuffer_sRGB
(II) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) 80 pixel formats reported by wglGetPixelFormatAttribivARB
(II) 44 fbConfigs
(II) ignored pixel formats: 0 not OpenGL, 0 unknown pixel type, 36 unaccelerated
(II) GLX: Initialized Win32 native WGL GL provider for screen 0
winPointerWarpCursor - Discarding first warp: 1280 512
(--) 8 mouse buttons found
(--) Setting autorepeat to delay=500, rate=31
(--) Windows keyboard layout: "00000409" (00000409) "US", type 4
(--) Found matching XKB configuration "English (USA)"
(--) Model = "pc105" Layout = "us" Variant = "none" Options = "none"
Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none"
winInitMultiWindowWM - DISPLAY=:0.0
winMultiWindowXMsgProc - DISPLAY=:0.0
winInitMultiWindowWM - xcb_connect () returned and successfully opened the display.
winProcEstablishConnection - winInitClipboard returned.
winClipboardThreadProc - DISPLAY=:0.0
winMultiWindowXMsgProc - xcb_connect() returned and successfully opened the display.
OS maintains clipboard viewer chain: yes
winClipboardProc - XOpenDisplay () returned and successfully opened the display.
Using Composite redirection
I had a similar issue and tracked it down to startx misbehaving. This is what I saw:
$ ./startx -- :1
:1" in "list" command display name "hostname
xauth: (stdin):1: bad "add" command line
The problem is with the way startx is setting its hostname variable. It does not strip out the carriage return. Later, when startx uses the hostname variable, the contained carriage return causes xuath "add" command to terminate prematurely and fail.
The fix for me was to strip out the carriage return.
Find where the variable hostname gets set in /usr/bin/startx, and just below there add this line:
hostname=$(echo $hostname | sed 's/\x0D//g')
It's a PATH issue. Cygwin\bin should be in the PATH before Windows\System32.
Otherwise system32\hostname.exe is invoked instead of /bin/hostname, which adds a trailing newline to the hostname.
A possible workaround is to invoke /bin/hostname instead of just hostname:
sed -i s/\`hostname/\`\\/bin\\/hostname/ /usr/bin/startx /usr/bin/startxwin
... but you'll face other issues until you put Cygwin at the beginning of the PATH (though then you might face yet other issues, so there's no ideal solution).

How to get details about wifi connections available on my mac system through command line

Currently i am working on MAC-10.9. i wanted to know the details of all wifi networks available on my system.Like
"SSIDName": "network_ng",
"DefaultAuthenticationAlgorithm": "RSNA_PSK",
"DefaultCipherAlgorithm": "CCMP",
"SecurityEnabled": "True",
"ConnectionStatus": "Disconnected",
"BssType": "Infrastructure",
"NetworkConnectable": "True",
"NumberOfSSIDs": "1",
"ProfileName": "",
"SignalQuality": "100"
just see this link http://somesite.zzl.org/PowerBASIC/WiFi.html
similarly i want wi-fi info of my mac system
It won't give you exactly what you're looking for (some of those look like OS-specific parameters), but you can get a lot of the relevant info from the airport command. It's not in the default PATH, so you need to give the full path to the executable:
$ /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s
SSID BSSID RSSI CHANNEL HT CC SECURITY (auth/unicast/group)
myqwest0437 00:24:7b:2e:1c:01 -89 11 N -- WPA(PSK/TKIP/TKIP) WPA2(PSK/AES/TKIP)
Bart2.4 04:a1:51:fc:45:97 -85 9 Y -- WPA2(PSK/AES/AES)
Amped_SR f8:7b:8c:14:70:08 -79 2 Y -- WPA(PSK/AES/AES) WPA2(PSK/AES/AES)
NETGEAR2010 00:26:f2:c2:85:08 -85 11 Y -- WEP
You can also get more detailed info about the network you're joined to with the -I option.

Linux USB Enumeration and uevents

I read an article at http://www.technovelty.org/code/linux/plugging-in-usb.html. Its just very good.
In which function exactly the enumeration of a connected device is done by host and in which function uevent is sent ?
I introduced printks in usb_new_device etc functions and If i use "udevadm monitor --kernel", it is showing the kernel events even before the enumeration function which is called in usb_new_device in hub.c ?
Log follows
[ 110.819399] 123456 hub_irq
[ 110.824952] 123456 hub_port_connect_change
[ 110.979624] 123456 hub_port_init
[ 111.059625] usb 2-1.2: new high speed USB device using fsl-ehci and address 3
[ 111.189722] 123456 usb_new_device
[ 111.196219] usb 2-1.2: New USB device found, idVendor=05ac, idProduct=12a0
[ 111.203113] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 111.210438] usb 2-1.2: Product: iPhone
[ 111.214196] usb 2-1.2: Manufacturer: Apple Inc.
[ 111.218728] usb 2-1.2: SerialNumber: 9356b662a93170509226069e5adf53f2351d774e
KERNEL[110.940183] add /devices/platform/fsl-ehci.1/usb2/2-1/2-1.2 (usb)
Check the timestamps though udevadm out put is at the end(udevadm runs in user space) its actuallt got the event at [ 110.940183] where as usb_new_device was called at [ 111.189722]
I am almost Linux kernel illiterate, so not 100% sure of this info..but managed to trace the USB init with the help of http://www.cs.fsu.edu/~baker/devices/lxr/http/find?v=2.6.11.8
Here is the flow of USB Host code (Please correct me if this is wrong), on Linux 2.6.11.8 kernel
usb_init() // invoked in ../core/usb.c it initializes host, major, usbfs and usb_hub
usb_hub_init() // in core/hub.c it creates a kernel thread hub_thread()
hub_thread() // in core/hub.c
hub_events() // next this if called
hub_port_connect_change() // then this..

Resources