Thursday, April 1, 2021

Recent Questions - Ask Different

Recent Questions - Ask Different


Process throttled after exceeding limit of 150 wakeups per second

Posted: 01 Apr 2021 02:32 AM PDT

I have a process that crunches through some data, running more than 12h. Often it completes without issues but sometimes it slows to a crawl as if it is being throttled. The CPU is close to idle after this happens but the process still appears to do something and has not crashed.

The console (see below) shows a wakeup limit that has been reached. Can this be the cause of the issue?

I tried to renice -n -5 -p PID without effect. I'd like to avoid having to restart the process as it can't resume.

How can I avoid this situation, remove/change the wakeup limit or how can I make the process run normally again when this happens?

Data Source:      Microstackshots  Shared Cache:     0x512b000 4D8DECCA-68A1-3A8F-9311-EFC83DC9C512    Command:          Python  Path:             /usr/local/Cellar/python@3.9/3.9.2_2/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python  Identifier:       org.python.python  Version:          3.9.2 (3.9.2)  PID:              28198    Event:            wakeups  Action taken:     none  Wakeups:          45001 wakeups over the last 287 seconds (157 wakeups per second average), exceeding limit of 150 wakeups per second over 300 seconds  Wakeups limit:    45000  Limit duration:   300s  Wakeups caused:   45001  Wakeups duration: 287s  Duration:         286.96s  Duration Sampled: 162.16s  Steps:            21  

Does importing an .ics calendar resend all invites?

Posted: 01 Apr 2021 01:34 AM PDT

I have exported an .ics calendar which includes past events with previously send out invites to other people.

When I now important this calendar to a new account in Apple Calendar on my Mac, does it send out the invites for these events again?

Apple Shortcut - query state of bedtime

Posted: 01 Apr 2021 12:42 AM PDT

I want to set up a shortcut, which sets airplane mode ON when I charge my phone while it's at scheduled bedtime.

The best would be to set up automation When Charger Is Connected test if bedtime is ON then set airplane mode ON.

But when I set the automation in my iOS, the if script is very limited, it allows me only pass input

  • Select a Home Accessory
  • Clipboard
  • Current Date

I thought I could set up a shortcut that will test bedtime for me and I would run this Shortcut via the Automation, but again, I cannot find a way how to query for bedtime status.

Is there any way how to access the current state of bedtime? Will the Pythonista script help?

Create macOS High Sierra and newer bootable recovery partition on a separate standalone disk

Posted: 01 Apr 2021 01:03 AM PDT

There are manuals on cloning the recovery partitions to a separate disk for any macOS or OS X version prior to High Sierra, but I can google nothing about creating a standalone recovery disk for High Sierra and higher.

Is it possible for APFS based macOSs? Are there any manuals?

Can i set a different default browser for a specific dekstop application?

Posted: 01 Apr 2021 12:37 AM PDT

In relation to this question: How can I set the default browser depending on time of day?

Is it possible to set a different default browser only for a specific desktop Application such as Slack or 1Password so every Link clicked inside those apps would open Chrome instead of Safari?

Mac deleting files that can't be recovered [closed]

Posted: 31 Mar 2021 10:34 PM PDT

I just tested this out with a folder I didn't care about. And it's really terrifying to know that Mac has no failsafe for this that I know of!

Say you have an empty folder - let's call it "FOLDER 1" but you don't know it's empty...

so you drag it into a "parent folder" that contains a copy of "FOLDER 1" with all the files in it it's supposed to have.

You'll be asked to "replace" that folder but never warned that you are replacing the full folder with an empty folder.

Why? Please someone - tell me why!? And when you try to undo this - you'll get an error - and those files are not in recycling bin - or anywhere after that. Just gone. lol

How do I stream Linux audio to Mac computer?

Posted: 31 Mar 2021 07:47 PM PDT

Basically the reverse of this question: How do I stream Mac audio to Linux computer?

How do I stream my linux audio (PopOS) to my Mac

Big Sur update changed Home/Documents folder behavior with Dropbox

Posted: 31 Mar 2021 06:31 PM PDT

I have used Dropbox for 8+ years. I used symbolic links to map the Mac home folders to Dropbox until that would not work (about 1.5 years ago). So came up with the following process to move home folders to a Dropbox backup folder and then link those folder so the mac home folder; then make the links permanent It has worked just fine until Big Sur WRT documents folder. I could sudo mv all folders to a backup folder in Dropbox. But when I made the symbolic links ln -s for the Mac home folder, the Documents folder in the Home directory will not disappear. The ln -s command generates no response nor an error message.

