#StackBounty: #linux #debian #apt #dependencies How to fix this apt mess?

Bounty: 100

I’m using PureOS, which is basically Debian with some small tweaks. I tried installing firefox on it, but ended with a complete mess. If I now try to do a basic upgrade, I get this:

$ sudo apt update && sudo apt upgrade
Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]              
Get:3 http://deb.opera.com/opera stable InRelease [2592 B]                          
Get:4 http://security.debian.org stretch/updates InRelease [63.0 kB]                
Hit:5 http://deb.debian.org/debian stretch Release                                  
Get:6 https://repo.skype.com/deb stable InRelease [4486 B]                          
Get:7 http://deb.opera.com/opera stable/non-free amd64 Packages [1835 B]            
Get:8 http://packages.microsoft.com/repos/vscode stable InRelease [2801 B]          
Get:9 http://repository.spotify.com stable InRelease [3302 B]                       
Get:10 http://repo.puri.sm/pureos green InRelease [9427 B]                          
Get:12 http://security.debian.org stretch/updates/main Sources [110 kB]             
Get:13 http://security.debian.org stretch/updates/contrib Sources [1384 B]          
Get:14 http://security.debian.org stretch/updates/main amd64 Packages [271 kB]      
Get:15 https://repo.skype.com/deb stable/main amd64 Packages [2251 B]               
Get:16 http://security.debian.org stretch/updates/main Translation-en [120 kB]      
Get:17 http://security.debian.org stretch/updates/contrib amd64 Packages [1776 B]   
Get:18 http://security.debian.org stretch/updates/contrib Translation-en [1759 B]   
Get:19 https://download.sublimetext.com apt/stable/ InRelease [2562 B]              
Get:20 http://packages.microsoft.com/repos/vscode stable/main amd64 Packages [39.6 kB]
Ign:21 https://mega.nz/linux/MEGAsync/Debian_9.0 ./ InRelease                       
Get:22 http://repo.puri.sm/pureos green/main amd64 Packages [6286 kB]               
Get:23 https://mega.nz/linux/MEGAsync/Debian_9.0 ./ Release [976 B]                 
Get:26 http://repo.puri.sm/pureos green/main Translation-en [5583 kB]               
Hit:24 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease      
Get:27 http://repo.puri.sm/pureos green/main amd64 DEP-11 Metadata [2202 kB]        
Get:28 http://repo.puri.sm/pureos green/main DEP-11 64x64 Icons [6768 kB]
Fetched 21.6 MB in 4s (5487 kB/s)                                     
Reading package lists... Done
Building dependency tree       
Reading state information... Done
59 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 iceweasel : Depends: firefox-esr but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

So I tried to suggestion:

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  firefox-esr
Suggested packages:
  fonts-stix | otf-stix fonts-lmodern mozplugger
The following NEW packages will be installed:
  firefox-esr
0 upgraded, 1 newly installed, 0 to remove and 59 not upgraded.
2 not fully installed or removed.
Need to get 0 B/46.5 MB of archives.
After this operation, 114 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 227765 files and directories currently installed.)
Preparing to unpack .../firefox-esr_52.6.0esr-1~deb9u1_amd64.deb ...
dpkg-divert: error: 'diversion of /usr/bin/firefox to /usr/bin/firefox.real by firefox-esr' clashes with 'diversion of /usr/bin/firefox to /usr/bin/firefox.real by purebrowser'
dpkg: error processing archive /var/cache/apt/archives/firefox-esr_52.6.0esr-1~deb9u1_amd64.deb (--unpack):
 new firefox-esr package pre-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/firefox-esr_52.6.0esr-1~deb9u1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

And now I’m kinda stuck.

Does anybody know what I can do to clean this mess? All tips are welcome!

[EDIT]

I’ve tried to remove firefox in many ways:

$ sudo apt -y remove firefox
[sudo] password for hielke: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'firefox' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 iceweasel : Depends: firefox-esr but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I’ve also tried the following variations, but all gave similar results:

sudo apt purge firefox
sudo apt purge firefox-esr
sudo apt purge iceweasel
sudo apt purge purebrowser


Get this bounty!!!

#StackBounty: #debian #power-management #suspend #crash #intel-graphics Sony docking station crashes GUI on unsuspend

