Linux Application Essay (3) Connect to WIFI under the named line and solve the problem of A card driver

Recently, Linux often fails to enter the graphical interface when booting, startx will be stuck, and reboot will also be stuck. Finally, it is found that the problem is the open source driver of ati, and the problem is solved by replacing it with the closed source driver of fglrx.
During this process, the graphics will not come out unless grub is set to nomodeset. So how to connect to WIFI under the command line?
vim /etc/wpa_supplicant/wpa_supplicant.conf writes the following:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
network={
    ssid="WIFI名称"
    psk="WIFI密码"
    priority=1
}

wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf After connecting, press Ctrl+Z to suspend
dhclient wlan0 to automatically obtain IP

In this way, there will be a network, and the next step is to download the fglrx-* driver, just apt-get install directly .
After installation, you need to generate the xorgl.conf file, use aticonfig –initial , so that startx can enter the graphical interface. However, sometimes we need to use two screens, then we should use:

aticonfig --initial=dual-head --screen-layout=right

In this way, the VGA screen will automatically expand after booting.
Here is a comparison with the ATI driver: the ati driver realizes dual-screen display through the xrandr –output VGA-0 –right-of LVDS command, while fglrx uses aticonfig to automatically generate the xorg.conf file. The content of xorg.conf is as follows:

Section "ServerLayout"
    Identifier     "aticonfig Layout"
    Screen      0  "aticonfig-Screen[0]-0" 0 0
    Screen         "aticonfig-Screen[0]-1" RightOf "aticonfig-Screen[0]-0"
    Option         "Xinerama" "on"
EndSection

Section "Module"
EndSection

Section "Monitor"
    Identifier   "aticonfig-Monitor[0]-0"
    Option      "VendorName" "ATI Proprietary Driver"
    Option      "ModelName" "Generic Autodetecting Monitor"
    Option      "DPMS" "true"
EndSection

Section "Monitor"
    Identifier   "aticonfig-Monitor[0]-1"
    Option      "VendorName" "ATI Proprietary Driver"
    Option      "ModelName" "Generic Autodetecting Monitor"
    Option      "DPMS" "true"
EndSection

Section "Device"
    Identifier  "aticonfig-Device[0]-0"
    Driver      "fglrx"
    BusID       "PCI:0:1:0"
EndSection

Section "Device"
    Identifier  "aticonfig-Device[0]-1"
    Driver      "fglrx"
    BusID       "PCI:0:1:0"
    Screen      1
EndSection

Section "Screen"
    Identifier "aticonfig-Screen[0]-0"
    Device     "aticonfig-Device[0]-0"
    Monitor    "aticonfig-Monitor[0]-0"
    DefaultDepth     24
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

Section "Screen"
    Identifier "aticonfig-Screen[0]-1"
    Device     "aticonfig-Device[0]-1"
    Monitor    "aticonfig-Monitor[0]-1"
    DefaultDepth     24
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

It should be noted that Option “Xinerama” and “on” in “ServerLayout” must be added by yourself, otherwise it is equivalent to opening another workspace, but you cannot drag the window into it.
When I install Debian, I only install the most basic system and do not choose utuntu. Although it will be more troublesome, it is worthwhile to be able to find out the reason when encountering problems.

Guess you like

Origin blog.csdn.net/CanvaChen/article/details/52708107
Recommended