Skip to content

Instantly share code, notes, and snippets.

Linux on Dell Inspiron 11 (3147)

This is a guide to resolve the following issues with Linux on Dell Inspiron 11 3147:

  • suspend/resume issues (cannot go to sleep, cannot wake up from sleep, reboots instead of resume)
  • freezes (gpu freezes mostly when playing video)

I'm using Fedora, but the guide should work on every distro. Adapt as necessary.

Hardware

Output of lspci:

@stoneage7
stoneage7 / VDI-shrink-trim.md
Last active February 20, 2024 21:00
Automatically shrinking VDI images under VirtualBox

Motivation

The purpose of this gist is to set up a virtual machine in such a way that the on-disk image in the host machine automatically grows and shrinks as needed by the guest machine. This utilizes the (still undocumented) "--discard" and "--nonrotational" parameters in "VBoxManage storageattach" which make the attached image appear as an SSD to the guest. Guest OS will then issue TRIM commands to the virtual controller where such an image is attached. VirtualBox is then able to capture the commands and punch holes in the attached VDIs.

Although there is some initial setup needed, I think the time saved with babysitting the VDIs is worth it. Usually you would need to zero out the free space with zerofree or sdelete and then run "VBoxManage --compact" on your images. With this setup you can allocate a large dynamic VDI (1TB or so) and it will keep itself at minimum size for easy syncing, backup, etc. You can also set it up in a template machine if you use one for clones etc.

Requirements

  • Linux
@stoneage7
stoneage7 / bashrc-git+virtualenv
Created September 30, 2014 19:17
Bash Prompt with git and virtualenv (2 lines)
case "$TERM" in
xterm*|screen)
# last command status ($?) shown as tick/cross and color
ok="\[\033[01;32m\]\342\234\223"
notok="\[\033[01;31m\]\342\234\227"
cmdresult="\$([[ \$? == 0 ]] && echo \"$ok\" || echo \"$notok\")"
# git current branch