Bounty: 100

I have a Sony Vaio (2012) SVS13a with a full docking station which the notebook clips into. I run Debian Testing and have the latest updates installed as of writing this question.

When I have the notebook in the docking station and I suspend, most of the time when I un-suspend my windows manager crashes and I’m faced with the login screen (lightdm) again. I’ve tried different windows managers (XFCE4 & EXWM) and the same thing happens in both.

When the issue happens the Windows Manager doesn’t crash straight away, I’m presented with a black screen then when I change over to VT1 and back to VT7, then it crashes and I’m redirected to the lightdm screen.

I find this in my dmesg after;

[180410.346999] [drm:intel_display_resume [i915]] *ERROR* Restoring old state failed with -22

It didn’t used to happen, although I’ve always had some issues in the docking station. Sometimes the external screen wouldn’t come on, but it would never crash. It’s only been like this in the last few months.

If I run the external screen, keyboard & mouse directly not using the docking station then I can suspend and un-suspend without a problem. I did this for two weeks over the summer break. So the problem is definitely to do with the docking station.


Get this bounty!!!

#StackBounty: #debian #ubuntu #ssh #security #repository How to prevent Brute force attacks in Debian systems without fail2ban or CSF-L…

Bounty: 50

How to prevent Brute force attacks in Debian systems without fail2ban or CSF-LFD?

The closest and fastest way I know is ConfigServer’s CSF-LFD but it’s not in the repositories and if I’m going to use a utility I would most prefer something in the repositories (it seems I cannot create a Debian/Ubuntu repository for it because of licensing/legal reasons).

Another solution than CSF-LFD is Fail2ban but it seems to me that the Fail2ban configuration requires firm knowledge in IPS software architecture as well as deep knowledge of Perl compatible regex (PCRE), which both I currently lack (I have some basic PCRE knowledge but not as deep as I think one needs for Fail2ban). It doesn’t seem straight forward as CSF-LFD to me.

Thus I wonder if there is a “smoother” way, maybe manually via IP tables, maybe via some utility I could install directly from the Debian/Ubuntu repositories that could prevent BFAs besides the issue of using SSH keys.


Get this bounty!!!

#StackBounty: #debian #performance #mdadm #io #raid6 RAID6 resync with fast writes but slow reads

Bounty: 100

I’m using Debian Jessie.

# uname -a
Linux host 4.9.0-0.bpo.3-amd64 #1 SMP Debian 4.9.30-2+deb9u5~bpo8+1 (2017-09-28) x86_64 GNU/Linux

And have setup a RAID6.

# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid1]
md0 : active raid6 sda[0] sdd[3] sdc[2] sdb[1]
      19532611584 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/4] [UUUU]
      bitmap: 1/73 pages [4KB], 65536KB chunk

This are 4x Seagate Enterprise 10TB 7200rpm. When copying a large file from RAID array to internal system disk (which is a SSD) I get an average throughput of 220MB/s. Copying large files from SSD to array is done with 145MB/s.
When the monthly RAID check is done (started by cron job execution checkarray --cron --all --idle --quiet which is the default behaviour) I can see

# cat /proc/mdstat                                                                                                                                                 Personalities : [raid6] [raid5] [raid4] [raid1]
md0 : active raid6 sda[0] sdd[3] sdc[2] sdb[1]
      19532611584 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/4] [UUUU]
      [>....................]  check =  0.7% (72485728/9766305792) finish=817.2min speed=197694K/sec
      bitmap: 1/73 pages [4KB], 65536KB chunk

So resync speed is great also. Now, there is some strange behaviour. While check is executed I can write data onto array in parallel with good performance. Write speed is ~100MB/s and one can see the RAID sync speed decreases. After copy to array is done, sync speed increased to previous speed again.
The problem are reads from the array while check is running. Readings are done with <20MB/s. And resync speed for RAID does not decrease. I’ve no idea what’s the reason for this.

# ps aux | grep md0
root       211  0.4  0.0      0     0 ?        S    Okt22  93:40 [md0_raid6]
root       648  0.0  0.0      0     0 ?        S    Okt22   0:01 [jbd2/md0-8]
root     15361  4.4  0.0      0     0 ?        DN   02:25   0:00 [md6_resync]
root     15401  0.0  0.0  12752  2040 pts/2    S+   02:26   0:00 grep md6
# ionice -p 211
none: prio 0
# ionice -p 15361
idle