I have turned off system integrity protection to no avail.

It is most frustrating, as I had a process that worked perfectly for back up and replication between machines that has stopped working b/c of some undocumented behavior.

Is there anyone who has some insight that can lead me forward?

Is there a way to copy the HTML out of an Outlook email?

Posted: 31 Mar 2021 02:23 PM PDT

The scenario is that I often get outlook emails sent to me with content that I need to paste into an HTML formatted newsletter.

A lot of this formatting is minor...namely bolded text and hyperlinks.

I'd like to be able to select the paragraph in outlook, copy, then paste into my HTML editor with the HTML.

So if outlooks has this:

This is bold and this is a link.

I'd like to paste it like this:

<b>This is bold</b> and <a href="http://example.com">this is a link</a>  

Alas, it doesn't do that, it just pastes the raw text like this:

This is bold and this is a link  

So for every section I have to constantly go into my text editor and re-apply tags as needed. Not a huge deal...except when you multiple this x20 or so and then it just gets tedious.

Is there any way to copy the content from outlook and retain the HTML formatting as actual HTML?

How to create and send "move folder to trash" AppleScript message to the Finder using C or assembly?

Posted: 31 Mar 2021 06:32 PM PDT

How to create and send "move [folder as FSSpec record] to trash" script to the Finder application using C or (PowerPC or 680x0) assembly language?

I did a PBCatSearch (1) and got a dozen of FSSpec records describing folders. Now I want to trash these folders. The best way to do it, I think, will be by sending an AppleScript message to the Finder, because it deals with the Trash and only the Finder knows what the Trash abstraction actually is. The problem is that I wrote Apple scripts only in Script Editor, and never wrote them in assembly or C.

post scriptum: This question is about pre-OSX technology. However, CarbonLib API answers compatible with Mac OS 9 are okay.

Something keeping my iPhone awake

Posted: 31 Mar 2021 06:46 PM PDT

For the past week or so, perhaps since updating my iPhone 6S to iOS 14.4.1 or 14.4.2 periodically if I plug my phone in to charge, or even just raise to wake, whether I fully wake it with TouchID or not, then it does not go back to sleep, whether charging or not.
The screen stays on indefinitely. I've tested it to 15 minutes which is far beyond normal behaviour for either raise to wake or its set sleep period when fully awakened.

I am not actively running any app designed to keep it awake, like a sat nav etc.

This may coincide with the iOS update itself, or with the series of app updates I tend to run only infrequently, usually after an OS update.

I have discovered if I swipe up to kill 'some' apps this behaviour stops. I did this at "almost smart random", killing a 3rd party app I knew had been recently updated then re-testing until it stopped misbehaving. I didn't write down what order, rather annoyingly, hence the 'almost' smart. My current suspects are IMDB, AnyList & Virgin TV Control. A reboot will also reset the behaviour, though as this is in effect rebooting all the apps it seems less useful as a diagnostic. Once it behaves again it may take up to a couple of days to manifest once more, so this is tough to tie down.

As I doubt there are too many people who have this issue and all three of those apps, this is really a "has anyone else had this issue & can we jointly discover any commonalities?"

Alt Gr not working with Microsoft Windows RDP client on Mac OS with a PC keyboaard

Posted: 01 Apr 2021 02:31 AM PDT

Alt Gr key (right alt) randomly stops working when working on Microsoft RDP client and behaves as left alt instead.

I am on a Macbook Air M1, with a PC keyboard, using an AzertyPC layout in MacOS.

When this occurs, switching the RDP keyboard mode to Unicode will fix the problem but it will create other issues (like shift+leftAlt+key will stop working in visual studio inside the RDP)

This leads to three questions:

  1. There is a workaround on windows for this issue which is to press ALT+Enter on a RDP window. Is there an explanation on what it does? Is there a smilar workaround on MacOS?
  2. Why switching to Unicode makes Alt Gr work properly?
  3. Why in Unicode Shift+LeftAlt+Key works differently?

How can I tell if all USB-C ports on a 2020 M1 MacBook Pro are the same speed, or if one or more will be faster than others?

Posted: 01 Apr 2021 12:41 AM PDT

I'm doing some heavy copying of files, and wish to do it via the fastest USB-C connection possible.

