Notebook screen & external monitor problem

This area is dedicated for New Users and Beginners to Lubuntu

Moderators: amjjawad, Rex Bouwense

Notebook screen & external monitor problem

Postby Alexandr Ushakov » Sat Oct 26, 2013 12:47 pm

Hello.

I use Lubuntu 13.10 64 bit on acer 7750zg notebook model, only intel graphics in use.

When Lubuntu starts, I couldnt expand app to work in full screen mod.
http://iceimg.com/ERdDIY_4/rabochij-sto ... vanija-001

OK, after every boot I launch LXRandR 0.1.2 and deactivate checkbox and press apply. "Save" button dont work.
http://iceimg.com/Vrq6NJRT/displeja-002.png

And now I can work with expanded to fullscreen apps.
http://iceimg.com/UFM9x-Bm/rabochij-sto ... vanija-003

Can somebody help to solve this problem?
Alexandr Ushakov
 
Posts: 9
Joined: Sat Oct 26, 2013 12:34 pm

Re: Notebook screen & external monitor problem

Postby Alexandr Ushakov » Sun Oct 27, 2013 2:59 pm

Developers, please, help me to fix this problem.
I hope in next Lubuntu release it will be fixed.
Alexandr Ushakov
 
Posts: 9
Joined: Sat Oct 26, 2013 12:34 pm

Re: Notebook screen & external monitor problem

Postby Rex Bouwense » Sun Oct 27, 2013 7:31 pm

Welcome to the LXDE forum. Unfortunately, the developers seldom visit this site so if you have a request you should see the second sticky announcement.

For PCManFM, post here:
http://sourceforge.net/tracker/?group_id=156956

For other parts of LXDE, post here:
http://sourceforge.net/tracker/?group_id=180858
Rex
Lubuntu 14.04 on an ASUS EeePC 1000H
Rex Bouwense
 
Posts: 748
Joined: Sat Aug 27, 2011 6:44 pm
Location: Sierra Vista, Arizona USA

Re: Notebook screen & external monitor problem

Postby infectedorganism » Tue Oct 29, 2013 4:59 am

I'm sure there are a few ways to solve this problem, but here is the method I am currently using. Essentially, you will be creating a script and editing your lightdm.conf file.

First, read this page: http://pycage.blogspot.com/2008/03/laptop-external-monitor-and-xrandr-to.html

With my setup, the output of
Code: Select all
xrandr -q
showed my laptop screen as LVSD1. Here is the script, edited from the page above to correspond to my laptop screen, LVDS1.
Code: Select all
#!/bin/bash

xrandr -q | grep "^VGA.* connected" >/dev/null
RC=$?
if [ $RC = 0 ]; then
  xrandr --output LVDS1 --off
fi


What I believe the code above is doing is checking whether or not your VGA external monitor is connected. If so, it will shut off your laptop screen and direct the output to your external monitor. If the external monitor isn't connected, the output will show on your laptop screen.

So, open your text editor, copy and paste that code into it -- changing the line
Code: Select all
xrandr --output LVDS1 --off
to correspond to your laptop screen (yours may be LVDS0, LVDS1 etc.)

Save the file as monitors.sh (or whatever you want). Place the file somewhere in your home directory (mine is in ~/scripts). Next, open your terminal and cd into the directory where you placed your script and fix the permissions of the file:
Code: Select all
chmod +x monitors.sh


While stil in your terminal, enter:
Code: Select all
sudo cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.old


Next, you will need to open lightdm.conf as root with your text editor:
Code: Select all
gksu leafpad /etc/lightdm/lightdm.conf


With lightdm.conf opened as root, enter this line somewhere under [SeatDefaults]:
Code: Select all
display-setup-script=/home/name/scripts/monitors.sh


What that line does is tells lightdm to exectue that script BEFORE the login screen appears. So, before your login screen appears, your laptop screen will shut off, the signal will be output to your external monitor, and the login screen will appear fullscreen on your external monitor.

