📜 ⬆️ ⬇️

installing Ubuntu on Sony SZ laptops

A year ago I bought a sony sz370 laptop, which is quite Linux-compatible. I put different versions of ubuntu, as a result, I stopped at version 8.04, which seemed to me the most optimal file for stability and doping. And so start from scratch.


I installed the system with an activated intel card (stamina position).
After successful installation and loading of the new system, you should update the entire system by first adding several repositories to /etc/apt/sources.list:

sudo gedit /etc/apt/sources.list
and add the lines:
deb archive.ubuntu.org.cn/ubuntu-cn hardy main restricted universe multiverse #Ubuntu Chinese Repository
deb deb.opera.com/opera lenny non-free #Opera
deb download.skype.com/linux/repos/debian stable non-free #Skype
deb dl.google.com/linux/deb stable non-free #Google
deb ppa.launchpad.net/lidaobing/ubuntu hardy main #Chmsee
deb ppa.launchpad.net/tualatrix/ubuntu hardy main #Ubuntu Tweak
deb wine.budgetdedicated.com/apt hardy main #Wine
deb download.virtualbox.org/virtualbox/debian hardy non-free #VirtualBox
deb packages.medibuntu.org hardy free non-free #Medibuntu
deb ppa.launchpad.net/smakc/ubuntu hardy main #Qutim
deb gq.net.ru/ubuntu hardy xneur #Xneur
deb download.tuxfamily.org/arakhne/ubuntu hardy-arakhne universe #Webcam
deb download.tuxfamily.org/blueman hardy blueman #Blueman
deb ppa.launchpad.net/network-manager/ubuntu hardy main #Network Manager
deb archive.infralinux.org/infralinux hardy main
deb archive.infralinux.org/infralinux hardy-security main
deb archive.infralinux.org/infralinux hardy-updates main


back in the synaptic (System-> Adminitration-> Package Manager Synaptic-> Settings-> Repositories) it is necessary to check all standard repositories. I think this problem should not arise. Now we are ready for a complete system upgrade.
')
sudo apt-get upgrade

For the new kernel (2.6.24-23) to take effect, it is necessary to overload the system. So, we have a fresh system with the latest updates for today. The camera does not work out of the box, there is no wi-fi indicator, a memorystick reader (the one on the left), WWAN.

Let's start with the camera. In the arakhne repository, there are still no modules for the last kernel, but it’s not at all difficult to assemble them yourself:

wget download.tuxfamily.org/arakhne/pool/r/ricoh-webcam-r5u870/ricoh-webcam-r5u870_0.11.1-1arakhne1.tar.gz
tar
tar xvfz ricoh-webcam-r5u870_0.11.1-1arakhne1.tar.gz
cd ricoh-webcam-r5u870-0.11.1/
sudo ./buildpackage
cd ..
sudo dpkg -i ricoh*.deb


The camera can be checked in the same skype.

now let's deal with the card reader, again open the console:
svn co -r155 svn.berlios.de/svnroot/repos/tifmxx/trunk/driver
cd driver/
wget www.sw83.de/misc/tifm_ms.patch
patch -p0 < tifm_ms.patch
make
sudo make install

Now we have modules for the card reader.

let's deal with the built-in GPRS-modem now:
for sony laptops, I only needed one kernel module, and when I boot the system, the old sonypi is loaded, which is not required, especially since the new sony-laptop is already included in the kernel (it seems, just from 2.6.24) and successfully copes with its responsibilities. So:

sudo gedit /etc/init.d/hotkey-setup
and comment on the line
modprobe sonypi; # Needed to get hotkey events
now running commands
sudo su
echo 1 > /sys/devices/platform/sony-laptop/wwanpower

You can see that the WWAN indicator has turned on, but it still needs to be initialized at each boot.
Typing
sudo gedit /etc/modules
and add a line to the end of the file
sony-laptop
usbserial vendor=0xfce product=0xd019


make a symbolic link so that it is hooked by gnome-ppp:
sudo ln -s /dev/ttyUSB0 /dev/modem
Now the final steps:
sudo gedit /etc/udev/rules.d/60-symlinks.rules
and add udev-rule to the end of the file:
#Sony Ericsson EGPRS Radio initialization
BUS=="usb", SYSFS{idVendor}=="0fce", SYSFS{idProduct}=="d019", RUN+="/etc/udev/scripts/gprs_modem_setup.sh /dev/%k"

and create a handler file for this rule:
sudo gedit /etc/udev/scripts/gprs_modem_setup.sh
and write to it:
#!/bin/bash
echo $1;
/bin/echo -en "AT+CFUN=1,1\r\n" > $1
#/bin/echo -en "AT+CPIN=pin_code\r\n" > $1

If we have a PIN installed on the SIM card, the last line must be uncommented.
Making our file executable:
sudo chmod a+x /etc/udev/scripts/gprs_modem_setup.sh

Despite the fact that WWAN starts and works, sometimes the system hangs tight when I initialize it, I can not understand what the problem is.

It now remains to deal with the switch graphics. The laptop is equipped with two cards: intel 945 and nvidia 7400go and in order for them to start up normally, we need to determine which card is present in the system at the boot stage. First, install the modules for the nvidia card:
sudo apt-get install nvidia-glx-new

I spent a lot of time with cards. In the end, I’ll just bring configs for them.
xorg.conf.intel and xorg.conf.nvidia

these files just need to be copied to / etc / X11 /

And now the magic file for defining the card:
sudo gedit /etc/init.d/vaio
we write to it:
#!/bin/bash
VIDEO=`/usr/bin/lspci |grep -c nVidia`

if [ "$VIDEO" = 1 ]; then
ln -sf /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf
ln -sf /usr/lib/libGL.so.1.nvidia /usr/lib/libGL.so.1
ln -sf /usr/lib/xorg/modules/extensions/libglx.so.nvidia /usr/lib/xorg/modules/extensions/libglx.so
else
ln -sf /etc/X11/xorg.conf.intel /etc/X11/xorg.conf
ln -sf /usr/lib/libGL.so.1.mesa /usr/lib/libGL.so.1
ln -sf /usr/lib/xorg/modules/extensions/libglx.so.mesa /usr/lib/xorg/modules/extensions/libglx.so
fi

#SymLink at boot
ln -sf /dev/ttyUSB0 /dev/modem

#Turn BT Off
/usr/bin/spicctrl -l 0

#Sony devices permissions
chown %username% /sys/devices/platform/sony-laptop/*


Now the final steps that will help run the compise on both cards:
sudo chmod +x /etc/init.d/vaio
sudo ln -sf /etc/init.d/vaio /etc/rc2.d/S12vaio
sudo ln -sf /usr/lib/libGL.so.1 /usr/lib/libGL.so
sudo ln -sf /usr/lib/nvidia/libGL.so.1.2.xlibmesa /usr/lib/libGL.so.1.mesa
sudo ln -sf /usr/lib/libGL.so.169.12 /usr/lib/libGL.so.1.nvidia
sudo ln -sf /usr/lib/nvidia/libglx.so.xserver-xorg-core /usr/lib/xorg/modules/extensions/libglx.so.mesa
sudo ln -sf /usr/lib/xorg/modules/extensions/libglx.so.169.12 /usr/lib/xorg/modules/extensions/libglx.so.nvidia


and another optimization can be done for the intel card by adding to the end of the / etc / environment file
INTEL_BATCH="1"
compare the output of glxgears with this command and without))

do not judge strictly, my first post on the Habré, so there is not enough karma to move the topic to the ubuntarium, where he and the place ...

Source: https://habr.com/ru/post/47776/


All Articles