I tried holding option and clicking on the apple logo on the very top left, then going to System Information. From here on I'm guessing. I looked under 'Hardware' and see two areas of interest: 'Thunderbolt/USB4', and 'USB'. Does this automatically imply that one or more USB-C ports are faster than others?

Question

How exactly can I tell if one (or more) USB-C ports on a MacBook Pro offers faster speeds, and how can I easily know which that is?

How can I modify the Home Screen layout from macOS?

Posted: 31 Mar 2021 03:04 PM PDT

Apple Configurator 2 can allegedly be used to modify the Home Screen layout on an iOS device from macOS. However it appears to provide no way to configure the major new feature of Home Screens: Widgets. As near as I can tell Configurator 2 just supports reordering and regrouping of apps.

Can Configurator 2 in fact be used to modify the Home Screen (Widgets included)? If not is there a tool that can?

Can't export HEVC videos from Photos app

Posted: 01 Apr 2021 02:02 AM PDT

I have a late 2012 iMac running Catalina (10.15.7) as it's too old to upgrade to Big Sur. Photos are synced from my phone with iCloud.

I'm unable to export HEVC videos to other formats. When I drag and drop to the finder, the cursor shows a green plus sign but nothing happens. No error, but no video either.

When I choose File > Export > Export 1 Video… I get an unable to export error: Unknown error (0).

The videos play fine in Photos. I can export them using File > Export > Export Unmodified Original, and they show up as HEVC videos in .mov containers. They play fine in the Finder with Quicklook, and I can open them in Quicktime Player, although File > Export As has all its options greyed out.

This seems to apply to every HEVC video in my library. Other formats (e.g. H.264) work normally. I have a newer iMac running Big Sur synced to the same iCloud library, and I can export normally there.

Apple says HEVC support was introduced in High Sierra, so Catalina should be fine. And there must be some support, since I can watch the videos.

What could be causing this and how can I fix it?

zsh: killed git on Mac

Posted: 01 Apr 2021 12:04 AM PDT

Hi~ I am just using a Mac with M1 chip.

I just found when I tried to run

git clone ...  

I got

zsh: killed git   

What should I do?

I have tried to reinstall git via brew. but it doesn't work.

git version:

git-2.30.1.arm64_big_sur.bottle.tar.gz  

Why won't my iMac boot? (com.apple.displaypolicyd exited with abnormal code: 1)

Posted: 31 Mar 2021 05:02 PM PDT

I'm using a 21.5-inch 2017 iMac with 3.6GHz i7 CPU, and Radeon Pro 560 graphics card. I'm running Mac OS Mojave 10.14.6

For the last week, the iMac will not finish booting. The progress bar gets halfway, it stalls, and eventually it appears to shut off. If I boot in safe mode, it will boot.

I have removed all non-Apple extensions, login items, daemons, etc, etc. But it makes no difference.

In the console, I see the following error message every time at the exact timestamp of the boot sequence where the Mac dies:

com.apple.xpc.launchd[1] (com.apple.displaypolicyd[418]): Service exited with abnormal code: 1  

All the questions I can find online about com.apple.displaypolicyd seem to involve Hackintoshes. This is not a Hackintosh.

UPDATE (2021-02-08): After enabling verbose mode, here's a sequence of screenshots during boot:

Boot 1

Boot 2

Boot 3

Boot 4

Boot 5

Boot 6

Boot 7

Boot 8

Boot 9

The sequence ends with what looks like:

IOConsoleUsers: time(0) 0->0, lin 0, llk 1,  IOConsoleUsers: GIOScreenLockState 3, hs 0, bs 0, now 0, sm 0x0  

Does anyone have any insight on what might be going on? Is the graphics card going bad? Might there be some setting I could adjust to fix this?

UPDATE (2021-03-03): Noticed today there is a /var/log/displaypolicy/ folder containing the files displaypolicyd.1/0/0.log, displaypolicyd.log, and iogdiagnose-last.bin. In case these might be useful in diagnosing the issue, here is a ZIP of those files.

I can't get the zsh-theme to update all the inner shell scripting with each "return" on the terminal

Posted: 31 Mar 2021 06:05 PM PDT

Here is my new oh-my-zsh zsh-theme, updated with an escape character before each code block within $()'s which allows it to update every time the prompt is displayed (works with setopt prompt_subst:

