部分電腦安裝升級 ubuntu 12.04 後無法掛起問題的解決(掛起無法喚醒同樣有效)

來源:互聯網
上載者:User
我的Ubuntu12.04是安裝的windows案頭安裝版(使用wubi安裝),原來使用狀況良好,前兩天安裝了更新後,發現系統掛起後不能喚醒--出現的狀況有:螢幕暗黑但是能移動滑鼠,打不開原案頭即使有時能開啟案頭但是什麼功能按鍵也沒有,需要進入終端(Ctrl+Alt+F1)重啟系統! google了很久終於找到解決方案,根據http://ubuntuforums.org/showthread.php?p=11926504方法解決了。

方法:

一、開啟終端在/etc/pm/sleep.d/建立20_custom-ehci_hcd檔案

sudo gedit /etc/pm/sleep.d/20_custom-ehci_hcd

二、複製下面代碼到檔案裡儲存並退出
#!/bin/sh#inspired by http://art.ubuntuforums.org/showpost...0&postcount=19#...and http://thecodecentral.com/2011/01/18...ot-working-bug# tidied by tqzzaa VERSION=1.1DEV_LIST=/tmp/usb-dev-listDRIVERS_DIR=/sys/bus/pci/driversDRIVERS="ehci xhci" # ehci_hcd, xhci_hcdHEX="[[:xdigit:]]"MAX_BIND_ATTEMPTS=2BIND_WAIT=0.1unbindDev() {echo -n > $DEV_LIST 2>/dev/nullfor driver in $DRIVERS; doDDIR=$DRIVERS_DIR/${driver}_hcdfor dev in `ls $DDIR 2>/dev/null | egrep "^$HEX+:$HEX+:$HEX"`; doecho -n "$dev" > $DDIR/unbindecho "$driver $dev" >> $DEV_LISTdone#for bus in $EHCI_BUSES; doecho -n $bus > /sys/bus/pci/drivers/ehci_hcd/unbind# donedone}bindDev() {if [ -s $DEV_LIST ]; thenwhile read driver dev; doDDIR=$DRIVERS_DIR/${driver}_hcd#for bus in $EHCI_BUSES; doecho -n $bus > /sys/bus/pci/drivers/ehci_hcd/bind#donewhile [ $((MAX_BIND_ATTEMPTS)) -gt 0 ]; doecho -n "$dev" > $DDIR/bindif [ ! -L "$DDIR/$dev" ]; thensleep $BIND_WAITelsebreakfiMAX_BIND_ATTEMPTS=$((MAX_BIND_ATTEMPTS-1))donedone < $DEV_LISTfirm $DEV_LIST 2>/dev/nullchvt 1chvt 7}EHCI_BUSES="0000:00:1a.0 0000:00:1d.0"case "$1" inhibernate|suspend)unbindDev;;resume|thaw)bindDev;;esac



三、改變20_custom-ehci_hcd檔案許可權

sudo chmod 755 /etc/pm/sleep.d/20_custom-ehci_hcd

四、重啟

我電腦就是這樣弄好的。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.