54

For several months now i've had an issue where after using my laptop for a couple of weeks without restarting, i'll slowly lose my ability to copy and paste. First it's only between different apps such as Terminal and Sublime Text, but eventually it's system wide and stops working everywhere.

As I type this, nothing seems to be copying to clipboard. Not in textedit, chrome, safari, terminal or otherwise.

Going in to Finder > Clipboard shows only one small piece of text which is the last thing I successfully copied before it completely stopped working.

Should I dump a process list here to show what i've got running or is there a common issue that could be the cause?

I'm on a 13" retina macbook pro running 10.9.

Thanks

Edit 1: It's drag and drop too.

Edit 2: After trying a million fixes found on the internet (changing file permissions, /private/var fixes, disabling hidden files from showing etc, killing third-party processes one by one), none of it worked. I did find however that killing the WindowServer process, which esentially closes all windows and resets the GUI, does provide a bandaid "fix" to the problem and bring copy&paste/drag&drop back. However, this is not particularly surprising. It's almost as inconvenient as simply restarting, which was my old fix. Still would like to figure out the underlying cause. My main suspect is the Windows apps I run via Crossover are messing with something in the system, even after killing Crossover and their processors.

Edit 22/6: I will post a process list and result from kextstat | grep -v com.apple once the issue arrises again.

  • 2
    Definitely post a list of processes that are running when it starts doing this. Also send us a list of non-Apple kernel extensions. (kextstat | grep -v com.apple) – daviewales May 26 '14 at 8:04
  • @Martin waiting for the kextstat | grep -v com.apple result. – Rob Jun 15 '14 at 10:20
  • I don't have a solution, I just want to add that I've had the drag & drop issue as well a few times since Mavericks was released, so I would suppose it's just a rarely occuring bug. Unfortunately, restarting has always been my solution to this. – BlackWolf Jun 18 '14 at 8:42
  • 1
    @Rob why put a bounty on that ? He won't help us with more informations... – Thomas Ayoub Jun 21 '14 at 9:29
  • @Rob I will post a process list and result from kextstat | grep -v com.apple once the issue arrises again. Have not had it happen again since, though haven't been using this machine as much. – Martin Jun 22 '14 at 13:05
20

Whenever I have this problem it's because I've accidentally turned mouse keys on. (Option + 5) This is only the case if you have a keyboard without a numpad though.

  • 4
    I want to thank you for this, from the future. This has been driving me crazy. – Dennis Aug 14 '15 at 21:03
  • 4
    Wow, thanks for that hint! How to turn this off: apple.stackexchange.com/questions/56506/… – Marcel Jackwerth Sep 2 '15 at 7:01
  • At the moment it is not "only the case if you have a keyboard without a numpad", actually I have it on a full keyboard every once in a while. – lifecoder Dec 28 '15 at 13:01
  • 2
    Didn't work for me on El Capitan. Option X5 doesn't automatically turn mouse keys on in this OSX version. – a20 Jul 18 '16 at 6:52
  • It worked for me too on macOS Sierra. To clarify it is ⌥ + 5 . – Tomanow Mar 23 '17 at 14:44
4

This may happen when some system service crashed/was restarted. The applications started before can't exchange their copy buffer with applications started later. If you quit an earlier started application and start it new, it works again properly.

  • This sounds reasonable but actually it's not. I'm tried copying and pasting into the same website/tab on Chrome and it didn't work. – a20 Jul 18 '16 at 6:57
  • Thanks, I restarted Sublime and now I can finally copy paste again wooho – Pär Nils Amsen Aug 22 '17 at 15:10
3

Please check whether the pbcopy command works correctly.

If it fails, then the advice from here may help by restarting the pasteboard service, e.g.:

launchctl stop com.apple.pboard
launchctl start com.apple.pboard

If this won't help, and you'd like to avoid restart, you may try remapping your Copy&Paste shortcuts by Karabiner app. See: Remap Ctrl+C, Ctrl+V, and Ctrl-X.

2

This sounds like an extreme answer, but it's not. If you are on OSX 10.8+ press alt as the computer boots, go into disk utility and verify/repair everything. Then go to reinstall OSX. I've done this at least a dozen times when I've messed up,OS files. It doesn't touch your files, just OSX files. It will take several hours and a good internet connection, but it has fixed every OS level problem I've ever had.

  • 5
    That may be a viable solution, but it's still pretty extreme! – Keegan Quinn Aug 7 '15 at 22:26
  • Such a bad answer. Steve TMQ's answer below is much better. – a20 Jul 18 '16 at 6:55
2

First sorry for the length of this post and for the spelling I am dyslexic....

People are giving answers without having the info needed to give a good answer.

The info that Martin needs to give is:

1) How he is trying to do the cut and paste (only with the mouse or using the keyboard ("command+c" for copy and "command+v" for paste) or both or using the menu items?

2) Is highlight the object to C+P the problem?