PROMPT="%F{yellow}%n%F{white}@%F{green}%M %F{cyan}%j %F{white}\$(curl -s https://api.myip.com | jq .ip -r) %F{green}%2c%F{cyan} [%f "  RPROMPT="\$(git_prompt_info) %F{cyan}] %F{red}\$(top -l 1 | grep 'Load Avg' | awk '{print $3, $4, $5}' | tr -d , | awk '{print $2}')[\$(sysctl hw.ncpu | grep -o -E '[1-9]+')] @ \$(top -l 1 | grep 'CPU usage:' | awk '{print $3, $5, $7}' | tr -d , | awk '{print $3,"%%"}') idle %F{green}%W %* %F{yellow}%D{%p}%f"    ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}"  ZSH_THEME_GIT_PROMPT_SUFFIX="%f"  ZSH_THEME_GIT_PROMPT_DIRTY=" %F{red}*%f"  ZSH_THEME_GIT_PROMPT_CLEAN=""  

It will dynamically change the date and time, the IP address, and the git_prompt_info, every time I press return, but the shell scripting like \$(top -l 1 | grep 'Load Avg' | awk '{print $3, $4, $5}' | tr -d , | awk '{print $2}') does not update every time I press "return", it gives me an error instead:

awk: syntax error at source line 1   context is      {print >>>  , <<<  awk: illegal statement at source line 1  awk: illegal statement at source line 1  

What's going on here?

Is there an easy way to look through a directory, preview file by file, and choose to keep or delete it?

Posted: 31 Mar 2021 09:02 PM PDT

I'm mostly looking to do an initial pass of a folder of 10k images and I want to go through one by one and mark each for deletion or for keeping. Any easy way to do that on a mac or is there a photo organization program that will do this?

Airdrop seems to be missing on my Macbook Pro

Posted: 31 Mar 2021 02:17 PM PDT

System: MacBook Pro (15-inch, 2017) macOS 10.13.6 (17G14033)

Issue: I cannot send files to my MacBook Pro from my iPhones using Airdrop. When I try to share a file from a iPhone to the Mac using AirDrop, the Mac just doesn't show up among the available users. I looked for AirDrop among the Finder Favorites, and it's not there:

enter image description here

Following the instructions on this website, I navigated to the Go menu in Finder, selected Go to Folder and pasted in this path:

/System/Library/CoreServices/Finder.app/Contents/Applications   

This is what I see:

enter image description here

However, if I click on the AirDrop icon, I get this error message:

enter image description here

What is happening? Can you help me get AirDrop to work on my Mac?

EDIT: there's no AirDrop item in the Finder → Go menu

enter image description here

the Shift++R shortcut doesn't seem to do anything at all, and finally both WiFi and BlueTooth are turned on:

enter image description here

Photos always listed as most recent

Posted: 31 Mar 2021 02:03 PM PDT

I have a few photos from one photo "shoot" that are always listed as most recent in the iPhone Photos app even though they were taken months ago. Why do they not sort by date as with other photos?

External WD Drive showing read only

Posted: 01 Apr 2021 02:18 AM PDT

I have WD External SSD Drive and macOS Catalina. The drive is formatted in ExFAT

Initially, I used my external drive 2-3 times and it was working fine. Suddenly today I am not able to write anything in my Drive as its showing Read-Only.

output from mount

/dev/disk2s2 on /Volumes/MUKESH (exfat, local, nodev, nosuid, read-only, noowners)  

I have tried running following command but it did not work.

sudo chmod -R 777 /Volumes/MUKESH  

Here is what I see in disk utility enter image description here

In Get-Info section I see this.

enter image description here

Drivers not working on Windows 10 installed (CLI process) on external SSD running on Macbook

Posted: 31 Mar 2021 05:48 PM PDT

I have a problem with the installation of Windows 10 (November 2019) on my MacBook Air 2018. I tried to use a virtual machine the first time, but some drivers did not work (trackpad, audio and keyboard did not work). I used this tutorial on YouTube.

So, I decided to follow this guide (using the Windows CLI) carefully, step by step, at the part "Using a Flash Drive and the Windows CLI to Install Windows 10".

My problem is at this point in step 3:

DISKPART> list volume      Volume ###  Ltr  Label        Fs     Type        Size     Status     Info    ----------  ---  -----------  -----  ----------  -------  ---------  --------    Volume 0     W   BOOTCAMP     NTFS   Partition    249 GB  Healthy    Volume 1         Recovery     NTFS   Partition    800 MB  Healthy    Volume 2     S   EFI          FAT32  Partition    200 MB  Healthy    Hidden    Volume 3     C   WINSTALL     FAT32  Removable     29 GB  Healthy  

Instead of volume WINSTALL, I see a D volume, in CD-ROM format (only 2 Gb). Without that volume, I can not continue with the installation, because the prompt does not find the image .ISO of windows contained in WINSTALL.

Before start, I followed this guide (answer #1) to prepare the SSD for the installation. I formatted the SSD in the ExFAT format and then I copied the contents of the Windows 10 .ISO image (that I've opened with the Finder) inside the SSD (I did not create any partitions with the macOS Disk Utility application). I want to specify that in the guide a 500 Gb SSD was used and my SSD is 250 GB in size.

This is the content of my SSD before starting the process of installation. enter image description here

And this is the error at the command

dism /Get-ImageInfo /ImageFile:C:\sources\install.wim

enter image description here

English translation: "Error 87, parameter not correct. The image management and maintenance log file is available in X:\windows\Logs\DISM\dism.log"

Thank you so much for your time. I am available for any questions.

Can I modify the "move" calories for a pasta day?

Posted: 31 Mar 2021 08:46 PM PDT

I have a streak of 333+ days of hitting my move goal and I'd like to keep it. A few days ago, according to my iPhone today, I did only 418 instead of 420 calories -- so it says I didn't meet my goal. I'd like to fudge it since I could have easily spent two extra calories and, I'm pretty sure I exercised until it said I had completed my move and exercise goals, otherwise I would have kept going.

Is there any way to go back and add in the two extra calories so that my move streak will continue? I guess it's not a huge deal but I'm kinda bummed and feeling betrayed.

iOS is version 12.3.1, watchOS is version 5.2.1

Why does Mac OS overwrite whole folders rather than merging their contents?

Posted: 31 Mar 2021 10:30 PM PDT

I've noticed that if I have two folders of the same name but different files in each, copying one on top of the other (eg: from different parent locations) will cause the contents of the first folder to be wiped out by the second. Windows does not do this; It merges the contents of the two folders, making the operation far less destructive. On Mac it feels very risky.

Why is this? Is it an option which can be changed?

How to take photo using Terminal?

Posted: 31 Mar 2021 05:18 PM PDT

Is it possible to take a photo or record a short video with the MacBook's webcam using Terminal?

sh-3.2# system_profiler SPSoftwareDataType   Software:        System Software Overview:          System Version: macOS 10.13.4 (17E199)        Kernel Version: Darwin 17.5.0        Boot Volume: lily        Boot Mode: Normal        Computer Name: lily's MacBook Air        User Name: System Administrator (root)        Secure Virtual Memory: Enabled        System Integrity Protection: Enabled  

How do I disable sending or receiving "effects" in iOS 10.1 Messages?

Posted: 31 Mar 2021 08:00 PM PDT

For reasons past comprehension, the new iOS 10 Messages app allows applying "effects" to messages. It used to be possible to disable the ability to generate or receive these abominations by choosing

Settings > General > Accessibility > Reduce Motion

but since 10.1, this now appears to be impossible.

How do I disable sending or receiving "effects" in iOS 10.1 Messages?

Is it possible to use Boot Camp with Windows 10 from an external HDD?

Posted: 31 Mar 2021 05:25 PM PDT

I need to run Visual Studio on my MacBook Pro and I need Windows to do that. The easiest and well known way to install Windows on a Mac is by running the Boot Camp app on the Mac and let it do what's necessary. The problem is that I don't want to partition the Internal SSD so the remaining option is to install Boot Camp Windows 10 on an External Drive and boot it every time I need it by plugging in my external USB 3.0 HDD. Is this achievable?

Macbook Pro retina 13: why 1280x800 (no HiDPI) looks blurry?

Posted: 31 Mar 2021 06:40 PM PDT

I have a macbook pro 2.5Ghz i5 retina 13 inches. I'm running Mountain Lion. When I change the resolution to 1280x800 (no HiDPI) it looks blurry, more blurry than a non-retina 13 inch macbook pro. Why is this? I don't understand this since its 1/2 of the native resolution.

Thanks

How can I open port 80 so a non-root process can bind to it?

Posted: 31 Mar 2021 02:50 PM PDT

I want to run a web server on my Mac as a non-root process. Normally only root processes can bind to port 80 (or to any port below 1024).

Can I open port 80 specifically so that non-root processes can listen on it?

No comments:

Post a Comment