IgorS

Members
  • Content Count

    56
  • Joined

  • Last visited


Reputation Activity

  1. Like
    IgorS got a reaction from VyacheslavS in Real time clock DS3231   
    I have seen many tutorials about connecting real time clock hardware on Orange Pi and Raspberry Pi.
    What i didn't like was removing of fake-hwclock service, because I want that RTC works when it is connected, and fake-hwclock when RTC is not connected.
    Therefore, I changed /sbin/fake-hwclock script to work in this way.
     
    So, here is how to do this, tested on OrangePi+2E, Armbian Ubuntu legacy kernel:
    Purchase cheap DS3231 module on eBay (cca. $1) like this one:
    http://www.ebay.com/itm/DS3231-AT24C32-IIC-Modul-High-Precision-Real-Time-Clock-Module-Arduino-New-/292041844936?hash=item43ff0ce8c8:g:d80AAOSwdGFYtsFP
    Put battery in module.
    Shutdown and powerof OPi and connect module:
    Orange (i2c0 bus) RTC module (DS3231 RTC + 24C32 eeprom) 1 3.3V 2 VCC 3 PA12 (TWI0_SDA/DI_RX/PA_EINT12) 3 SDA 5 PA11 (TWI0_SCK/DI_TX/PA_EINT11) 4 SCL 9 GND 1 GND Power up OPi
    Install i2c-tools.
    sudo apt install i2c-tools Type command:
    i2cdetect -y 0 You should see:
    0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- This means that module is connected properly and that we have DS3231 on address 0x68 and eeprom 24C32 on address 0x57.
    Type:
    sudo echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device i2cdetect -y 0 You should see:
    0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- This means that system is now using our RTC. Also, now should exist new device /dev/rtc1
    Be sure that your system time is right, and type:
    sudo hwclock -w -f /dev/rtc1 Now our RTC must have right time. Check with:
    sudo hwclock -r -f /dev/rtc1 If everithing was ok, copy /sbin/fake-hwclock to bacup (just in case)
    sudo cp ~/programming/sh/fake_hwclock/sbin/fake-hwclock /sbin/fake-hwclock Edit /sbin/fake-hwclock and place this code in it:
    Reboot.
    Now you should have right system time backed up by RTC.
     
  2. Like
    IgorS got a reaction from Werner in Mainline kernel DRM problems on OrangePi   
    Finally good news!
    Today (2020-07-14) for ubuntu bionic becomes available mesa update, following packages:
    libegl-mesa0 libegl1-mesa libgbm1 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglx-mesa0 mesa-va-drivers mesa-vdpau-drivers
     
    After that, xfce desktop on orangepi2e starts to work flawlessly with kernel 5.4.xx (in my case 5.4.51) again.
    Exact versions of packages:
    igor@orangepiplus2e:~/trash/mesa$ dpkg -l | grep 'mesa\|libgbm1' ii libegl-mesa0:armhf 20.0.8-0ubuntu1~18.04.1 armhf free implementation of the EGL API -- Mesa vendor library ii libegl1-mesa:armhf 20.0.8-0ubuntu1~18.04.1 armhf transitional dummy package ii libgbm1:armhf 20.0.8-0ubuntu1~18.04.1 armhf generic buffer management API -- runtime ii libgl1-mesa-dri:armhf 20.0.8-0ubuntu1~18.04.1 armhf free implementation of the OpenGL API -- DRI modules ii libgl1-mesa-glx:armhf 20.0.8-0ubuntu1~18.04.1 armhf transitional dummy package ii libglapi-mesa:armhf 20.0.8-0ubuntu1~18.04.1 armhf free implementation of the GL API -- shared library ii libglx-mesa0:armhf 20.0.8-0ubuntu1~18.04.1 armhf free implementation of the OpenGL API -- GLX vendor library ii mesa-utils 8.4.0-1 armhf Miscellaneous Mesa GL utilities ii mesa-va-drivers:armhf 20.0.8-0ubuntu1~18.04.1 armhf Mesa VA-API video acceleration drivers ii mesa-vdpau-drivers:armhf 20.0.8-0ubuntu1~18.04.1 armhf Mesa VDPAU video acceleration drivers  
  3. Like
    IgorS got a reaction from NicoD in Ubuntu desktop with LXDM display manager XFCE4, Mate, LXDE and OpenBox desktops   
    If you don't like autologin in Armbian Ubuntu desktop, or if yo want to have several desktops to choose, here is how I did this.
    Tested on legacy image, but I belive that same setup should work on mainline too.
     
    1. Install ubuntu desktop image on MMC (I did it using Etcher)
    2. Install display manager. Because of simplicity, I choose LXDM.
       sudo apt-get install lxdm
       
    3. Set default session and disable nodm
       Edit /etc/lxdm/lxdm.conf
       Find line:
         session=/usr/bin/startlxde
       Replace it with:
         session=/usr/bin/startxfce4
         
       Fix for XFCE session entry from LXDM session menu:
         Open the /usr/share/xsessions/xfce.desktop file with a text editor.
         Find the name value and replace the space with a dash or hyphen.
         
       Disable nodm:
         sudo systemctl disable nodm
     
    4. Reboot.
       
    Now you should have login screen, and after login you should have XFCE4 desktop running.
     
    Optionally, you can install more desktops:
     
    MATE
    sudo apt-get install mate-desktop-environment-extras indicator-application atril desktop-base engrampa mate-applets mate-media mate-notification-daemon mate-power-manager mate-screensaver mate-system-monitor mate-themes caja-gksu caja-image-converter caja-open-terminal caja-sendto caja-share caja-wallpaper dconf-editor mate-gnome-main-menu-applet mate-netspeed mate-sensors-applet mate-user-share
     
    LXDE
    apt-get install lxde lxde-common lxsession lxsession-logout lxlauncher
     
    If you did all of this, you can choose to login in XFCE4, Mate, LXDE or OpenBox desktop.
    Best regards! 
     
  4. Like
    IgorS got a reaction from JrRockeTer in Ubuntu desktop with LXDM display manager XFCE4, Mate, LXDE and OpenBox desktops   
    If you don't like autologin in Armbian Ubuntu desktop, or if yo want to have several desktops to choose, here is how I did this.
    Tested on legacy image, but I belive that same setup should work on mainline too.
     
    1. Install ubuntu desktop image on MMC (I did it using Etcher)
    2. Install display manager. Because of simplicity, I choose LXDM.
       sudo apt-get install lxdm
       
    3. Set default session and disable nodm
       Edit /etc/lxdm/lxdm.conf
       Find line:
         session=/usr/bin/startlxde
       Replace it with:
         session=/usr/bin/startxfce4
         
       Fix for XFCE session entry from LXDM session menu:
         Open the /usr/share/xsessions/xfce.desktop file with a text editor.
         Find the name value and replace the space with a dash or hyphen.
         
       Disable nodm:
         sudo systemctl disable nodm
     
    4. Reboot.
       
    Now you should have login screen, and after login you should have XFCE4 desktop running.
     
    Optionally, you can install more desktops:
     
    MATE
    sudo apt-get install mate-desktop-environment-extras indicator-application atril desktop-base engrampa mate-applets mate-media mate-notification-daemon mate-power-manager mate-screensaver mate-system-monitor mate-themes caja-gksu caja-image-converter caja-open-terminal caja-sendto caja-share caja-wallpaper dconf-editor mate-gnome-main-menu-applet mate-netspeed mate-sensors-applet mate-user-share
     
    LXDE
    apt-get install lxde lxde-common lxsession lxsession-logout lxlauncher
     
    If you did all of this, you can choose to login in XFCE4, Mate, LXDE or OpenBox desktop.
    Best regards! 
     
  5. Like
    IgorS got a reaction from perfstr in 256 tty devices are being created at boot   
    Useful. Thanks!
  6. Like
    IgorS got a reaction from 062621AM in Real time clock DS3231   
    I have seen many tutorials about connecting real time clock hardware on Orange Pi and Raspberry Pi.
    What i didn't like was removing of fake-hwclock service, because I want that RTC works when it is connected, and fake-hwclock when RTC is not connected.
    Therefore, I changed /sbin/fake-hwclock script to work in this way.
     
    So, here is how to do this, tested on OrangePi+2E, Armbian Ubuntu legacy kernel:
    Purchase cheap DS3231 module on eBay (cca. $1) like this one:
    http://www.ebay.com/itm/DS3231-AT24C32-IIC-Modul-High-Precision-Real-Time-Clock-Module-Arduino-New-/292041844936?hash=item43ff0ce8c8:g:d80AAOSwdGFYtsFP
    Put battery in module.
    Shutdown and powerof OPi and connect module:
    Orange (i2c0 bus) RTC module (DS3231 RTC + 24C32 eeprom) 1 3.3V 2 VCC 3 PA12 (TWI0_SDA/DI_RX/PA_EINT12) 3 SDA 5 PA11 (TWI0_SCK/DI_TX/PA_EINT11) 4 SCL 9 GND 1 GND Power up OPi
    Install i2c-tools.
    sudo apt install i2c-tools Type command:
    i2cdetect -y 0 You should see:
    0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- This means that module is connected properly and that we have DS3231 on address 0x68 and eeprom 24C32 on address 0x57.
    Type:
    sudo echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device i2cdetect -y 0 You should see:
    0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- This means that system is now using our RTC. Also, now should exist new device /dev/rtc1
    Be sure that your system time is right, and type:
    sudo hwclock -w -f /dev/rtc1 Now our RTC must have right time. Check with:
    sudo hwclock -r -f /dev/rtc1 If everithing was ok, copy /sbin/fake-hwclock to bacup (just in case)
    sudo cp ~/programming/sh/fake_hwclock/sbin/fake-hwclock /sbin/fake-hwclock Edit /sbin/fake-hwclock and place this code in it:
    Reboot.
    Now you should have right system time backed up by RTC.
     
  7. Like
    IgorS got a reaction from guidol in Real time clock DS3231   
    I have seen many tutorials about connecting real time clock hardware on Orange Pi and Raspberry Pi.
    What i didn't like was removing of fake-hwclock service, because I want that RTC works when it is connected, and fake-hwclock when RTC is not connected.
    Therefore, I changed /sbin/fake-hwclock script to work in this way.
     
    So, here is how to do this, tested on OrangePi+2E, Armbian Ubuntu legacy kernel:
    Purchase cheap DS3231 module on eBay (cca. $1) like this one:
    http://www.ebay.com/itm/DS3231-AT24C32-IIC-Modul-High-Precision-Real-Time-Clock-Module-Arduino-New-/292041844936?hash=item43ff0ce8c8:g:d80AAOSwdGFYtsFP
    Put battery in module.
    Shutdown and powerof OPi and connect module:
    Orange (i2c0 bus) RTC module (DS3231 RTC + 24C32 eeprom) 1 3.3V 2 VCC 3 PA12 (TWI0_SDA/DI_RX/PA_EINT12) 3 SDA 5 PA11 (TWI0_SCK/DI_TX/PA_EINT11) 4 SCL 9 GND 1 GND Power up OPi
    Install i2c-tools.
    sudo apt install i2c-tools Type command:
    i2cdetect -y 0 You should see:
    0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- This means that module is connected properly and that we have DS3231 on address 0x68 and eeprom 24C32 on address 0x57.
    Type:
    sudo echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device i2cdetect -y 0 You should see:
    0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- This means that system is now using our RTC. Also, now should exist new device /dev/rtc1
    Be sure that your system time is right, and type:
    sudo hwclock -w -f /dev/rtc1 Now our RTC must have right time. Check with:
    sudo hwclock -r -f /dev/rtc1 If everithing was ok, copy /sbin/fake-hwclock to bacup (just in case)
    sudo cp ~/programming/sh/fake_hwclock/sbin/fake-hwclock /sbin/fake-hwclock Edit /sbin/fake-hwclock and place this code in it:
    Reboot.
    Now you should have right system time backed up by RTC.
     
  8. Like
    IgorS got a reaction from Nick Xiao in Ubuntu desktop with LXDM display manager XFCE4, Mate, LXDE and OpenBox desktops   
    If you don't like autologin in Armbian Ubuntu desktop, or if yo want to have several desktops to choose, here is how I did this.
    Tested on legacy image, but I belive that same setup should work on mainline too.
     
    1. Install ubuntu desktop image on MMC (I did it using Etcher)
    2. Install display manager. Because of simplicity, I choose LXDM.
       sudo apt-get install lxdm
       
    3. Set default session and disable nodm
       Edit /etc/lxdm/lxdm.conf
       Find line:
         session=/usr/bin/startlxde
       Replace it with:
         session=/usr/bin/startxfce4
         
       Fix for XFCE session entry from LXDM session menu:
         Open the /usr/share/xsessions/xfce.desktop file with a text editor.
         Find the name value and replace the space with a dash or hyphen.
         
       Disable nodm:
         sudo systemctl disable nodm
     
    4. Reboot.
       
    Now you should have login screen, and after login you should have XFCE4 desktop running.
     
    Optionally, you can install more desktops:
     
    MATE
    sudo apt-get install mate-desktop-environment-extras indicator-application atril desktop-base engrampa mate-applets mate-media mate-notification-daemon mate-power-manager mate-screensaver mate-system-monitor mate-themes caja-gksu caja-image-converter caja-open-terminal caja-sendto caja-share caja-wallpaper dconf-editor mate-gnome-main-menu-applet mate-netspeed mate-sensors-applet mate-user-share
     
    LXDE
    apt-get install lxde lxde-common lxsession lxsession-logout lxlauncher
     
    If you did all of this, you can choose to login in XFCE4, Mate, LXDE or OpenBox desktop.
    Best regards! 
     
  9. Like
    IgorS got a reaction from IgZero in Real time clock DS3231   
    I have seen many tutorials about connecting real time clock hardware on Orange Pi and Raspberry Pi.
    What i didn't like was removing of fake-hwclock service, because I want that RTC works when it is connected, and fake-hwclock when RTC is not connected.
    Therefore, I changed /sbin/fake-hwclock script to work in this way.
     
    So, here is how to do this, tested on OrangePi+2E, Armbian Ubuntu legacy kernel:
    Purchase cheap DS3231 module on eBay (cca. $1) like this one:
    http://www.ebay.com/itm/DS3231-AT24C32-IIC-Modul-High-Precision-Real-Time-Clock-Module-Arduino-New-/292041844936?hash=item43ff0ce8c8:g:d80AAOSwdGFYtsFP
    Put battery in module.
    Shutdown and powerof OPi and connect module:
    Orange (i2c0 bus) RTC module (DS3231 RTC + 24C32 eeprom) 1 3.3V 2 VCC 3 PA12 (TWI0_SDA/DI_RX/PA_EINT12) 3 SDA 5 PA11 (TWI0_SCK/DI_TX/PA_EINT11) 4 SCL 9 GND 1 GND Power up OPi
    Install i2c-tools.
    sudo apt install i2c-tools Type command:
    i2cdetect -y 0 You should see:
    0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- This means that module is connected properly and that we have DS3231 on address 0x68 and eeprom 24C32 on address 0x57.
    Type:
    sudo echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device i2cdetect -y 0 You should see:
    0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- This means that system is now using our RTC. Also, now should exist new device /dev/rtc1
    Be sure that your system time is right, and type:
    sudo hwclock -w -f /dev/rtc1 Now our RTC must have right time. Check with:
    sudo hwclock -r -f /dev/rtc1 If everithing was ok, copy /sbin/fake-hwclock to bacup (just in case)
    sudo cp ~/programming/sh/fake_hwclock/sbin/fake-hwclock /sbin/fake-hwclock Edit /sbin/fake-hwclock and place this code in it:
    Reboot.
    Now you should have right system time backed up by RTC.
     
  10. Like
    IgorS got a reaction from Igor in OrangePi plus 2E mainline kernel   
    Putting setenv with working configuration followed with saveenv in the beginning of the boot script really works. It just need two reboots after update.
    So, from my point of view... problem solved.
    Thanks all for help, especially to Igor.
     
  11. Like
    IgorS got a reaction from Igor in OrangePi plus 2E mainline kernel   
    Yeees, finally did it. Sucessfully set resolution to 1024x768-24.
    Now I'm going to find more appropriate resolution.
    Thank you Igor very much, I almost gave up. 
  12. Like
    IgorS reacted to Igor in OrangePi plus 2E mainline kernel   
    Yes. Mainline kernel is still in development and come without end user support. Currently there are problems with screen detection / video driver. It used to work fine, but currently it's just broken ... dunno why exactly, but AFAIK @jernej is working on this.  "tomorrow" this will be fixed and some other problem might jump out but we are getting close. For certain scenarios is o.k. for some time. 
     
    Even with fixed video, there are other limitations on new kernel - no video or 3D acceleration.