Resync process is set to idle which is correct. I/O scheduler is set to CFQ for all underlaying physical discs.

There is a RAID1 in this system also

# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid1]
md1 : active raid1 sde[0] sdf[1]
      3906887488 blocks super 1.2 [2/2] [UU]
      bitmap: 2/30 pages [8KB], 65536KB chunk

This array has no problem. I can write to and read from array with good speeds while check is running. Watching /proc/mdstat, the sync speed decreases on I/O activity and increases after finished again.
But not for read I/O on md0/RAID6. As for md0 normal sync speed is very good, normal reads and writes without resync are good and even writes to array while running RAID check is very good, why are reads so bad when monthly check is running?


Get this bounty!!!

#StackBounty: #debian #mdadm #io #raid6 RAID6 resync with fast writes but slow reads

Bounty: 100

I’m using Debian Jessie.

# uname -a
Linux host 4.9.0-0.bpo.3-amd64 #1 SMP Debian 4.9.30-2+deb9u5~bpo8+1 (2017-09-28) x86_64 GNU/Linux

And have setup a RAID6.

# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid1]
md0 : active raid6 sda[0] sdd[3] sdc[2] sdb[1]
      19532611584 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/4] [UUUU]
      bitmap: 1/73 pages [4KB], 65536KB chunk

This are 4x Seagate Enterprise 10TB 7200rpm. When copying a large file from RAID array to internal system disk (which is a SSD) I get an average throughput of 220MB/s. Copying large files from SSD to array is done with 145MB/s.
When the monthly RAID check is done (started by cron job execution checkarray --cron --all --idle --quiet which is the default behaviour) I can see

# cat /proc/mdstat                                                                                                                                                 Personalities : [raid6] [raid5] [raid4] [raid1]
md0 : active raid6 sda[0] sdd[3] sdc[2] sdb[1]
      19532611584 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/4] [UUUU]
      [>....................]  check =  0.7% (72485728/9766305792) finish=817.2min speed=197694K/sec
      bitmap: 1/73 pages [4KB], 65536KB chunk

So resync speed is great also. Now, there is some strange behaviour. While check is executed I can write data onto array in parallel with good performance. Write speed is ~100MB/s and one can see the RAID sync speed decreases. After copy to array is done, sync speed increased to previous speed again.
The problem are reads from the array while check is running. Readings are done with <20MB/s. And resync speed for RAID does not decrease. I’ve no idea what’s the reason for this.

# ps aux | grep md0
root       211  0.4  0.0      0     0 ?        S    Okt22  93:40 [md0_raid6]
root       648  0.0  0.0      0     0 ?        S    Okt22   0:01 [jbd2/md0-8]
root     15361  4.4  0.0      0     0 ?        DN   02:25   0:00 [md6_resync]
root     15401  0.0  0.0  12752  2040 pts/2    S+   02:26   0:00 grep md6
# ionice -p 211
none: prio 0
# ionice -p 15361
idle

Resync process is set to idle which is correct. I/O scheduler is set to CFQ for all underlaying physical discs.

There is a RAID1 in this system also

# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid1]
md1 : active raid1 sde[0] sdf[1]
      3906887488 blocks super 1.2 [2/2] [UU]
      bitmap: 2/30 pages [8KB], 65536KB chunk

This array has no problem. I can write to and read from array with good speeds while check is running. Watching /proc/mdstat, the sync speed decreases on I/O activity and increases after finished again.
But not for read I/O on md0/RAID6. As for md0 normal sync speed is very good, normal reads and writes without resync are good and even writes to array while running RAID check is very good, why are reads so bad when monthly check is running?


Get this bounty!!!

#StackBounty: #debian #cups #printer Cups and print server slowing down entire system

Bounty: 50

I am a sysadmin, and my computers run Debian Jessie. (I know, I’m working on updating soon.) When I try to print to a network printer, sometimes it works flawlessly. Other times, however, the program I’m printing from will gray out and the print dialog will take forever to come up. All the programs on the computer will hang. At times like these, running lpstat -t will hang as well. Furthermore, after a print job is completed, lpstat -t will show, indefinitely:

Printer printername is idle. Enabled since datetime.
Waiting for printer to finish.

The printer usually accepts more jobs anyway.

Restarting CUPS will usually temporarily fix all of these problems, but I have been unable to identify the source. What can I do to fix this?

Update:

Looking in my log files, I see cupsd is not idle any more, canceling shutdown over and over.


Get this bounty!!!

#StackBounty: #debian #logs #touchpad #troubleshooting #wayland How to find logs about Touchpad malfunction in Debian on Wayland?

Bounty: 50

I am trying to troubleshoot why my touchpad does not work anymore with Debian on Wayland (after pressing FN9 and FN8), continuing from the thread Why lost communication to Touchpad on Wayland Debian Stretch after FN-8/9 keys?

Restarting the system does not restore the touchpad.
So some touchpad setting files have been affected.
I really would like to troubleshoot which those files are such that the touchpad could work again.

The touchpad works normally in X11, but not anymore in Wayland.

  • evtest: produces events in X11 – very fast from the beginning.
  • evtest: it took one minute before it managed to produce any events.

OS: Debian Stretch 9.1
Hardware: Asus Zenbook UX303UA R4028T
Touchpad: FocalTechPS
Window manager: Gnome 3.22 on Wayland 1.13 or 1.17 (not sure, but the builtin one)


Get this bounty!!!

#StackBounty: #debian #cups #printer Cups and print server slowing down entire network

Bounty: 50

I am a sysadmin, and my computers run Debian Jessie. (I know, I’m working on updating soon.) When I try to print to a network printer, sometimes it works flawlessly. Other times, however, the program I’m printing from will gray out and the print dialog will take forever to come up. All the programs on the computer will hang. At times like these, running lpstat -t will hang as well. Furthermore, after a print job is completed, lpstat -t will show, indefinitely:

Printer printername is idle. Enabled since datetime.
Waiting for printer to finish.

The printer usually accepts more jobs anyway.

Restarting CUPS will usually temporarily fix all of these problems, but I have been unable to identify the source. What can I do to fix this?

Update:

Looking in my log files, I see cupsd is not idle any more, canceling shutdown over and over.


Get this bounty!!!

#StackBounty: #debian #colors #chrome #display How to repair Colors problem in Chrome

Bounty: 50

Black colors and shadows in videos on Google Chrome have a problem, I don’t know how to phrase this problem in words properly so watch these screenshots from the same video on same pixels (360p)
using Google Chrome :
check the eyes and shadows

using Firefox :
enter image description here

my laptop graphics :

CPU:       Dual core Intel Core i5 M 520 (-HT-MCP-) cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9576
           clock speeds: max: 2400 MHz 1: 1333 MHz 2: 1599 MHz 3: 1199 MHz 4: 1333 MHz
Graphics:  Card: Intel Core Processor Integrated Graphics Controller bus-ID: 00:02.0
           Display Server: X.org 1.19.2 driver: intel tty size: 168x47 Advanced Data: N/A for root

uname :

Linux www 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux

/etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "DRI" "3" 
EndSection

Update: now I use DRI3 version but the problem didn’t change

Update 2: more recognizable example :

Chrome :
enter image description here

Firefox :
enter image description here


Get this bounty!!!

#StackBounty: #debian #colors #display How to repair Colors problem in Debian

Bounty: 50

Black colors and shadows in videos on Debian have a problem, I don’t know how to phrase this problem in words properly so watch these screenshots from the same video on same pixels (360p)
using Debian :
check the eyes and shadows

using Windows 7 :
enter image description here

my laptop graphics :

CPU:       Dual core Intel Core i5 M 520 (-HT-MCP-) cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9576
           clock speeds: max: 2400 MHz 1: 1333 MHz 2: 1599 MHz 3: 1199 MHz 4: 1333 MHz
Graphics:  Card: Intel Core Processor Integrated Graphics Controller bus-ID: 00:02.0
           Display Server: X.org 1.19.2 driver: intel tty size: 168x47 Advanced Data: N/A for root

uname :

Linux www 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux

/etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "DRI" "3" 
EndSection

Update: now I use DRI3 version but the problem didn’t change

Update 2: more recognizable example :

Debian :
enter image description here

Windows 7 :
enter image description here


Get this bounty!!!