https://wiki.archlinux.org/api.php?action=feedcontributions&user=Byronc&feedformat=atomArchWiki - User contributions [en]2024-03-29T07:24:39ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Udiskie&diff=119497Udiskie2010-10-20T02:26:45Z<p>Byronc: </p>
<hr />
<div>[[Category:Auto-mounting (English)]]<br />
<br />
== Introduction ==<br />
Udiskie is an automatic disk mounting service using [http://www.archlinux.org/packages/?q=udisks udisks]. It can be used for mounting CDs, flash drives, and other media. It is simple to use and requires no configuration.<br />
<br />
== Installation ==<br />
You can install Udiskie by using the [http://aur.archlinux.org/packages.php?ID=37279 udiskie] package that is found in the [[AUR]].<br />
<br />
Start the Udiskie service by adding<br />
<br />
udiskie &<br />
<br />
to your [[xinitrc]] file, before the [[window manager]] is loaded.<br />
<br />
Once Udiskie is running, all removable media will automatically be mounted under <code>/media</code> under a new directory that matches the device name.<br />
<br />
=== Permissions ===<br />
<br />
udiskie requires permission for the <code>org.freedesktop.udisks.filesystem-mount</code> action to be granted through PolicyKit. If you use a desktop manager that supports ConsoleKit this will be taken care of for you automatically. If you are not using a desktop manager that supports ConsoleKit, you'll need to grant the permission manually. This can be done by creating <code>10-udiskie.pkla</code> in <code>/etc/polkit-1/localauthority/50-local.d</code> with these contents:<br />
<br />
[udiskie]<br />
Identity=unix-group:storage<br />
Action=org.freedesktop.udisks.filesystem-mount<br />
ResultAny=yes<br />
<br />
This example configuration allows any member of the <code>storage</code> group to mount and unmount disks with udiskie.<br />
<br />
== Unmounting ==<br />
Use the <code>udiskie-umount</code> command to unmount media. For example, for a device named "MY_USB_DRIVE":<br />
<br />
udiskie-umount /media/MY_USB_DRIVE<br />
<br />
Or, you can unmount all media with the command:<br />
<br />
udiskie-umount -a<br />
<br />
== Window Manager Menu Scripts ==<br />
<br />
For convenience, you can add a script to the menu in some window managers to allow for easy access and control of removable media.<br />
<br />
=== Openbox ===<br />
<br />
''todo''<br />
<br />
=== Window Maker ===<br />
Create a "Generated Submenu" entry in the root menu.<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# For a Window Maker menu for removable media.<br />
#<br />
# This script will generate sub-menus for any device mounted<br />
# under /media. You can browse the device in a file manager or<br />
# unmount it.<br />
#<br />
# It will ignore the "cd", "dvd", and "fl" directories.<br />
#<br />
# It uses "emelFM2" file manager to browse the media.<br />
<br />
cd /media<br />
<br />
echo \"Media\" MENU<br />
<br />
for i in *<br />
do<br />
if [ "$i" != "cd" ] && [ "$i" != "dvd" ] && [ "$i" != "fl" ]<br />
then<br />
echo \"Browse $i\" EXEC \"emelfm2 -1 \'/media/$i\'\"<br />
fi<br />
done<br />
<br />
for i in *<br />
do<br />
if [ "$i" != "cd" ] && [ "$i" != "dvd" ] && [ "$i" != "fl" ]<br />
then<br />
echo \"Unmount $i\" EXEC \"udiskie-umount \'/media/$i\'\"<br />
fi<br />
done<br />
<br />
echo \"Eject Disc\" EXEC \"eject --traytoggle\"<br />
<br />
echo \"Media\" END<br />
</pre><br />
<br />
== Links ==<br />
* [http://bitbucket.org/byronclark/udiskie Udiskie Homepage]<br />
* [http://aur.archlinux.org/packages.php?ID=37279 Udiskie AUR package]</div>Byronchttps://wiki.archlinux.org/index.php?title=Samsung_NC10&diff=79501Samsung NC102009-10-19T19:44:02Z<p>Byronc: /* Common Issues */</p>
<hr />
<div>[[Category:Laptops (English)]]<br />
[[Category:Getting and installing Arch (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
=Introduction=<br />
This article aims on providing the informations on installing and setting up Arch Linux on the Samsung NC10.<br />
<br />
A lot of the information is derived from the [http://bbs.archlinux.org/viewtopic.php?id=58117 Arch Forum] and several hints scattered around in the ArchWiki.<br />
<br />
=Common Issues=<br />
<br />
* using KMS (as of xorg-video-intel 2.8.1), No brightness control with xbacklight. ([http://bbs.archlinux.org/viewtopic.php?id=74914 workaround with setpci], the issue might be solved with the next intel driver 2.9)<br />
* On kernel 2.6.29 :<br />
** webccam works perfectly.<br />
** All fn-keys can be binded, except fn-f4<br />
** suspend to ram and to disk work perfectly (without any quirks)<br />
** rfkill controls for bluetooth and Wifi don't work (but it's possible to write a script to do it and bind it to the propper key with xbindkeys)<br />
* On kernel 2.6.30 :<br />
** webcam stopped working correctly.<br />
** fastboot feature (not NC10 specific)<br />
* On kernel 2.6.31 :<br />
** webcam is working again<br />
** rfkill interface is working.<br />
<br />
=Installation=<br />
<br />
Use the usb image provided at the official download locations or the iso, if you have an external optical drive.<br />
You can use unetbootin to create in a esay way a boot device.<br />
If you use an usbkey, be aware that you (maybe) must format it in FAT32.<br />
<br />
=Configure your installation=<br />
<br />
==Network==<br />
<br />
Should work out-of-the-box now. WLAN uses the ath5k module and LAN, sky2.<br />
<br />
==Video==<br />
<br />
==Initial Brightness==<br />
The brightness can be set with the following command<br />
<br />
setpci -s 00:02.1 F4.B=FF<br />
<br />
<br />
Where FF is the highest level of brightness. That parameter moves in the range 00..FF. Don't set it too low because your backlight will turn off!<br />
<br />
==Graphics Adapter==<br />
The Video controller is a typical Intel chipset that works with the xf86-video-intel driver.<br />
<br />
To save some interrupts and therefore power you can disable dri in your xorg.conf. This disables 3D effects but if you don't need them this could be an option.<br />
Section "Device"<br />
Option "NoDRI"<br />
Identifier "Card0"<br />
Driver "intel"<br />
VendorName "Intel Corporation"<br />
BoardName "Mobile 945GME Express Integrated Graphics Controller"<br />
BusID "PCI:0:2:0"<br />
EndSection<br />
<br />
===External VGA===<br />
External VGA works out of the box with xrandr<br />
<br />
in order to prevent problems when switching to console or when unplugging the external monitor, make sure to specify the frequency along with the mode, for example :<br />
<br />
xrandr --output VGA --mode 1280x1024 --rate 60<br />
<br />
Dual head positioning works also perfectly : [[Xorg#Multi-monitor_setups]]<br />
<br />
==Audio==<br />
The audio device is an Intel HD. You will need to follow the instructions at [[ALSA#No_Sound_with_Onboard_Intel_Sound_Card]] to get output from the main speakers.<br />
<br />
Since alsa 1.0.19 distributed in archlinux extra repository, you don't need to manually install alsa driver. Everything is working out of the box: onboard microphone and speakers, audio off on earphone plugging.<br />
<br />
'''Troubleshooting :'''<br />
<br />
* If the volume is too low, or lower than in Windows run alsamixer, and set "front" to 100%.<br />
<br />
* If the microphone does not work, press F4 in alsamixer and play with the settings (boost to 0, digital and capture to mid-values, and input to front-mic should be a sane default).<br />
<br />
Note that settings can be saved with "alsactl store"<br />
<br />
* One user reported that he had to disable every snd module in his rc.conf except for two: snd_hda_intel and snd_pcm_oss.<br />
<br />
* [deprecated] if the speakers don't mute when you plug in headphones, you may need to compile alsa (i use v1.0.18a ,[ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.18a.tar.bz2 here]) <br />
<br />
Extract the tar.bz2 and open a console on alsa source folder<br />
<br />
1.execute this command : ./configure --with-cards=hda-intel --with-oss=yes --with-sequencer=yes<br />
2.execute this command : make<br />
3.execute this command : sudo make install<br />
4.get alsa-utils with pacman<br />
5.configure sound volume with alsamixer , reboot , and enjoy :)<br />
<br />
==Suspend and Hibernate==<br />
If you want to use Suspend to Ram using [[pm-utils]] you'll need the following command to resume properly:<br />
pm-suspend --quirk-vbestate-restore<br />
<br />
''Note:'' Pm-suspend should work correctly without any quirks at the moment.<br />
<br />
You can use this command not only to suspend from terminal but also in combination with [[acpid]]<br />
<br />
If after closing the lid your machine doesn't wake up from suspend correctly and needs to be resumed multiple times, you can try using the following workaround. This is an excerpt from /etc/acpid/handler.sh file:<br />
button/lid)<br />
if [ `/bin/awk '{print $2}' /proc/acpi/button/lid/LID0/state` = closed ]; then<br />
/usr/sbin/pm-suspend<br />
fi<br />
;;<br />
<br />
In contrast hibernate works without "modifications" (except the ones mentioned in the [[pm-utils|pm-utils article]]).<br />
<br />
If you are a kde4/kdemod user you can take advantage of powerdevil (included in kdemod-core/kdemod-kdebase-workspace since release 4.2). Screen brightness, cpu scaling, suspend and hibernate all work flawlessly, without any hack.<br />
<br />
Right after resume you may notice (i.e. in powertop) lost support for C2 and C4 CPU states. Don't panic. Those modes are likely to return in several minutes.<br />
<br />
==Fn Keys==<br />
You need at least kernel 2.6.28.4 to get the Fn keys to work correctly.<br />
<br />
(Volume Controls worked out of the box in kdemod 4.2)<br />
<br />
To bind the Fn keys to action, read [[Extra_Keyboard_Keys#The_quick_way]] and also [[Extra_Keyboard_Keys_in_Xorg#Using_your_Desktop_Environment_tools|Extra Keyboard Keys in Xorg]]. The suspend key (Fn+ESC) and disable touchpad (Fn+F10) keys should work out of the box. Note, that suspend key is handled in /etc/acpi/handler.sh (see "power/sleep" case entry). If you use pm-utils, you should substitute the default action with the call to pm-suspend or pm-hibernate.<br />
<br />
As an example, here is how to bind the keys for volume control :<br />
<br />
1) install ''xbindkeys'' (and ''xbacklight'' from package ''xorg-server-utils'' for brightness control):<br />
pacman -S xbindkeys xorg-server-utils<br />
<br />
2) crate a config file in your home directory :<br />
vi .xbindkeysrc<br />
<br />
3) with the following content :<br />
"amixer sset Master 2+ &"<br />
m:0x0 + c:176<br />
"amixer sset Master 2- &"<br />
m:0x0 + c:174<br />
#"amixer sset Master 0 &"<br />
"amixer sset Master toggle &"<br />
m:0x0 + c:160<br />
#"sudo pm-suspend"<br />
# m:0x0 + c:223<br />
"xbacklight +10"<br />
m:0x0 + c:233<br />
"xbacklight -10"<br />
m:0x0 + c:232<br />
For your NC10 Fn keysums may differ. If any Fn keys don't work with the above .xbindkeysrc, you should check the keysum values with<br />
xbindkeys -k<br />
<br />
4) run xbindkeys :<br />
xbindkeys<br />
and volume control should work within an X session !<br />
<br />
to add aditional bindings, you can get the codes of most of the Fn-keys with <br />
xbindkeys -k<br />
<br />
For the keys that are not recongnized, see <br />
dmesg |tail<br />
to make the kernel recognize them.<br />
<br />
(If your Screen is not bright enough, boot into Windows and set the Brightness to maximum)<br />
<br />
(you can adjust Brightness during the boot process without returning into Windows and you need to set maximun brightness on battery only mode)<br />
<br />
==Saving Power==<br />
Make sure to read [[Laptop#Suggestions_for_saving_power]]<br />
<br />
Here is a suggestion of things to add to /etc/rc.local to save some power, most of which are suggestions from "powertop".<br />
<br />
# /etc/rc.nc10: various init and power saving stuff for samsung nc10.<br />
# <br />
# avoid too many power up/down of hard drive, taken over by laptop-mode-tools anyway<br />
hdparm -B 255 /dev/sda<br />
<br />
# saves some power<br />
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs<br />
<br />
#disable bluetooth<br />
hciconfig hci0 down ; rmmod btusb<br />
<br />
# enables on-demand cpu freq scaling (requires cpufreq modules) :<br />
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor<br />
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor<br />
<br />
# autosuspend usb ****does this really work ????****<br />
echo "auto" > /sys/bus/usb/devices/2-2/power/level<br />
echo "auto" > /sys/bus/usb/devices/5-8/power/level<br />
echo 1 > /sys/bus/usb/devices/2-2/power/autosuspend<br />
echo 1 > /sys/bus/usb/devices/5-8/power/autosuspend<br />
<br />
### turn off wifi<br />
# ifconfig wmaster0 down<br />
# echo "wifi is shut down"<br />
<br />
## sound chip power save mode<br />
## => disabled because it makes some high frenquency noise...<br />
#echo 10 > /sys/module/snd_hda_intel/parameters/power_save<br />
<br />
Use laptop-mode-tools<br />
pacman -S laptop-mode-tools<br />
and configure it to suit your needs in /etc/laptop-mode/laptop-mode.conf<br />
Here again some suggestions :<br />
<br />
#turn off hard-drive after 10min on AC and 2min on battery (prevents freezes when accessing hd often)<br />
LM_AC_HD_IDLE_TIMEOUT_SECONDS=600<br />
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=120<br />
NOLM_HD_IDLE_TIMEOUT_SECONDS=1800<br />
<br />
CONTROL_HD_POWERMGMT=1<br />
<br />
# prevents too many parking of heads while still saving some power on battery.<br />
BATT_HD_POWERMGMT=254<br />
LM_AC_HD_POWERMGMT=255<br />
NOLM_AC_HD_POWERMGMT=255</div>Byronc