3) What software is installed and running? (because the problem get's worse over time it sounds like a "memory leak" from a program with a bug in it)

He tells use what he has done and why (looked at answers on the internet) but applying answers you find on the internet without knowing the cause can make matters worse.

Now for a answer based on the information given: As his problem is something that gets worse over time it must be down to something that is happing over time or something that is triggered at certain times it must be software.

Why not hardware? The time frame is weeks not second, minutes or hours then it is unlikely to be hardware.

It is very unlikely to be the OS, Why? because we don't see this problem on all other systems running the same version of the OS X that he is running.

It is very unlikely to be a "permissions" problem because it happens after a time frame of a week. If it was "permissions" then it would happen straight (right away) off and all the time.

So what is left: Installed Software.

Martin says killing the "WindowServer" sort of fixes the problem: Why? All software that uses cut and past uses the "WindowServer" and if any software is overwhelming the "WindowServer's cut&past services" maybe by a memory leak due to a bug then this symptom is to be expected. Also as OS X uses cache systems, both memory and disk killing the buggy process will not clear the cache or fix the symptom. So tracking down the software is not going to be easy or quick.

So knowing the above; even though he kills the Crossover programs and that douse not work we can say that it still might be the programs used with Crossover or Crossover itself that is leading to the problem especially if Martin is cutting and pasting between programs running in Crossover and OS X programs. Without knowing what other programs he uses including what ones he using with Crossover it is hard to move forward.

What can Martin do?

1) Shut the computer down more frequently.

2) Note how long it takes before the first error happens and keep a running log of what programs he has had running in that time.

3) Take note of if the problem starts right after a particular program is used.

4) Find a way of working without Crossover programs find MAC OS X alternatives

5) If you can't move from windows programs and have an intel mac then think about using VMware and bootcamp install of Crossover

6) If you must use Crossover then you need to find the program causing the problem and that is going to take a long time as you say it thats weeks for the problem to start. the points below are for this process.

7) Work with only Mac programs for a while (just over the time it takes for the problem to start and if the problem has not started then the problem must be with programs running under Crossover or Crossover itself.

8) Only work with mac programs and one other program under Crossover if the problem happens the :-) you found it.

9) Only work with mac programs and another program under Crossover if the problem happens the :-) you found it.

10) repeat 8 to 9 until the problem happens :-) you found it.

11) backup your data files

12) re-format/erase your disk

13) reinstall OS X

0

This is perhaps a mistaken sudo command that deleted a file or a virus.

From your description it seems that it is most likely a virus. In which case you need to reinstall mavericks somehow. Yep viruses really suck.

But first there are a few other things you can try.

Solution to the problem:

  1. Try and look through your permissions using Disk Utility, see if anything looks funky.
  2. If your are using the apple mighty mouse, it has been prone to have problems with copy and paste functions.
  3. Check and see if you have any Logitech application installed, they also have been prone to causing problems with copy and paste.
  4. Many printer applications can cause similar problems, especially Lexmark.
  5. Oh and make sure your mouse has the secondary button function turned on in system preferences.
  6. If none of these things are working and you don't want to buy a new computer or somehow reinstall your entire OS, try this. (Warning you have to be a little bit of a hacker (not much of a hacker really though)). Reinstall your important system files."WHAT?!" You might be thinking. "HOW?!!". Well I'll tell you. Get out your old install Mavericks disk or application and find the system files. Then right click on the application (or the application on the disk) and select "Show Package Contents". Then it will bring up a folder of the application contents. Go into the contents folder and select MacOS folder. Inside is the file "Install Mac OS X Mavericks". Double click then go through the package install steps and your good to go!
  7. And yet even if that doesn't work then call apple to ask if you can re-install in an even more manual way.
  • 7
    What makes you think "it seems it's most likely a virus?" Strictly speaking, even when using quasi-emulation software such as crossover, there's is currently no "virus" that infects a Mac running OSX 10.9. Other forms of malware: yes. That being said, what makes you think it's malware at all? The most likely scenario is the OP has installed some software, which has made low level system modifications that are interfering with the pastebin service. This it why the kextstat output was requested. – njboot Jun 25 '14 at 7:49
  • Well I would consider a virus just as a general of a term as "malware". It's much easier to understand than- "...I'm afraid you have some malware within your computer, in fact it's some some form of time bomb, trojan, spyware..." I mean really, this don't effect the answer's frame of reference. – fixcard Jun 27 '14 at 19:31
0

I faced the same issue. I was not able to copy from TextEdit to Mail using cmd+C cmd+V. Then I realized that I had enabled "Paste and Match Style" for all applications in System Preferences->KeyBoard->Shortcuts->App Shortcuts. I changed "Paste and Match Style" only for Textedit app in system preferences and then I was able to copy paste from TextEdit to Mail.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .