SD card doesn't work well under Ubuntu, but does well under Windows

86

Solution 1

I don't have your hardware, but had similar issues with Broadcom and their drivers. Very frustrating. That aside, this may well be worth a shot:

  1. Create a file and write this string into it options sdhci debug_quirks=0x40:

    sudo sh -c 'echo options sdhci debug_quirks=0x40 >> /etc/modprobe.d/sdhci-pci.conf'
    
  2. Now reboot, or reload the module:

    sudo modprobe -r sdhci-pci sdhci
    sudo modprobe sdhci-pci
    

The bug tracker mentioned that it may not give you full speed, but it's worth a try.

(From https://bugzilla.kernel.org/show_bug.cgi?id=73241 and http://www.linuxtechtips.com/2013/08/sd-mmc-ms-pro-card-reader-not-working.html)

Solution 2

I have faced with this issue on linuxlite. The solution was to create a file /etc/modprobe.d/sdhci-pci.conf with the content:

options sdhci debug_quirks=0x40 debug_quirks2=0x4

The option 0x4 decreases speed from ultra high speed to high speed, but it is better that not operable card.

Share:
86

Related videos on Youtube

frank b.
Author by

frank b.

Updated on September 18, 2022

Comments

  • frank b.
    frank b. over 1 year

    I'm using jzy3d/SWT with mapper and surface and this code to create the chart (container is a composite with gridLayout) :

    Settings.getInstance().setHardwareAccelerated(true);
    jzy3DChart = SWTChartComponentFactory.chart(container);
    ((CanvasNewtSWT)jzy3DChart.getCanvas()).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    jzy3DChart.black();
    jzy3DChart.getScene().getGraph().add(surface);
    ChartLauncher.openChart(jzy3DChart);
    

    I get this rendering at initial creation : enter image description here

    But when another part is selected, the newt window always stay on top (chart3 is 2D chart and should be on top) : enter image description here

    I've tried to toggle newt window visibility using :

    newtCanvasSWT.getNEWTChild().setVisible(false/true);
    

    But doing so the newt window becomes independent and no longer embedded in its SWT container and can disappear under other controls when it should not.

    enter image description here

    What am I doing wrong ? How to set newt window not to be always on top ?

    Edit :

    Here is the workaround code I've used :

    getSite().getPage().addPartListener(new IPartListener2() {
        @Override
        public void partHidden(IWorkbenchPartReference partRef) {
            // Dispose jsyz3d chart composite when this part is hidden
            if(partRef.getPart(false) == XYZChartEditor.this) {
                if(chart != null) {
                    chart.dispose();
                    chart = null;
                }
            }
        }
        @Override
        public void partVisible(IWorkbenchPartReference partRef) {
            // Refresh or rebuild chart when this part reappears
            if(partRef.getPart(false) == XYZChartEditor.this) {
                if(chart != null) {
                    // Force chart parent composite to layout
                    chartContainer.layout();
                    return;
                }
                // Rebuild chart
                chart = SWTChartFactory.chart(chartContainer, Quality.Nicest());
                chart.getView().setViewPoint(xyzChartData.getViewPoint());   
                chart.getView().addViewPointChangedListener(XYZChartEditor.this);
                chart.black();
                ChartLauncher.openChart(chart);
                // Force chart parent composite to layout
                chartContainer.layout();
                boolean wasDirty = XYZChartEditor.this.isDirty();
                SelectionChangedEvent event = new SelectionChangedEvent(trialsListViewer, trialsListViewer.getSelection());
                XYZChartEditor.this.selectionChanged(event);
                if(!wasDirty) XYZChartEditor.this.setDirty(false);
                ((CanvasNewtSWT)chart.getCanvas()).addMouseListener(XYZChartEditor.this);       
                canvas = ((CanvasNewtSWT) chart.getCanvas());
                newtCanvasSWT = canvas.getCanvas();
                newtWindow = ((CanvasNewtSWT) chart.getCanvas()).getCanvas().getNEWTChild();
            }
        }
    });
    
    • Oli
      Oli over 8 years
      Could you add any information about the hardware? For example, finding the reader in lspci or lsusb and adding that information to your question might help find other people find other people with the same problem.
    • Charles Green
      Charles Green over 8 years
      What format does the SD card have on it?
    • Charles Green
      Charles Green over 8 years
      It's worth checking: I think Ubuntu has some problem with exFat which is a variant of the FAT and FAT32 systems.
    • Charles Green
      Charles Green over 8 years
      Missed the chat thing - I really dont have a lot to add, but thought maybe we were overlooking a little thing....
  • Ilkin
    Ilkin over 8 years
    Will this change my Ubuntu version from 14.04 (Trusty) to 15.10 (Wily), or simply improve the kernel?
  • Stephen Nichols
    Stephen Nichols over 8 years
    It will only upgrade the kernel. Your Ubuntu release version will be unaffected.
  • Ilkin
    Ilkin over 8 years
    Nope, same problem. Had to force-eject, and every time I force-eject, the card will never register (Ubuntu will try to read it, but something in the background "hangs") until I reboot.
  • Admin
    Admin over 8 years
    It's working! Managed to salvage what was in it via cut-and-paste (albeit everything ran S L O W L Y), and I'm currently formatting the SD card. Fingers crossed!
  • Admin
    Admin over 8 years
    Cut-and-paste everything back to a freshly-wiped SD card, and even added nearly 1 GB of stuff that I've wanted to add. Transfers slow, but no I/O errors. A million thanks!
  • G Trawo
    G Trawo over 8 years
    Glad it worked!
  • MInner
    MInner almost 7 years
    I had to do $ sudo setpci -s 00:1c.2 0x50.B=0x41 after that