For reference, here is my lightdm.conf:
Code: Select all
[SeatDefaults]
greeter-session=lightdm-gtk-greeter
user-session=Lubuntu
display-setup-script=/home/name/scripts/monitors.sh
allow-guest=false
greeter-hide-users=true


Next, save the file and restart your computer. If for some reason your computer hangs, showing a blinking cursor, restart your computer again (if that happens, something is wrong with the script) After you select Ubuntu on the grub menu and the computer is booting up, press Ctrl + Alt + F1. Doing this should take you to a command prompt. Once there, you may have to enter your usersname/password. Next, type:
Code: Select all
sudo cp /etc/lightdm/lightdm.conf.old /etc/lightdm/lightdm.conf
Hit enter and reboot.

What that will do is essentially restore your lightdm file, allowing you to boot normally.

Sorry for the messy post. Hopefully you will be able to read through it and solve your problem.
infectedorganism
 
Posts: 3
Joined: Tue Oct 29, 2013 3:42 am

Thanks

Postby Alexandr Ushakov » Wed Oct 30, 2013 10:14 am

Thank you, infectedorganism! Your reply had helped me to fix the problem!

P.S. "infectedorganism" - cool nickname. Sounds good.
P.S.S. Why developers and testers dont noticed this bug and dont fixed it?
Alexandr Ushakov
 
Posts: 9
Joined: Sat Oct 26, 2013 12:34 pm

Postby Alexandr Ushakov » Wed Oct 30, 2013 2:49 pm

But, when I disconnect monitor, I need to open terminal and copy config backup. :(
So, it's not complex solution of problem.

Maybe, there is way to add condition (execute, when minitor is connected"?
Alexandr Ushakov
 
Posts: 9
Joined: Sat Oct 26, 2013 12:34 pm

Re: Notebook screen & external monitor problem

Postby infectedorganism » Wed Oct 30, 2013 6:57 pm

I will try to find a solution, but I am a 'beginner' of sorts so hopefully we can find something to get things working for you.

Another solution MIGHT be to add your preferred LXRandr settings to your ~/.config/lxsession/lubuntu/autostart file. Whenever you change your monitor settings and click save, those settings are saved at ~/.config/autostart/lxrandr-autostart.desktop.

Open that file and look at the line starting with Exec=

Copy/paste the line after the =, and place it in the ~/.config/lxsession/lubuntu/autostart file. Example:
Code: Select all
@xrandr --output VGA1 --mode 1920x1080 --rate 60.0 --output LVDS1 --off


Maybe this is a workaround to give you the expected behavior until we can figure out another solution.

Note, this is untested by me, but because that line is expected to autostart due to you saving your configuration within LXRandr, it should give you the expected behavior.

I haven't been able to get anything in ~/.config/autostart to actually autostart which is why saving my configuration from LXRandr never worked for me, and maybe why it has never worked for you. I think that is due to the new lxsession-default-apps that came bundled with 13.10.
infectedorganism
 
Posts: 3
Joined: Tue Oct 29, 2013 3:42 am

Re: Notebook screen & external monitor problem

Postby infectedorganism » Wed Oct 30, 2013 7:09 pm

Or, you could try to modify the script you created, removing everything and replacing it with the line found in your lxrandr-autostart.desktop file.

Again, untested by me but I am just trying to give you some possible workarounds.
infectedorganism
 
Posts: 3
Joined: Tue Oct 29, 2013 3:42 am

Re: Notebook screen & external monitor problem

Postby Alexandr Ushakov » Thu Oct 31, 2013 7:24 pm

Thanks for your reply.
infectedorganism wrote:Copy/paste the line after the =, and place it in the ~/.config/lxsession/lubuntu/autostart file. Example:
Code: Select all
    @xrandr --output VGA1 --mode 1920x1080 --rate 60.0 --output LVDS1 --off



Excuse me, but I dont understand, what actions you offer to do.
I should edit .config/lxsession/lubuntu/autostart?

And if it possible, how to edit already added line in config to achieve the desired result?
Alexandr Ushakov
 
Posts: 9
Joined: Sat Oct 26, 2013 12:34 pm


Return to Beginners

Who is online

Users browsing this forum: No registered users and 1 guest