Desktop gets slower after connecting USB storage

My computer is unable to recognize any USB storage device, neither my pen-drive nor my cellphone. When I plug in one, the desktop environment becomes very slow. My USB mouse moves the pointer at a very, very slow speed. Moving windows across the screen and plank dock animations become too slow as well.

My Linux distribution is Linux Mint. I’ve even restore the system to a system snapshot when the PC were supposed to work fine.

I’m sorry if this is a duplicated question but I have read some related questions without getting any useful answer.

Right-Click Menu Gets Stuck and Renders Screen Unresponsive – 18.04

Sometimes launcher right-click menu of Nautilus/Gnome Files gets stuck on screen and eventually causes Gnome UI to become totally unresponsive.

When I right-click and don’t select a menu item and click elsewhere, right-click menu gets stuck on screen, and overlays any other active window. Or else I select a menu item of it, then whole screen items become unresponsive except cursor. After that, when I lock and unlock the current user session, then stuck menu disappears and screen becomes responsive.

I encounter this problem more frequent than occasionally.

System Info:

Dell Inspiron 3543 Ubuntu 18.04 LTS Memory: 7.7 GiB Processor: Intel® Core™ i7-5500U CPU @ 2.40GHz × 4  Graphics: GeForce 840M/PCIe/SSE2 Gnome: 3.28.2 OS type: 64-bit 

Graphics Driver:

sudo lshw -c video *-display    description: 3D controller    product: GM108M [GeForce 840M]    vendor: NVIDIA Corporation    physical id: 0    bus info: pci@0000:08:00.0    version: a2    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list rom    configuration: driver=nvidia latency=0    resources: irq:52 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:d000(size=128) memory:f7000000-f707ffff 

script run through jenkins user gets killed

In our jenkins build configuration we have the following shell commands (Execute shell) as the last step of our build process.

echo "$  USER" echo "Script executed from: $  {PWD}" git submodule update --init --recursive if [ -f composer.json ]; then     /usr/local/bin/composer install fi sed -i 's/phpunit --bootstrap/\/usr\/local\/bin\/phpunit \-\-bootstrap/g' runtest ./runtest --config unittest/configure.conf --coverage /var/lib/jenkins/workspace/coverage/ 

Everything used to work perfectly till our hard drive gets full and jenkins stopped building. After we cleaned the hard drive and tried building through jenkins again, the last step (Execute shell) failed to build with the following error:

[project] $   /bin/sh -xe /tmp/ + echo jenkins jenkins + echo 'Script executed from: /var/lib/jenkins/workspace/project' Script executed from: /var/lib/jenkins/workspace/project + git submodule update --init --recursive error: git-submodule died of signal 9 Build step 'Execute shell' marked build as failure 

We tried running the shell commands as root and everything works as expected. However, once we run it as jenkins user, the process gets killed within few seconds.

[root@localhost project]# su -c "/bin/bash -x /tmp/" -s /bin/sh jenkins + echo jenkins jenkins + echo 'Script executed from: /var/lib/jenkins/workspace/project' Script executed from: /var/lib/jenkins/workspace/project + '[' -f composer.json ']' + /usr/local/bin/composer install Killed 

I checked the system logs /var/log/messages but didnt find any clue. What can cause the issue and how we may troubleshoot this?

Assets when cryptocurrency gets delisted (as Bitcoin SV or Bitcoin Cash)?

What happens to assets that you owe when a cryptocurrency gets delisted? I’m thinking concretely in the case of Kraken, Binance, ShapeShift in delisting Bitcoin SV or SBI holdings delisting Bitcoin Cash (BCH)?

I’m not asking speculative about what happens to the price of those assets (which somehow falls), but how to deal with them.

Can you still sell them in the platform? What if you hold a leveraged position, can you close it?

LocationCallback() never gets called. What am i missing?

The onMapReady() contains code (mFusedLocationAPI-requestLcoationUpdates) which should call the LocationCallback() function that updates the current location. But it seems that the LocationCallback() never gets called at all.

All the permissions required have been given before calls to the Location related methods. The onMapReady() contains code to call the LocationCallback() to update the latest Location but we get a null instead.

public class CustomerMapActivity extends FragmentActivity implements OnMapReadyCallback{

private GoogleMap mMap; Location mlastLocation; LocationRequest mLocationRequest; private Button mRequest; private FusedLocationProviderClient mFusedLocationClient;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_customer_map);      mFusedLocationClient = LocationServices.getFusedLocationProviderClient(CustomerMapActivity.this);      SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(;     mapFragment.getMapAsync(this);       mRequest = (Button) findViewById(;     mRequest.setOnClickListener(new View.OnClickListener(){          @Override         public void onClick(View v){                      checkLocationPermission();                     mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());                     String userid = FirebaseAuth.getInstance().getCurrentUser().getUid();  //Getting the userid from FireBase and will be passed to GeoFire's setLocation method                      DatabaseReference ref = FirebaseDatabase.getInstance().getReference("customerRequests");   // Database reference passed to GeoFire                     GeoFire geoFire = new GeoFire(ref);                     geoFire.setLocation(userid, new GeoLocation(mlastLocation.getLatitude(), mlastLocation.getLongitude()));                  }          }     });  }  @Override public void onMapReady(GoogleMap googleMap) {     mMap = googleMap;      mLocationRequest = new LocationRequest();     mLocationRequest.setInterval(1000);     mLocationRequest.setFastestInterval(1000);     mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);        if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){         if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {          }else{             checkLocationPermission();         }     }        //            mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());          mMap.setMyLocationEnabled(true);  }    LocationCallback mLocationCallback = new LocationCallback(){     @Override     public void onLocationResult(LocationResult locationResult) {         for(Location location : locationResult.getLocations()){                 Toast.makeText(CustomerMapActivity.this,"CallbackDoe",Toast.LENGTH_SHORT).show();                 ActivityCompat.requestPermissions(CustomerMapActivity.this, new String[] {Manifest.permission.ACCESS_FINE_LOCATION},1);             if(getApplicationContext() != null) {                 mlastLocation = location;                 LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());     //Updates the Location of the USER                 mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));                  mMap.animateCamera(CameraUpdateFactory.zoomTo(11));               }         }     } }; 


I expected the onMapReady() to call the LocationCallback() to update the Current Location to the Variable mLastLocation which is used to update it on FireBAse Database using the geoFire.setLocation(userid, new GeoLocation(mlastLocation.getLatitude(), mlastLocation.getLongitude())); at the mRequest.SetOnClickListener() But i get a null “mLastLocation” instead.

How can I make threads to gets the notification? Wait_for doesn’t get it

I got some problem with std::condition_variable::wait_for I got static condition_variable cv_run which I want to use for notification. ‘Q’ button is used to notify all the threads to end working.

So one ‘ball’ thread has to wait for time or until it is notified. Time works fine, but after I use notify all they doesn’t get it..

class PrintManager {  public:     PrintManager(int amount);     Map *map;     std::vector<Ball*> balls;     static bool run;     static std::condition_variable cv_run; 

end after ‘q’ is pressed

void PrintManager::escapeListen() {     while(run)     {         if(getch()=='q')         {run=false;          PrintManager::cv_run.notify_all();         }     } } 

Waiting ball

 void Ball::move() {     mutex cv_m;     std::mutex mtx;     std::unique_lock<std::mutex> lck(mtx);     while (PrintManager::cv_run.wait_for(lck,std::chrono::seconds(sleepTime))==cv_status::no_timeout) {         //can do stuff here :D     //    cout<<"Waiting: "<<this->movThread.get_id()<<endl;     }       while(PrintManager::run) { //do some magic; 

Github repo:

How to dynamically generate the hash value of a file while it gets downloaded from any website?

I’ve tried generating the hash value of a file that is trying to get downloaded and compared it against the list of hash values, and if there is a match then it doesn’t get downloaded.Here i have manually given the details of websites url and the file that needs to be downloaded. Now i need this to be happen dynamically i.e whenever a file from any website is trying to get downloaded then its hash value should be generated and if it matches with the list of hash values available then it shouldn’t get downloaded otherwise it can download.

I hope you understood my problem statement and I request you to help me in solving it.

What actually gets backed up, how many times?

Say I have a photo A taken by the phone camera. It is stored somewhere, but can be seen in the stock Gallery app as well as the Google Photos app. Q1:Are both apps using the same physical copy or are there two copies?

Then, say, my WhatsApp has a photo B I received in a conversation. It is I presumed stored in /WhatsApp/Media/whatsApp Images. It can also be seen in the Gallery and Photos apps.

My WhatsApp has backup set to Back up to Google Drive Daily using Google Account X. Q2:Is this a special arrangement between Google and WhatsApp, because I cannot see anything regarding this in

In the Photos app, Settings, Back up & Sync, the BACKUP ACCOUNT is Y, my other Google Account I have configured on the same phone. In the Back Up device folders details, WhatsApp Images is enabled. Q3:Does this mean that my WhatsApp photo B is backed up to my Google Drive in account Y as well as the special WhatsApp backup in Google Drive in account X?

My contact list on my Galazy s5 gets repopulated from a source i don’t know where

my contact list suddenly started getting exceeding long for no apparent reason, with lots of duplicates, and old contacts I haven’t used in years and deleted. I finally deleted all contacts on my, as well as on my phone. I turned off all syncing except for google, I only have one google account on my phone. I had 90 contacts on this morning, and sometime within the last hour I now have over 6000, mostly duplicates and old contacts. This has happened so many times, I can’t find where they are coming from. My verizon cloud is empty, samsung says it can not back up contacts through verizon accounts, I only have one google account that I know of, I don’t know where this is coming from!! Any help!!!!

DiscriminatorFormula gets executed on select but not on delete statement

I am trying to set up a single table inheritance strategy where I dont have concrete discriminator values thus using @DiscriminatorFormula on my superclass, the setup looks like this:

@Table @DiscriminatorFormula("case when type in ('4','5','6') then '' else '' end ") @Inheritance(strategy = SINGLE_TABLE) public abstract class S {     ... }  @Entity public class A extends S {      @ManyToOne     @JoinColumn(name = "ID")     private ContactPersonBo contactperson; }  @Entity public class B extends S {      @ManyToOne     @JoinColumn(name = "ID")     private CustomerBo customer; } 

As you can see, the problem is the ID (which is not the PK of S) column does indeed reference multiple other tables PrimaryKeys which I try to break down in different entities. The mapping in ContactPersonBo on the other side is pretty straight forward:

@Entity public class ContactPersonBo{      @OneToMany(mappedBy = "contactperson", cascade = CascadeType.ALL, targetEntity=A.class)     private List<A> as; ... 

Now when I persist a new ContactPerson all attached entites gets persisted as desired and expected. If I however call delete on my spring-data-rest-repository for ContactPerson not only all As get deleted but also all Bs which happen to have the same ID as A, although I specified targetEntity=A.class . I can see in hibernate logging that the formula to grab the relevant subset does get ignored, and delete on this table gets called twice. To make this a little bit more visual, the table S looks like this:

   1    2    4      y          <- references table ContactPerson    2    2    1      x          <- references some other table 

I want to delete ContactPerson with ID=2, this should remove as well the entry from S with PK=1, because its type is part of the formula on S which matches to A but not B. However the entry with PK=2 gets deleted as well.

Well this is a complicated setup, I hope I broke it down to state the problem pretty clear as this is my first question here on SO. If not dont hesitate to ask.

P.S.: I cant change the structure of the database, and I would prefer to fix this behaviour in the mapping, rather than remove cascade types and delete those entries by “hand”. I also tried to set @DiscriminatorValue on A and B, doesnt affect anything, but I am pretty sure if I use a normal @DiscriminatorColumn this will work, but is rather unconvinient as types is a long list and there are C,D and Es involved.